Skip to main content

WES β†’ Client Event Notification API Documentation

Version: v1.0
Last Updated: 2025-08-01

This document describes how the WES actively calls your system to push real-time events such as inbound / outbound completions.
You must configure the callback URL and authentication method in the WES portal, and ensure your endpoint is idempotent.


πŸ” Authentication​

All requests carry the header configured in the WES portal.


πŸ“‘ General Rules​

ItemDescription
HTTP methodPOST
EncodingUTF-8
Timeout10 s
Retry policy30 s β†’ 1 min β†’ 2 min β†’ 5 min β†’ 10 min, max 5 attempts
Idempotency keyorderNo (WES guarantees no duplication for the same order)
Success response{"code":"0","msg":"success"}
Failure response{"code":"β‰ 0","msg":"error description"}

Unified Wrapper CallbackMessage​

Every callback is wrapped in:

{
"messageId": 1688201234567890,
"data": { ... /* actual event payload */ }
}
FieldTypeDescription
messageIdlongGlobally-unique ID (Snowflake), use for deduplication
dataTThe original business object

Example (STOCK_ABNORMAL_CALLBACK):

{
"messageId": 1688201234567890,
"data": {
"warehouseCode": "WH-EAST-01",
"ownerCode": "ACME_CORP",
"orderNo": "OUT-20230801001",
"stockAbnormalType": "LOST",
"qtyAbnormal": -5,
"abnormalReason": "SHORTAGE",
"...": "..."
}
}

🎯 Event List​

EventTriggerEvent Code
Inbound Plan CompletedReceiving, QC & put-away all doneINBOUND_PLAN_ORDER_COMPLETED
Outbound Plan CompletedPicking finishedOUTBOUND_PLAN_ORDER_COMPLETE
Outbound Container SealedPicking & sealing doneOUTBOUND_SEAL_CONTAINER
Stock Abnormal CallbackException during picking / countingSTOCK_ABNORMAL_CALLBACK
Stock Adjustment CallbackStock adjustment confirmedSTOCK_ADJUSTMENT_CALLBACK
PTL ControlLight / display instructionPTL_CONTROL
Container Task CreatedPut-away, picking, counting, etc.CONTAINER_TASK_CREATE
Container Task CancelledTask revokedCONTAINER_TASK_CANCEL
Container LeaveTask done, container departsCONTAINER_LEAVE
Call RobotSummon AGV / AMRCALL_ROBOT

INBOUND_PLAN_ORDER_COMPLETED​

Request Example

{
"orderNo": "INB-20230801001",
"customerOrderNo": "CUST-PO-20230731-001",
"warehouseCode": "WH-EAST-01",
"customerOrderType": "PURCHASE",
"storageType": "storage",
"lpnCode": "LPN123456",
"skuKindNum": 3,
"totalQty": 120,
"totalBox": 5,
"inboundPlanOrderStatus": "COMPLETED",
"details": [
{
"ownerCode": "ACME_CORP",
"skuCode": "SKU-2023-001",
"qtyRestocked": 50,
"boxNo": "BOX-001",
"batchAttributes": {
"batchNo": "BATCH20230801",
"productionDate": "2023-07-20"
}
}
],
"extendFields": {
"completionTime": 1690848000000,
"operator": "SYSTEM"
}
}

Fields​

FieldTypeDescription
orderNostringWES internal order number
customerOrderNostringOriginal customer PO number
warehouseCodestringWarehouse code
customerOrderTypestringPURCHASE, RETURN, or TRANSFER
storageTypestringstorage, overstock, in_transit
lpnCodestringLPN code
skuKindNumintegerNumber of SKU kinds
totalQtyintegerTotal qty received
totalBoxintegerTotal boxes received
inboundPlanOrderStatusenumAlways COMPLETED
detailsarrayInbound details
extendFieldsobjectExtension map
details​
FieldTypeDescription
ownerCodestringOwner code
skuCodestringSKU code
qtyRestockedintegerActual received qty
boxNostringBox number
batchAttributesobjectBatch attributes

OUTBOUND_PLAN_ORDER_COMPLETE​

Request Example

{
"orderNo": "OUT-20230801001",
"customerOrderNo": "CUST-SO-20230731-001",
"warehouseCode": "WH-EAST-01",
"customerOrderType": "SALES",
"carrierCode": "SF-EXPRESS",
"waybillNo": "SF1234567890",
"skuKindNum": 2,
"totalQty": 80,
"priority": 100,
"shortOutbound": false,
"outboundPlanOrderStatus": "COMPLETED",
"destinations": ["DOCK-A1"],
"details": [
{
"ownerCode": "ACME_CORP",
"skuCode": "SKU-2023-001",
"skuName": "Premium Laptop",
"qtyRequired": 50,
"qtyActual": 50,
"batchAttributes": {
"batchNo": "BATCH20230801"
}
}
],
"extendFields": {
"completionTime": 1690848000000,
"shippedTime": 1690851600000,
"operator": "SYSTEM"
}
}

Fields​

FieldTypeDescription
orderNostringWES internal order number
customerOrderNostringOriginal customer SO number
warehouseCodestringWarehouse code
customerOrderTypestringSALES, etc.
carrierCodestringCarrier code
waybillNostringTracking number
skuKindNumintegerNumber of SKU kinds
totalQtyintegerTotal qty shipped
priorityintegerPriority
shortOutboundbooleanWhether shortage was allowed
outboundPlanOrderStatusenumAlways COMPLETED
destinationsarrayDock / store list
detailsarrayOutbound details
extendFieldsobjectExtension map
details​
FieldTypeDescription
ownerCodestringOwner code
skuCodestringSKU code
qtyActualintegerShipped qty
batchAttributesobjectBatch attributes

OUTBOUND_SEAL_CONTAINER​

Trigger
Pushed when an outbound tote/container has been sealed after picking.

Request Example

{
"warehouseCode": "WH-EAST-01",
"transferContainerCode": "TC-20230801001",
"containerSealedDetailDTOS": [
{
"warehouseAreaId": 1001,
"workStationId": 2001,
"operator": "Zhang San",
"putWallSlotCode": "A01-S01",
"destinations": ["DOCK-A1", "DOCK-A2"],
"ownerCode": "ACME_CORP",
"waveNo": "W-20230801001",
"customerOrderNo": "CUST-SO-20230731-001",
"customerOrderType": "SALES",
"carrierCode": "SF-EXPRESS",
"waybillNo": "SF1234567890",
"origPlatformCode": "TMALL",
"expiredTime": 1690848000000,
"priority": 100,
"orderNo": "OUT-20230801001",
"extendFields": {
"sealTime": 1690848000000,
"sealNo": "SEAL-001"
},
"skuCode": "SKU-2023-001",
"skuName": "Premium Laptop",
"batchAttributes": {
"batchNo": "BATCH20230801"
},
"qtyRequired": 10,
"qtyActual": 10
}
]
}

Fields​

ContainerSealedDTO​
FieldTypeDescription
warehouseCodestringWarehouse code
transferContainerCodestringSealed container/tote code
containerSealedDetailDTOSarrayList of sealed details
ContainerSealedDetailDTO​
FieldTypeDescription
warehouseAreaIdlongZone ID
workStationIdlongWork-station ID
operatorstringSealer name
putWallSlotCodestringPut-wall slot code
destinationsset<string>Dock / store list
ownerCodestringOwner code
waveNostringWave number
customerOrderNostringCustomer SO number
customerOrderTypestringOrder type
carrierCodestringCarrier code
waybillNostringTracking number
origPlatformCodestringOriginal platform code
expiredTimelongCut-off timestamp
priorityintegerPriority
orderNostringWES internal order number
extendFieldsobjectExtension map
skuCodestringSKU code
skuNamestringSKU name
batchAttributesobjectBatch attributes
qtyRequiredintegerPlanned qty
qtyActualintegerActual qty

STOCK_ABNORMAL_CALLBACK​

Trigger
Pushed immediately when WES detects any stock anomaly (shortage, overage, damage, wrong batch, etc.) during picking, counting, or relocation.

Request Example

[{
"warehouseCode": "WH-EAST-01",
"ownerCode": "ACME_CORP",
"orderNo": "OUT-20230801001",
"stockAbnormalType": "LOST",
"replayNo": "RP-20230801001",
"containerStockId": 10001,
"skuBatchStockId": 20001,
"skuBatchAttributeId": 30001,
"skuId": 40001,
"skuCode": "SKU-2023-001",
"containerCode": "C-20230801001",
"containerSlotCode": "A-01",
"locationCode": "LOC-A-01-01",
"qtyAbnormal": -5,
"abnormalReason": "SHORTAGE",
"reasonDesc": "Short 5 pcs when picking",
"abnormalOrderNo": "CHK-20230801001"
}]

Fields​

FieldTypeDescription
warehouseCodestringWarehouse code
ownerCodestringOwner code
orderNostringRelated order (inbound/outbound/counting)
stockAbnormalTypeenumSee StockAbnormalTypeEnum
replayNostringRecount number (for deduplication)
containerStockIdlongInternal container-stock ID
skuBatchStockIdlongInternal SKU-batch-stock ID
skuBatchAttributeIdlongInternal batch-attribute ID
skuIdlongInternal SKU ID
skuCodestringPublic SKU code
containerCodestringContainer code
containerSlotCodestringContainer slot code
locationCodestringLocation code
qtyAbnormalintegerNegative = shortage, positive = overage
abnormalReasonstringReason code, see table
reasonDescstringHuman-readable reason
abnormalOrderNostringWork order that raised the anomaly

Enums​

StockAbnormalTypeEnum​
ValueMeaning
PICKINGPicking anomaly
STOCK_TAKECounting anomaly
TOTE_RELOCATIONRelocation anomaly
Common abnormalReason Codes​
CodeMeaning
SHORTAGEShortage
OVERAGEOverage
DAMAGED_IN_HANDLINGDamaged during handling
EXPIRED_ON_SHELFExpired in warehouse

STOCK_ADJUSTMENT_CALLBACK​

Trigger
Pushed after WES has generated and confirmed a stock-adjustment order, synchronizing the final adjusted qty and reason.

Request Example

[
{
"id": 90001,
"stockAdjustmentOrderId": 70001,
"stockAbnormalRecordId": 80001,
"warehouseCode": "WH-EAST-01",
"ownerCode": "ACME_CORP",
"containerCode": "C-20230801001",
"containerSlotCode": "A-01",
"containerStockId": 10001,
"skuBatchStockId": 20001,
"skuBatchAttributeId": 30001,
"skuId": 40001,
"skuCode": "SKU-2023-001",
"qtyAdjustment": -3,
"abnormalReason": "LOST"
}
]

Fields​

FieldTypeDescription
idlongUnique adjustment detail ID
stockAdjustmentOrderIdlongAdjustment order ID
stockAbnormalRecordIdlongRelated anomaly record ID (nullable)
warehouseCodestringWarehouse code
ownerCodestringOwner code
containerCodestringContainer code
containerSlotCodestringContainer slot code
containerStockIdlongInternal container-stock ID
skuBatchStockIdlongInternal SKU-batch-stock ID
skuBatchAttributeIdlongInternal batch-attribute ID
skuIdlongInternal SKU ID
skuCodestringPublic SKU code
qtyAdjustmentintegerDelta after vs before (negative = decrease)
abnormalReasonenumAdjustment reason

PTL_CONTROL​

Trigger
Sent in real-time when WES needs to control Pick-to-Light devices (lights, digits, or displays).
This is a live command; no retry queue. PTL gateway should cache or resync after reconnect.

Request Example

{
"workStationId": "WS-001",
"tagCode": "A01-S01",
"color": "GREEN",
"mode": "FLASH",
"updown": "UP",
"number": 5,
"displayText": "5"
}

Fields​

FieldTypeDescription
workStationIdstringWork-station ID
tagCodestringLight tag / slot code
colorenumSee PtlColorEnum
modeenumSee PtlModeEnum
updownenumSee PtlUpdownEnum
numberinteger0-9999 for 7-segment display
displayTextstringAdditional text (≀ 8 bytes)

PTL Enums​

PtlColorEnum​
ValueMeaning
REDRed
GREENGreen
BLUEBlue
YELLOWYellow
WHITEWhite
PtlModeEnum​
ValueMeaning
ONSteady
OFFOff
FLASHFlashing
PtlUpdownEnum​
ValueMeaning
UNTAPABLECannot be turned off by tapping
TAPABLECan be turned off by tapping

CONTAINER_TASK_CREATE​

Trigger
Pushed when WES needs a robot (AGV/AMR/KIVA) to move a container for put-away, picking, empty-return, replenishment, etc.

Request Example

[
{
"taskCode": "CT-20230801001",
"taskGroupCode": "TG-20230801001",
"businessTaskType": "OUTBOUND_PICKING",
"containerTaskType": "TRANSPORT",
"taskPriority": 100,
"taskGroupPriority": 90,
"containerCode": "C-20230801001",
"containerFace": "A",
"startLocation": "LOC-A-01-01",
"containerSpecCode": "STD-40L",
"destinations": ["WS-001-A", "WS-001-B"],
"customerTaskIds": [10001, 10002],
"parentContainerTaskId": null,
"nextContainerTasks": []
}
]

Fields​

FieldTypeDescription
taskCodestringContainer task code, globally unique
taskGroupCodestringGroup / wave code
businessTaskTypeenumSee BusinessTaskTypeEnum
containerTaskTypeenumSee ContainerTaskTypeEnum
taskPriorityintegerHigher = more urgent
taskGroupPriorityintegerGroup priority
containerCodestringContainer code
containerFacestringFace A/B/C/D (KIVA)
startLocationstringFrom location
containerSpecCodestringContainer spec (e.g. STD-40L)
destinationsarray<string>Target locations (multi-hop allowed)
customerTaskIdsarray<long>Related customer task IDs
parentContainerTaskIdlongParent task ID (nullable)
nextContainerTasksarray<ContainerTask>Child tasks (nullable)

Enums​

BusinessTaskTypeEnum​
ValueMeaning
PUT_AWAYPut-away
PICKINGPicking
EMPTY_CONTAINER_OUTBOUNDEmpty container outbound
EMPTY_CONTAINER_INBOUNDEmpty container inbound
ContainerTaskTypeEnum​
ValueMeaning
TRANSPORTTransport
INBOUNDInbound
OUTBOUNDOutbound

Success Response

RCS must return:

{ "code": "0", "msg": "accepted", "taskCode": "CT-20230801001" }
  • taskCode must match the request for idempotency.

CONTAINER_TASK_CANCEL​

Trigger
Pushed when WES cancels a container task that has not yet started.
RCS should mark the task CANCELLED and stop scheduling.
If execution has already begun, RCS decides whether to continue or roll back.

Request Example

["CT-20230801001","CT-20230801002"]

Fields​

FieldTypeDescription
taskCodestringContainer task code to cancel

Success Response

RCS must return:

{ "code": "0", "msg": "cancelled", "taskCode": "CT-20230801001" }

CONTAINER_LEAVE​

Trigger
Pushed when a container physically leaves a workstation / zone after task completion or scheduling needs, to sync state and free resources.

Request Example

{
"workStationId": 2001,
"groupCode": "GRP-20230801001",
"containerOperationDetails": [
{
"containerCode": "C-20230801001",
"containerFace": "A",
"locationCode": "WS-001-OUT",
"taskCode": "CT-20230801001",
"operationType": "LEAVE"
}
]
}

Fields​

FieldTypeDescription
workStationIdlongCurrent workstation ID
groupCodestringWave or group code
containerOperationDetailsarrayLeave details
ContainerOperationDetail​
FieldTypeDescription
containerCodestringContainer code
containerFacestringFace A/B/C/D
locationCodestringActual location when leaving
taskCodestringRelated task code
operationTypeenumOperation type
ContainerOperationTypeEnum​
ValueMeaning
LEAVEContainer leaves
MOVE_OUTContainer taken out
ABNORMALSent to exception lane

Success Response

{ "code": "0", "msg": "received" }

CALL_ROBOT​

Trigger
Sent when a workstation needs a robot to arrive for the next step.
This is a live command; RCS should immediately dispatch the nearest idle robot.

Request Example

{
2001
}

Fields​

FieldTypeDescription
workStationIdlongTarget workstation ID (RCS maps to physical coordinates)

Success Response

RCS must return:

{ "code": "0", "msg": "robot dispatched"}

πŸ”„ Error Codes​

codeMeaningAdvice
0Success-
40001Signature errorCheck secret & algorithm
40002Duplicate / idempotentReturn success directly
50000Internal errorRetry later

πŸ“ž Support​