Webhooks
The Logistics Plus Warehouse API allows real-time communication between our API and your ERP system. The webhook interface will send real-time updates on warehouse receives and orders. This document outlines the JSON format for both webhook types you can use to prepare your system to properly handle receiving requests.
Webhook Endpoint Requirements
To receive webhook updates from the Logistics Plus Warehouse API, your endpoint should meet the following requirements:
Accepted HTTP Method: POST Accepted Content-Type: application/json Authentication: Headers or query parameters can be used for authentication. Endpoints: Different endpoints for orders and receives can be used or one endpoint for both data types.
The webhook data will be sent to your specified endpoint as a JSON payload, containing information about the order or receive updates. Your endpoint should return a 200 response when successful and the response data should only contain JSON. If a non-200 response is returned the webhook will be retried at a later time. The maximum number of retries is configurable, but it is recommended to handle retries gracefully.
The webhook endpoint must be idempotent, meaning that it should be able to handle duplicate JSON payloads received from the webhook provider. This can occur when a network disconnect happens before the response can be sent, but after it has been received by the upstream system. If a duplicate payload is received, the endpoint should return a 200 status code and process the payload accordingly without creating duplicate records or performing any other unintended actions.
Receives
This webhook is triggered when we receive a shipment from a supplier and the products are added to our inventory. The JSON payload for a receive webhook includes information such as the warehouse code, primary reference, secondary reference, ETA, transport reference, ship from address, receive lines, and additional references.
Sample JSON Payload
{
"id": "083d0000-56b8-0050-8494-08db3a2e6e9f",
"dateCreated": "2023-04-11T01:45:30+00:00",
"dateSent": "2023-04-11T01:45:30+00:00",
"entityType": "Receive",
"topic": "WAREHOUSE_SHIPMENT_FIN",
"data": {
"id": "6434b6ccdd3283f909d1b990",
"dateCreated": "2023-04-11T01:24:28+00:00",
"dateLastUpdated": "2023-04-11T01:31:35+00:00",
"warehouseCode": "LAW",
"primaryReference": "12345678",
"secondaryReference": "PO00001234",
"status": "FIN",
"eta": "2023-05-01T10:00:00+00:00",
"transportReference": "PRO123456",
"shipFromAddress": {
"address": {
"organization": "ABC Distributors",
"addressLine1": "123 Main Street",
"addressLine2": "",
"country": "USA",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Doe",
"phoneNumber": "123-456-7890",
"mobileNumber": "",
"faxNumber": "",
"emailAddress": "john.doe@abcdistributors.com"
}
},
"receiveLines": [
{
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "APL-IPH-13PRO-256-GRPH",
"quantity": 100,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
},
{
"lineNumber": "2",
"externalLineReference": "002",
"productCode": "SAM-GS22ULTRA-SILCASE-BLK",
"quantity": 50,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
},
{
"lineNumber": "3",
"externalLineReference": "003",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 25,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
}
],
"additionalReferences": [
{
"key": "INV",
"value": "INV12345"
}
],
"shipments": [
{
"id": "6434b6cfdd3283f909d1b991",
"dateCreated": "2023-04-11T01:24:31+00:00",
"dateLastUpdated": "2023-04-11T01:31:35+00:00",
"warehouseCode": "LAW",
"primaryReference": "12345678",
"secondaryReference": "PO00001234",
"status": "FIN",
"totalQuantity": 0,
"trackingDetail": {
"serviceLevelCode": "",
"trackingNumber": "PRO123456"
},
"shipFromAddress": {
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "",
"country": "US",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Doe",
"phoneNumber": "123-456-7890",
"emailAddress": "john.doe@abcdistributors.com"
}
},
"receiveLines": [
{
"sublines": [],
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "APL-IPH-13PRO-256-GRPH",
"quantity": 100.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
},
{
"sublines": [],
"lineNumber": "2",
"externalLineReference": "002",
"productCode": "SAM-GS22ULTRA-SILCASE-BLK",
"quantity": 50.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
},
{
"sublines": [],
"lineNumber": "3",
"externalLineReference": "003",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 25.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
}
],
"additionalReferences": [
{
"key": "INV",
"value": "INV12345"
}
],
"milestones": [
{
"code": "WHE",
"description": "Created",
"sequence": "1",
"actualDate": "2023-04-11T01:24:30+00:00"
},
{
"code": "FIN",
"description": "Finalized",
"sequence": "6",
"actualDate": "2023-04-11T01:31:25+00:00"
}
]
}
]
}
}
Orders
This webhook is triggered when we release a shipment from the warehouse. The JSON payload for a order webhook includes information such as the warehouse code, primary reference, secondary reference, transport reference, ship to address, order lines, and packing information.
Sample JSON Payload
{
"id": "9c650000-56b8-0050-8692-08db3a398fa5",
"dateCreated": "2023-04-11T03:05:09+00:00",
"dateSent": "2023-04-11T03:05:10+00:00",
"entityType": "Order",
"topic": "WAREHOUSE_SHIPMENT_FIN",
"data": {
"id": "6434b6ccdd3283f909d1b990",
"dateCreated": "2023-04-11T01:24:28+00:00",
"dateLastUpdated": "2023-04-11T01:31:35+00:00",
"warehouseCode": "LAW",
"primaryReference": "12345678",
"secondaryReference": "PO00001234",
"status": "FIN",
"eta": "2023-05-01T10:00:00+00:00",
"transportReference": "PRO123456",
"shipFromAddress": {
"address": {
"organization": "ABC Distributors",
"addressLine1": "123 Main Street",
"addressLine2": "",
"country": "USA",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Doe",
"phoneNumber": "123-456-7890",
"mobileNumber": "",
"faxNumber": "",
"emailAddress": "john.doe@abcdistributors.com"
}
},
"receiveLines": [
{
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "APL-IPH-13PRO-256-GRPH",
"quantity": 100,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
},
{
"lineNumber": "2",
"externalLineReference": "002",
"productCode": "SAM-GS22ULTRA-SILCASE-BLK",
"quantity": 50,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
},
{
"lineNumber": "3",
"externalLineReference": "003",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 25,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
}
],
"additionalReferences": [
{
"key": "INV",
"value": "INV12345"
}
],
"shipments": [
{
"id": "6434b6cfdd3283f909d1b991",
"dateCreated": "2023-04-11T01:24:31+00:00",
"dateLastUpdated": "2023-04-11T01:31:35+00:00",
"warehouseCode": "LAW",
"primaryReference": "12345678",
"secondaryReference": "PO00001234",
"status": "FIN",
"totalQuantity": 0,
"trackingDetail": {
"serviceLevelCode": "",
"trackingNumber": "PRO123456"
},
"shipFromAddress": {
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "",
"country": "US",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Doe",
"phoneNumber": "123-456-7890",
"emailAddress": "john.doe@abcdistributors.com"
}
},
"receiveLines": [
{
"sublines": [],
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "APL-IPH-13PRO-256-GRPH",
"quantity": 100.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
},
{
"sublines": [],
"lineNumber": "2",
"externalLineReference": "002",
"productCode": "SAM-GS22ULTRA-SILCASE-BLK",
"quantity": 50.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
},
{
"sublines": [],
"lineNumber": "3",
"externalLineReference": "003",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 25.000,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"holdCode": "",
"partAttributes": []
}
],
"additionalReferences": [
{
"key": "INV",
"value": "INV12345"
}
],
"milestones": [
{
"code": "WHE",
"description": "Created",
"sequence": "1",
"actualDate": "2023-04-11T01:24:30+00:00"
},
{
"code": "FIN",
"description": "Finalized",
"sequence": "6",
"actualDate": "2023-04-11T01:31:25+00:00"
}
]
}
]
}
}