Besides webhook delivery of events you can also poll for changes in the objects that are also delivered by events.
Polling works by issuing a get request to one of the dedicated endpoints in the form
/v3/poll/{objectType}/{version}/{objectId}
For a list of all supported objectType check the OpenApi documentation of REST Polling
You can also poll for the last error/result of executed command by it's id. These statuses are kept only for 24h, after which they are discarded adn 404 will be returned.
While the command is still in pending state, 204 code is returned with no body;
To get the current OrderStatusEvent of a job with id XXXtestOrder
you can GET:
/v3/poll/job/*/XXXtestOrder
Here specifying *
for version will result in the payload being generated with the latest supported version. See Versioning for more details on versions.
The output will look like
{
"_v": "1.1.0",
"_eid": "polled",
"_type": "OrderStatusEvent",
"orderId": "XXXtestOrder",
"orderNumber": "O-0000011111",
"externalId": null,
...
}
Generated using TypeDoc