FeniciaDocs
DocumentaciónAPICambiosSoporte
Buscar⌘K
Orders APIList OrdersCreate an OrderGet an OrderSearch OrdersOrder Status TransitionsUpdate an OrderFulfillment & ShippingReturns & RefundsAttachmentsActivity Log & ExportAbandoned CartsError Catalog

Producto

  • Características
  • Precios
  • Integraciones

Recursos

  • Documentación
  • API
  • Cambios
  • Blog

Empresa

  • Sobre nosotros
  • Contacto
  • Carreras

Legal

  • Privacidad
  • Términos
FeniciaLa plataforma de e-commerce para merchants profesionales

© 2026 Hobbio Inc. Todos los derechos reservados.

Attachments

Order attachments let you associate files with an order: invoices, CFDI XML/PDF, shipping guides, or any custom document. Files are stored in S3 and accessed through short-lived presigned URLs.

Base URL

https://api.fenicia.io

All endpoints require Authorization: Bearer fn_live_....

Attachment types

TypeDescription
invoiceCommercial invoice (PDF)
cfdiCFDI XML / PDF (Mexican tax receipt)
shipping_guideCarrier shipping label / guide
customAny other document

Upload workflow

Uploads use a three-step presigned URL flow so files go directly to S3 without passing through Fenicia servers.

1

Request a presigned upload URL

Call POST /orders/{id}/attachments/upload-url. You receive an uploadUrl (valid 15 minutes) and an s3Key.

2

PUT the file to S3

Upload the file bytes directly to the uploadUrl with the exact Content-Type you declared.

3

Confirm the upload

Call POST /orders/{id}/attachments with the s3Key to register the attachment against the order.


List attachments

List all attachments associated with an order. Requires orders:read.

curl https://api.fenicia.io/orders/ord_123/attachments \
  -H "Authorization: Bearer fn_live_your_api_key"

Get attachment download URL

Returns a short-lived presigned S3 URL to download the file. Requires orders:read.

curl https://api.fenicia.io/orders/ord_123/attachments/att_01HXYZ \
  -H "Authorization: Bearer fn_live_your_api_key"

Request upload URL

Request a presigned S3 URL to upload a new attachment. Requires orders:update.


Confirm upload

Register the attachment after uploading to S3. Requires orders:update.


Full upload workflow

# 1. Request presigned URL
RESP=$(curl -s -X POST https://api.fenicia.io/orders/ord_123/attachments/upload-url \
  -H "Authorization: Bearer fn_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"type":"invoice","filename":"invoice-1001.pdf","contentType":"application/pdf"}')
 
UPLOAD_URL=$(echo $RESP | jq -r .uploadUrl)
S3_KEY=$(echo $RESP | jq -r .s3Key)
 
# 2. PUT the file to S3
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @invoice-1001.pdf
 
# 3. Confirm upload
curl -X POST https://api.fenicia.io/orders/ord_123/attachments \
  -H "Authorization: Bearer fn_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d "{\"s3Key\":\"$S3_KEY\",\"type\":\"invoice\",\"filename\":\"invoice-1001.pdf\",\"contentType\":\"application/pdf\"}"

Delete attachment

Remove an attachment from an order. The underlying S3 object is also deleted. Requires orders:update.

curl -X DELETE https://api.fenicia.io/orders/ord_123/attachments/att_01HXYZ \
  -H "Authorization: Bearer fn_live_your_api_key"

Presigned URLs expire

Both upload and download URLs expire in 15 minutes (expiresIn: 900). Request a fresh URL if the previous one has expired — do not cache them long-term.

Tip

Always use the exact contentType declared in /upload-url when PUTting to S3. If it doesn't match, S3 will reject the upload with SignatureDoesNotMatch.

Next steps

  • Activity Log & Export
  • Error catalog