Inventory Catalogue Workflow Interface Contracts
Interface Contract
Changed on:
27 Nov 2024
Detailed Description
The below Interface Contracts document the interaction points with the Inventory Catalogue workflow. These allow you to ensure that any integration made into the workflow will enable the workflow to work correctly.
Item Definition
UpdateInventoryQty Event
This event is used anytime an external (anything from outside this workflow) creation of inventory quantities is triggered.Request Payload
| Property | Description | Type | Required? |
| items | The list of items whose inventory positions to be updated | List | Required |
| Property | Description | Type | Required? | Notes |
| fulfilmentId | The fulfilment ID against which the inventory quantities are to be created/updated | String | Required | |
| skuRef | The SKU reference of the inventory position | String | Required | |
| locationRef | The SKU reference of the inventory position | String | Required | |
| reservedQty | The count of RESERVED quantities | Int | Required | Only required when reserve stock |
| correctionQty | The count of CORRECTED quantities | Int | Required | Only required when confirm a fulfilment |
| saleQty | The count of SALE quantities | Int | Required | Only required when confirm a fulfilment |
| cancelQty | The count of CANCELLED quantities | Int | Required | Only required when cancel a fulfilment |
Event Request Example
1{
2 "name": "UpdateInventoryQty",
3 "retailerId": "<retailerId>",
4 "entityRef": "<IC_ref>",
5 "entityType": "INVENTORY_CATALOGUE",
6 "entitySubtype": "<IC_type>",
7 "rootEntityType": "INVENTORY_CATALOGUE",
8 "rootEntityRef": "<IC_ref>",
9 "attributes": {
10 "items": [
11 {
12 "skuRef": "<skuRef>",
13 "locationRef": "<locationRef>",
14 "fulfilmentId": "100",
15 "quantity": 0,
16 "reserveQty": "-5",
17 "correctionQty": 0,
18 "saleQty": 0
19 }
20 ]
21 }
22}`
`InventoryChanged Event
This event is generated by the Inventory Batch API.WarningAny need to trigger an InventoryChanged update should only be done via the Batch API.Request Payload
| Property | Description | Type | Required? |
| inventoryPosition | The inventory position that has changed | Object | Required |
`inventoryPosition` Definition| Property | Description | Type | Required | Notes |
`ref` | The inventory position reference | String | Optional | Format: `locationRef:productRef` |
`productRef` | The product reference associated with the inventory position | String | Required | |
`locationRef` | The location reference associated with the inventory position | String | Required | |
`qty` | The quantity associated with the inventory position | Integer | Required | |
`correctedQty` | The corrected quantity | Integer | Optional | |
`inventoryQuantity` | Additional inventory quantity data | Object | Optional | Contains custom quantity details and attributes |
`inventoryQuantity` Definition
| Property | Description | Type | Required | Notes |
`qty` | Quantity of the custom inventory quantity | Integer | Optional | |
`ref` | Reference for the custom inventory quantity | String | Optional | |
`type` | Type of the custom inventory quantity | String | Optional | E.g., `"PURCHASE_ORDER"` |
`status` | Status of the custom inventory quantity | String | Optional | E.g., `"ACTIVE"` |
`attributes` | Custom attributes for the custom inventory quantity | Object | Optional | Contains key-value pairs for additional data |
1{
2 "name": "InventoryChanged",
3 "accountId": "<accountId>",
4 "retailerId": "<retailerId>",
5 "entityRef": "<inventoryCatalogRef>",
6 "entityType": "INVENTORY_CATALOGUE",
7 "entitySubtype": "<inventoryCatalogType>",
8 "rootEntityType": "INVENTORY_CATALOGUE",
9 "rootEntityRef": "<inventoryCatalogRef>",
10 "source": "your-batch-source", // Optional
11 "attributes": {
12 "inventoryPosition": {
13 "ref": "LOC1:SKU1", // Optional, format: "locationRef:productRef"
14 "productRef": "SKU1",
15 "locationRef": "LOC1",
16 "qty": 40,
17 "correctedQty": 0, // Optional
18 "inventoryQuantity": { // Optional
19 "qty": 40, // Optional
20 "ref": "SKU1:LOC1:DEFAULT", // Optional
21 "type": "PURCHASE_ORDER", // Optional
22 "status": "ACTIVE", // Optional
23 "attributes": {
24 "expectedOn": "2024-11-30T00:00:00.00Z", // Optional
25 "storageAreaRef": "LOC1-SR2", // Optional
26 "condition": "NEW" // Optional
27 }
28 }
29 }
30 }
31}
32