Product Stock Sync
Synchronize product stock levels between WCS and WMS.
Direction WCS → WMS
HTTP Method POST
Path /product-stock-sync/sync
Request Body
Section titled “Request Body”Field notes:
| Field Name | Data Type | Description | Notes |
|---|---|---|---|
| productId | String | A unique product identifier for the product | |
| batchId | String | The batch identifier for a specific batch-managed product | |
| expiry | String | The expiry date for a specific date-managed product | |
| stockOwner | String | The stock owner identifier for a specific owner-managed | |
| subBinId | String | The location identifier for the physical bin-compartment (sub-bin) within the Autostore | |
| bins | Object Array | Array of bin objects | |
| bins.binId | String | Physical bin identifier within the Autostore | |
| bins.subBinId | String | Subbin (compartment) identifier within the bin | |
| bins.contentCode | String | Content code for the bin | |
| bins.markedNotEmpty | Boolean | Indicates if the subbin is marked as not empty | |
| bins.productMisMatch | Boolean | Indicates if there is a product mismatch in the subbin | |
| bins.markedEmptyAtPick | Boolean | Indicates if the subbin was marked empty during a pick operation | |
| bins.heldExternally | Boolean | Indicates if the subbin is held/locked externally | |
| bins.binLines | Object Array | Array of individual product lines in the bin | |
| bins.binLines.subBinId | String | Subbin identifier for this line | |
| bins.binLines.productId | String | Product identifier for this line | |
| bins.binLines.batchId | String | Batch identifier for this line | |
| bins.binLines.expiryDate | String | Expiry date for this line | |
| bins.binLines.stockOwner | String | Stock owner for this line | |
| bins.binLines.availableQuantity | Double | Available quantity for this line | |
| bins.binLines.allocatedQuantity | Double | Allocated quantity for this line | |
| allocations | Object Array | Can be null if not present | |
| allocations.allocationReference | |||
| allocations.binId | |||
| allocations.subBinId | |||
| allocations.productId | |||
| allocations.batchId | |||
| allocations.expiry | |||
| allocations.stockOwner | |||
| allocations.quantity | |||
| tasks | Object Array | If allocations is null, tasks will also be null | |
| tasks.taskId | |||
| tasks.externalReference | |||
| tasks.status | |||
| tasks.productId | |||
| tasks.batchId | |||
| tasks.expiry | |||
| tasks.stockOwner | |||
| tasks.requestedQuantity | |||
| tasks.allocatedQuantity | |||
| tasks.pickedQuantity | |||
| hardSync | boolean | ||
| portId | String | Port/workstation identifier | |
| operator | String | Operator who performed inspection/internal wcs process that made the adjustment. | |
| createdAt | Long | Timestamp as Unix epoch milliseconds indicating when the sync event was created | |
| stockLabelKey | String | The stock label/bucket to move stock into (e.g. available, damaged, held, qcInvestigation) | Valid values: available, qcInvestigation, qaInvestigation, positiveRelease, damaged, damagedOnArrival, damagedAtPick, damagedAtRebin, damagedAtPack, damagedAtSinglesPack, kitting, productionRecall, productRework, warehouseTransfer, inboundDiscrepancy, held |
Example Request Body
{ "productId": "ABC123", "batchId": "BATCH-2024-11", "expiry": "2025-06-01", "stockOwner": "THG", "subBinId": "1234-11", "hardSync": false, "portId": "1", "operator": "john.doe", "createdAt": 1701432000000, "stockLabelKey": "available", "bins": [ { "binId": "1234", "subBinId": "1234-11", "contentCode": "11", "markedNotEmpty": false, "productMisMatch": false, "markedEmptyAtPick": false, "heldExternally": false, "binLines": [ { "subBinId": "1234-11", "productId": "ABC123", "batchId": "BATCH-2024-11", "expiryDate": "2025-06-01", "stockOwner": "THG", "availableQuantity": 485.0, "allocatedQuantity": 23.0 } ] } ], "allocations": [ { "allocationReference": "ALLOC-001", "binId": "1234", "subBinId": "1234-11", "productId": "ABC123", "batchId": "BATCH-2024-11", "expiry": "2025-06-01", "stockOwner": "THG", "quantity": 23.0 } ], "tasks": [ { "taskId": "123456", "externalReference": "EXT-REF-001", "status": "ALLOCATED", "productId": "ABC123", "batchId": "BATCH-2024-11", "expiry": "2025-06-01", "stockOwner": "THG", "requestedQuantity": 25.0, "allocatedQuantity": 23.0, "pickedQuantity": 0.0 } ]}Expected Responses
Section titled “Expected Responses”200: Stock sync accepted
{ "message": "Success"}400: Invalid request data
{ "message": "Bad Request"}401: Authentication failed
{ "message": "Unauthorized"}