Order Documents
/channel/api/v1/order/documentsAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Order ID |
Response
{
"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 fromt_documentswheretype = 'order'andprimary_key = order_id"order"— document generated at fulfillment, read fromOrder.fulfillment_document
The type field is the document source type (not a MIME type):
"order"— a document stored int_documents"fulfillment"— generated during fulfillment (stored on the order/packagefulfillment_documentfield)"pickup_task"— attached to a pickup task
Documents from
t_documentscarry their record creation time increated_at;fulfillment_documententries have no separate timestamp, socreated_atis alwaysnull.
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token |
| 400 | Missing order_id |
| 403 | Order not in partner's shop scope (not-found and out-of-scope are indistinguishable) |
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
/channel/api/v1/order/package/documentsAuth: request-token (channel_partner)
Return fulfillment documents for a specific order package.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
order_package_id | integer | yes | Package ID |
Response
{
"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
| code | Meaning |
|---|---|
| 909 | Missing/invalid token |
| 400 | Missing order_package_id |
| 403 | Package not found, or its order is not in the partner's shop scope |
Pickup Documents
/channel/api/v1/order/pickup/documentsAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
pickup_task_id | integer | yes | Pickup task ID |
Response
{
"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
| code | Meaning |
|---|---|
| 909 | Missing/invalid token |
| 400 | Missing pickup_task_id |
| 403 | Pickup task not found, or none of its linked orders belongs to the partner's bound shops |