Outbound Workflow
Partner-facing only. Internal warehouse, printing, stock-ready and inventory-lock APIs are not available to partners. All outbound requests run through the unified SOP (
t_wms_outbound_order); partners provide a source adapter and never build a separate state machine.
1. Create
text
POST /channel/api/v1/outbound/submit- Add
save_as_draft=trueto save a draft; the status isdraft. - With an approval flow the status is
pending_approval(Pending approval). - Without an approval flow the request is auto-approved and the status is
outbound_pending(already queued for the warehouse).
text
POST /channel/api/v1/outbound/confirm { id }- Confirms a request in
draftorpendingstatus. - The same auto-approval rule applies: with a flow it returns
pending_approval, without oneoutbound_pending. - Confirming any other status returns
400(only draft/pending requests can be confirmed).
2. Track
text
POST /channel/api/v1/outbound/list
POST /channel/api/v1/outbound/detail { id }The detail returns sop_status, attachments, sop_items, dispatch_task_id, outbound_id, webhook_url and webhook_secret.
sop_statuscomes from the unified SOP order (t_wms_outbound_order.status); see the status table below.identification_codeandcustom_remarkare carried into the unified outbound order; the ERP shipment list/detail and keyword search expose both fields.outbound/detaildoes not returnevidence. Query execution evidence separately withoutbound/evidence/list.
3. Attachments
text
POST /channel/api/v1/outbound/attachment/upload
POST /channel/api/v1/outbound/attachment/update
POST /channel/api/v1/outbound/attachment/batch-update
POST /channel/api/v1/outbound/attachment/delete
POST /channel/api/v1/outbound/attachment/batch-delete
POST /channel/api/v1/outbound/attachment/list- Upload and single update window:
draft/pending/pending_approval/approved. - Batch update is wider:
warehouse_confirmedis also allowed. - Locked from
stock_readyonwards; a later upload/update returns400(attachments are locked after stock ready). - Delete endpoints do not check status, but a partner can only delete attachments it uploaded.
- Scope:
outbound/package/product+scope_id. - Files: PDF/JPG/JPEG/PNG, max 10MB per file.
- Print metadata is optional; the warehouse may adjust it.
4. Evidence
text
POST /channel/api/v1/outbound/evidence/list { request_id }- Read-only for partners; evidence is uploaded by the warehouse during stock-ready/loading.
- Evidence is not a print attachment and is not part of
attachmentsinoutbound/detail.
5. Webhook
text
POST /channel/api/v1/webhook/subscriptions
POST /channel/api/v1/webhook/subscriptions/save
POST /channel/api/v1/webhook/subscriptions/deleteSee Outbound Webhook.
Status Table
| Status | Label | Meaning |
|---|---|---|
draft | Draft | Saved, not queued, no stock deducted |
pending | Pending | Submitted but not yet in approval / warehouse queue |
pending_approval | Pending approval | Approval flow running |
approved | Confirmed | Approved and queued for the warehouse (legacy outbound_pending maps here) |
warehouse_confirmed | Warehouse Confirmed | Warehouse accepted; locking/picking starts |
stock_ready | Ready to ship | Picking/packing/printing done; attachments locked |
shipped | Shipped | Handed to carrier / picked up |
completed | Completed | Completed |
rejected | Rejected | Approval rejected |
cancelled | Cancelled | Cancelled |
Compatibility: the legacy
outbound_pendingvalue means "queued for the warehouse" and maps to SOPapproved(it may remain after stock-ready). New integrations should readsop_status.
Errors
| Code | Meaning |
|---|---|
| 909 | Token missing/invalid |
| 606 | Capability missing |
| 400 | Validation or status not allowed (e.g. confirm on non-draft/pending, attachments locked) |
| 404 | Request/attachment not found or not owned |
| 500 | Server error |