This webhook will be called when a stop have been registered. The request from the webhook will look like this:
{
"name": "registerStop",
"sent": "2019-02-05T14:02:46.433Z",
"data": [
{
"routeId": "5b4894a3e215c79fffa4e01a",
"routeReference": "ROUTE-REFERRENCE",
"stopId": "5b4894a3e215c79fffa4e019",
"stopReference": "STOP-REFERENCE",
"registrations": [
{
"orderId": "5b4894a3e215c79fffa3e01a",
"orderReference": "ORDER-REFERENCE",
"cargoId": "5b4894a3e215c79fffa3e019",
"cargoReference": "CARGO-REFERENCE",
"actionType": "pickup",
"success": false,
"ruleReferences": [
{
"ruleReference": "scan"
},
{
"ruleReference": "damage"
}
]
}
]
}
]
}
{
"name": "registerStop",
"sent": "2019-02-05T14:02:46.433Z",
"data": [
{
"routeId": "5b4894a3e215c79fffa4e01a",
"routeReference": "ROUTE-REFERENCE",
"stopId": "5b4894a3e215c79fffa4e019",
"stopReference": "STOP-REFERENCE",
"registrations": [
{
"orderId": "5b4894a3e215c79fffa3e01a",
"orderReference": "ORDER-REFERENCE-1",
"cargoId": "5b4894a3e215c79fffa3e019",
"cargoReference": "CARGO-REFERENCE-1",
"actionType": "pickup",
"success": false,
"ruleReferences": [
{
"ruleReference": "scan"
},
{
"ruleReference": "damage"
}
]
},
{
"orderId": "5b4894a3e215c79fffa3e01b",
"orderReference": "ORDER-REFERENCE-2",
"cargoId": "5b4894a3e215c79fffa3e010",
"cargoReference": "CARGO-REFERENCE-2",
"actionType": "pickup",
"success": true
},
{
"orderId": "5b4894a3e215c79fffa3e01c",
"orderReference": "ORDER-REFERENCE-3",
"cargoId": "5b4894a3e215c79fffa3e219",
"cargoReference": "CARGO-REFERENCE-3",
"actionType": "delivery",
"success": true,
"ruleReferences": [
{
"ruleReference": "scan"
},
{
"ruleReference": "smallDamage"
}
]
}
]
}
]
}
The data is an array containing each stop that have been registered. Each item in the data array contains:
Key | Description |
---|---|
routeId | The id of the route |
routeReference | The reference of the route |
stopId | The id of the stop |
stopReference | The reference of the stop |
registrations | Contains all the registrations for the stop |
The registrations is an array containing each cargo that have been registered on the stop. Each item in the data registrations array contains:
Key | Description |
---|---|
orderId | The id of the order |
orderReference | The reference of the order |
cargoId | The id of the cargo |
cargoReference | The reference of the cargo |
actionType | Can be either pickup or delivery |
success | Tell if the actions went successfully |
ruleReferences | Will contains all the information about which rule items that have been used to register this cargo. |
Each item in the ruleReferences is an object containing reference to which rule item that have been used inside a ruleset.
An example:
{
"ruleReference": "scan"
}