Skip to content

OR14 - Get the status of an asynchronous order export.

Request

Description

Use this API to query the order export status after an API OR13 call.
Until the export via API OR13 is complete, the status returned by API OR14 is PENDING.
You must call API OR14 until you get the COMPLETED status which correspond to a completed and successful export from API OR13.
The URLs in API OR14 response contain all the files from API OR13 export.
Browse those urls and query them using the GET method.
In case of error, the status is FAILED.
In case of export canceled, the status is CANCELED.

Call Frequency
Maximum usage: Every 2 seconds per OR13 call, until COMPLETED status is received
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_ORDER_READ)
Path
tracking_idstringrequired

Id of the previously created asynchronous order export

Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

curl -i -X GET \
  'https://your-instance.mirakl.net/api/orders/async-export/status/{tracking_id}?shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Order asynchronous export tracking polling success

Bodyapplication/json
last_updatedstring, (date-time)required

The last updated date of the export

statusstringrequired

Current status of the export, can be 'PENDING', 'FAILED', or 'COMPLETED'

urlsArray of strings

List of generated URLs to call to download each generated chunks

Response
{ "last_updated": "2022-08-18T15:20:22.906Z", "status": "COMPLETED", "urls": [ "http://host:123/api/3f9edb57-9d8b-41e0-8b77-88d90caf7013?file=fileA", "http://host:123/api/3f9edb57-9d8b-41e0-8b77-88d90caf7013?file=fileB" ] }