Skip to content

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=true to save a draft; the status is draft.
  • 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 draft or pending status.
  • The same auto-approval rule applies: with a flow it returns pending_approval, without one outbound_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_status comes from the unified SOP order (t_wms_outbound_order.status); see the status table below.
  • identification_code and custom_remark are carried into the unified outbound order; the ERP shipment list/detail and keyword search expose both fields.
  • outbound/detail does not return evidence. Query execution evidence separately with outbound/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_confirmed is also allowed.
  • Locked from stock_ready onwards; a later upload/update returns 400 (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 attachments in outbound/detail.

5. Webhook ​

text
POST /channel/api/v1/webhook/subscriptions
POST /channel/api/v1/webhook/subscriptions/save
POST /channel/api/v1/webhook/subscriptions/delete

See Outbound Webhook.

Status Table ​

StatusLabelMeaning
draftDraftSaved, not queued, no stock deducted
pendingPendingSubmitted but not yet in approval / warehouse queue
pending_approvalPending approvalApproval flow running
approvedConfirmedApproved and queued for the warehouse (legacy outbound_pending maps here)
warehouse_confirmedWarehouse ConfirmedWarehouse accepted; locking/picking starts
stock_readyReady to shipPicking/packing/printing done; attachments locked
shippedShippedHanded to carrier / picked up
completedCompletedCompleted
rejectedRejectedApproval rejected
cancelledCancelledCancelled

Compatibility: the legacy outbound_pending value means "queued for the warehouse" and maps to SOP approved (it may remain after stock-ready). New integrations should read sop_status.

Errors ​

CodeMeaning
909Token missing/invalid
606Capability missing
400Validation or status not allowed (e.g. confirm on non-draft/pending, attachments locked)
404Request/attachment not found or not owned
500Server error