出库单详情
返回单个出库单的完整信息,包括包裹、明细、收货地址、SOP 状态、附件与专属 webhook 配置。仅可访问属于当前认证伙伴的请求。
获取出库单详情
POST
/channel/api/v1/outbound/detailAuth: request-token (channel_partner)
读取出库单详情。读取时会同步待审批的工作流实例:自动通过时旧请求状态(status)变为 outbound_pending(approved 属于 SOP 状态,见 sop_status),驳回则标记 rejected。同时按需为请求补建通用出库 SOP 单,因此 outbound_id 与 sop_status 通常会在首次读取后立即可用。
所需能力: outbound_submit
请求头
| 请求头 | 必填 | 说明 |
|---|---|---|
request-token | 是 | 渠道伙伴应用令牌 |
Content-Type | 是 | application/json |
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | integer | 是 | 出库单 ID |
响应
json
{
"code": 200,
"msg": "success",
"data": {
"id": 1001,
"member_id": 42,
"warehouse_id": 1,
"scheduled_at": "2026-11-12 09:00:00",
"delivery_mode": "e2c_carrier",
"carrier_id": null,
"carrier_name_self": null,
"tracking_number": null,
"status": "outbound_pending",
"progress": 50,
"remark": "",
"identification_code": null,
"custom_remark": null,
"workflow_instance_id": null,
"approved_at": "2026-11-11 10:05:00",
"address_id": 3001,
"ship_to_name": "Anna Schmidt",
"ship_to_phone": "+49 40 1234567",
"ship_to_email": "anna@example.com",
"ship_to_address1": "Hafenstrasse 1",
"ship_to_address2": null,
"ship_to_city": "Hamburg",
"ship_to_province": null,
"ship_to_postcode": "20457",
"ship_to_country_code": "DE",
"created_at": "2026-11-11 10:00:00",
"updated_at": "2026-11-11 10:05:00",
"outbound_id": 5001,
"sop_status": "approved",
"dispatch_task_id": null,
"webhook_url": "https://partner.example.com/hooks/e2c",
"webhook_secret": "1f0c9a7d5e3b2a4c6d8e0f1a2b3c4d5e6f708192a3b4c5d6",
"items": [
{
"id": 7001,
"request_id": 1001,
"sku_id": 789,
"quantity": 10,
"deducted_quantity": 0,
"remark": "",
"sku_code": "SKU-789",
"product_title": "Portable Power Station 500W",
"image": "https://cdn.example.com/products/789.jpg",
"options": {},
"weight": 2.5,
"weight_unit": "kg",
"suggested_declared_price": 12.9,
"suggested_hs_code": "850760",
"suggested_declared_weight": 2.5
}
],
"packages": [
{
"id": 6001,
"request_id": 1001,
"outbound_id": 5001,
"container_id": null,
"package_type": "carton",
"package_no": "P1001-1",
"package_name": null,
"length": 40,
"width": 30,
"height": 20,
"weight": 2.5,
"dimension_unit": "cm",
"weight_unit": "kg",
"remark": "",
"sort_order": 1,
"status": 1,
"created_at": "2026-11-11 10:00:00",
"updated_at": "2026-11-11 10:00:00",
"items": [
{
"id": 8001,
"package_id": 6001,
"request_id": 1001,
"sku_id": 789,
"quantity": 10,
"remark": "",
"declared_price": 12.9,
"declared_currency": "EUR",
"hs_code": "850760",
"origin_country_code": "CN",
"declared_weight": 2.5,
"weight_unit": "kg",
"sku_code": "SKU-789",
"product_title": "Portable Power Station 500W"
}
]
}
],
"sop_items": [
{
"id": 9001,
"outbound_id": 5001,
"sku_id": 789,
"quantity": 10,
"deducted_quantity": 0,
"remark": "",
"sku_code": "SKU-789",
"product_title": "Portable Power Station 500W"
}
],
"attachments": [
{
"id": 9501,
"outbound_id": 5001,
"scope_type": "outbound",
"scope_id": 5001,
"document_code": "packing_list",
"paper_type": "A4",
"paper_width_mm": 210,
"paper_height_mm": 297,
"name": "packing-list.pdf",
"file_url": "https://cdn.example.com/e2c/tmp/packing-list.pdf",
"file_type": "pdf",
"file_size": 204800,
"print_enabled": 1,
"print_copies": 2,
"print_scale": "portrait",
"print_types": ["print"],
"uploaded_by_type": "partner",
"uploaded_by_id": 42,
"sort_order": 0,
"status": 1,
"latest_print_status": "pending",
"created_at": "2026-11-11 10:10:00",
"updated_at": "2026-11-11 10:10:00"
}
]
}
}字段说明:
identification_code与custom_remark来自出库请求;未填写时为null。
| 字段 | 类型 | 说明 |
|---|---|---|
status | string | 合作商请求状态:draft / pending / pending_approval / outbound_pending / shipped / completed / rejected / cancelled |
sop_status | string/null | 通用出库 SOP 状态:draft / pending / pending_approval / approved / warehouse_confirmed / stock_ready / shipped / completed / cancelled / rejected;SOP 单尚未建立时为 null |
outbound_id | integer/null | 通用出库单 ID |
dispatch_task_id | integer/null | ERP 发货任务 ID,未创建发货任务时为 null |
workflow_instance_id | integer/null | 审批工作流实例 ID,无审批流时为 null |
packages[].container | object | 仅当 container_id 非空时返回容器详情 |
sop_items[] | array | 通用出库单明细(仓库侧视图) |
attachments[] | array | 附件列表,字段与 /outbound/attachment/list 一致 |
webhook_url / webhook_secret | string/null | 提交时通过 webhook_url 登记的专属 webhook 及其签名密钥 |
说明:
sop_status = approved时仓库尚未确认;库存尚未锁定。仓库已确认后为warehouse_confirmed,此时库存已锁定。status = outbound_pending与sop_status = approved是同一时点的两个视图(旧请求状态 / SOP 状态)。- 详情接口不返回
evidence;仓库上传的凭证请调用/outbound/evidence/list获取。 - 读取详情会触发 SOP 单补建与待审批状态同步,属于幂等操作。
错误码
| code | 含义 |
|---|---|
| 909 | 未认证、令牌无效或不属于渠道伙伴 |
| 606 | 能力不足(需要 outbound_submit) |
| 400 | id 缺失 |
| 404 | 请求不存在,或不属于当前伙伴 |
cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/detail' \
-H 'request-token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"id": 1001
}'