Swiftazu

Orders

Dispatch in bulk

Dispatch up to 100 orders against one pickup address.

POST/v1/orders/dispatch/bulk
Bearer tokenIdempotency-KeyReturns JSONSuccess 200

The answer is always 200 with one result per order. ok: false tells you which orders were not dispatched and why.

Request

Headers

FieldTypeDescription
AuthorizationrequiredstringThe access token from Get token, as "Bearer <token>".
Content-TyperequiredstringAlways application/json when a body is sent.
Idempotency-KeyoptionalstringOptional. Your own unique value for this action (up to 200 characters). Sending the same call again with the same value returns the first result and does nothing a second time.

Request body

FieldTypeDescription
orderIdsrequiredstring[]The ids of the orders to dispatch. 1 to 100.
pickupAddressIdrequiredstringWhere the shipment is collected from, from List pickup addresses.
pickupRequestedFromoptionalstringStart of the pickup window you ask for (ISO 8601, UTC).
pickupRequestedTooptionalstringEnd of the pickup window you ask for (ISO 8601, UTC).
Example request
curl -X POST "https://api.swiftazu.com/v1/orders/dispatch/bulk" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7c2f6f0a-3f55-4f0e-9a51-2a1e3b6c9d10" \
  -d '{
  "orderIds": [
    "dffcd25d-6eb3-4b90-868c-6deca160ad74",
    "30b653a8-e845-425b-85a6-0d2a6f1a5a46"
  ],
  "pickupAddressId": "899caca3-0471-423e-9a90-0add12d7355b"
}'

Response

Example response · 200
{
  "total": 2,
  "dispatched": 1,
  "failed": 1,
  "results": [
    {
      "id": "dffcd25d-6eb3-4b90-868c-6deca160ad74",
      "orderId": "SWZORDYFSADMR",
      "isDemo": true,
      "awbNumber": "DEMONQDJ3W6UDWML",
      "status": "ready_for_pickup",
      "currency": "AED",
      "shippingCharge": "21.60",
      "insurancePremium": "5.00",
      "customsDutyCharge": null,
      "total": "26.60",
      "resolvedTier": 1,
      "outcome": "dispatched",
      "ok": true
    },
    {
      "id": "30b653a8-e845-425b-85a6-0d2a6f1a5a46",
      "orderId": null,
      "ok": false,
      "outcome": "not_found",
      "message": "Order not found."
    }
  ]
}

Errors

HTTPCodeMeaning
400invalid_idempotency_keyThe Idempotency-Key header is empty or longer than 200 characters.
409idempotency_in_progressA call with this key is still running. Retry shortly.
409idempotency_key_reusedThis key was already used for a different call.

Every call can also return the shared errors listed on the Overview page. Overview