Skip to content

Order Documents ​

POST/channel/api/v1/order/documents

Auth: request-token (channel_partner)

Return documents associated with an order. This includes order-level documents stored in t_documents and the fulfillment_document field on the order record.

Request Headers ​

HeaderRequiredDescription
request-tokenyesChannel partner app token
Content-Typeyesapplication/json

Request Body ​

FieldTypeRequiredDescription
order_idintegeryesOrder ID

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "source": "order",
      "name": "Commercial Invoice",
      "type": "order",
      "url": "https://cdn.example.com/docs/order-456-invoice.pdf",
      "template_id": 3,
      "created_at": "2026-08-13 10:05:00"
    },
    {
      "source": "order",
      "name": "Packing List",
      "type": "fulfillment",
      "url": "https://cdn.example.com/docs/order-456-packing.pdf",
      "template_id": 5,
      "created_at": null
    }
  ]
}

Each entry has a source field that identifies the dimension the document comes from (order / package / pickup), not the document type:

  • "order" — order-level document from t_documents where type = 'order' and primary_key = order_id
  • "order" — document generated at fulfillment, read from Order.fulfillment_document

The type field is the document source type (not a MIME type):

  • "order" — a document stored in t_documents
  • "fulfillment" — generated during fulfillment (stored on the order/package fulfillment_document field)
  • "pickup_task" — attached to a pickup task

Documents from t_documents carry their record creation time in created_at; fulfillment_document entries have no separate timestamp, so created_at is always null.

Error Codes ​

codeMeaning
909Missing/invalid token
400Missing order_id
403Order not in partner's shop scope (not-found and out-of-scope are indistinguishable)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/order/documents' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "order_id": 456
}'

Package Documents ​

POST/channel/api/v1/order/package/documents

Auth: request-token (channel_partner)

Return fulfillment documents for a specific order package.

Request Body ​

FieldTypeRequiredDescription
order_package_idintegeryesPackage ID

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "source": "package",
      "name": "Shipping Label",
      "type": "fulfillment",
      "url": "https://cdn.example.com/docs/pkg-1001-label.pdf",
      "template_id": 7,
      "created_at": null
    }
  ]
}

Error Codes ​

codeMeaning
909Missing/invalid token
400Missing order_package_id
403Package not found, or its order is not in the partner's shop scope

Pickup Documents ​

POST/channel/api/v1/order/pickup/documents

Auth: request-token (channel_partner)

Return documents attached to a pickup task. If at least one order linked to this pickup belongs to the partner's bound shops, all pickup documents are returned.

Request Body ​

FieldTypeRequiredDescription
pickup_task_idintegeryesPickup task ID

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "source": "pickup",
      "name": "Pickup Manifest",
      "type": "pickup_task",
      "url": "https://cdn.example.com/docs/pickup-500-manifest.pdf",
      "template_id": 12,
      "created_at": null
    }
  ]
}

Error Codes ​

codeMeaning
909Missing/invalid token
400Missing pickup_task_id
403Pickup task not found, or none of its linked orders belongs to the partner's bound shops