Delivery Solutions

Get Order by External ID

The "Get Order by External ID" API allows retrieval of an order using a unique external ID, optionally forcing an update to fetch the latest order details from the provider (if supported), returning the order data with possible error information, and uses HTTP status codes 200, 400, or 404 to indicate success or failure.

Using External ID

External ID needs to be unique to use this API.

HTTP Response

Please see the Order documentation for details on the response structure.

Force Update

In a Get Order request, there may be fields that are updated at the Provider's end but not in Delivery Solutions.

In case of force update, Delivery Solutions will fetch the latest updates from the Provider and update the relevant fields. Any errors encountered during fetch updates will be mentioned in the errors property in the Get Order API response along with the reason for failure.

If any information or status of the order is updated, it will be notified through the configured communication mediums such as webhooks, notifications, etc.

This is currently supported by a few providers only. If a provider does not support fetch updates operation, data present in Delivery Solutions will be returned.

Parameters

  • orderExternalId (string, required): The external Id passed in Create Order call as orderExternalId.
  • forceUpdate (boolean): To retrieve the latest information from the provider about the order, this field should be assigned true.

HTTP Status Codes

  • 200: Success
  • 400: Bad Request
  • 404: Not Found

Example Request

Shell

curl --request GET \
     --url https://sandbox.api.deliverysolutions.co/api/v2/order/getById/orderExternalId/orderExternalId \
     --header 'accept: application/json' \
     --header 'tenantId: YOUR_TENANT_ID' \
     --header 'x-api-key: YOUR_API_KEY' \
     --header 'x-compression: true'

You can use the Try It! feature to start a request and see the response.