It's possible that an order you inject in via the API might get split into multiple orders. This could happen if there isn't enough stock or the order is allocated to be despatched from multiple warehouses etc.
If this happens on Order creation you'll get multiple order ids back in the Create Order Response call
e.g.
[
{
"OrderId": 1,
"DropShipOrderId": 0,
"OrderNumber": "OrderNumber1",
"Success": true,
"OrderStatusId": 1,
"OrderStatus": "NEW",
"Message": "string"
},
{
"OrderId": 2,
"DropShipOrderId": 0,
"OrderNumber": "OrderNumber1",
"Success": true,
"OrderStatusId": 5,
"OrderStatus": "ONBACKORDER",
"Message": "string"
}
]
So you then you know you need to track of listen out for orders relating to those OrderIds supplied.
What if an order is split at a later point ?
It's also possible for the order to be split into multiple parts a point in the future so you wouldn't know that the order has been split.
You could deal with this in two ways:
1 - Register a Split webhook so you get callbacked when a split occured
See seperate guide on webhooks - Split Webhooks
2 - Use the API to look for splits manually if you notice all the items on the order haven't been despatch or are now in multiple parts. You could call the Order/{id}/Splits API which would return any splits that had happened to that order
You'll get JSON containing the orginal order and the new split order with all the details you need to see how the order has been split
[{
"Order": {}, // Full Details of the Order
"SplitOrder": {}, // Full Details of the Split Order
"OrderId": 78025,
"SplitOrderId": 78026,
"ID": 1,
"LastUpdated": "2020-10-05T23:36:31.5231781",
"LastUpdatedByUser": "groveslu"
}]
Comments
0 comments
Article is closed for comments.