Skip to content
Armada Developers
Deliveries
Core resourcesAPI v2

Deliveries

Create, retrieve, cancel and estimate deliveries. See the API reference for request fields and response schemas.

Permissions and identifiers

OperationPermissionPath identifier
Createdelivery:writeNone
Retrievedelivery:readDelivery code
Canceldelivery:cancelDelivery code
Estimate fee (both endpoints)delivery:writeNone

Store the delivery code returned by creation. Use it for lookup, cancellation and webhook matching.

Create a delivery

Use POST /v2/deliveries. The quickstart includes a complete Node example.

Choose origin_format and destination_format, then supply their matching fields. Pickup from an existing branch uses branch_format and origin.branch_id. Location-based destinations require contact_name, contact_phone, latitude and longitude; first_line is optional.

Set reference to your order reference. Each successful create request creates a new delivery, including requests that reuse the same reference. After a timeout, confirm the outcome before submitting another request.

Retrieve a delivery

Use GET /v2/deliveries/{id} with the code of a delivery created through this API. Statuses include pending, dispatched, accepted, waiting_pack, en_route, completed, failed and canceled. Other statuses can occur, including backup-driver states; handle unrecognized values without discarding the response.

json
{
  "code": "D000000001",
  "status": "pending",
  "test_mode": false,
  "amount": 4.5,
  "created_at": "2026-04-16T18:12:03.117Z",
  "currency": "KWD",
  "delivery_fee": 2,
  "customer": {
    "name": "Example customer",
    "phone": "+96590000000",
    "address": "Salmiya, Kuwait",
    "latitude": 29.3759,
    "longitude": 47.9774
  },
  "driver": {
    "name": "",
    "phone": "",
    "latitude": null,
    "longitude": null
  },
  "logistics": {
    "estimated_distance": 4820,
    "estimated_duration": 743,
    "tracking_url": "https://example.invalid/tracking/customer-link",
    "pickup_qr_url": "https://example.invalid/pickup/qr"
  }
}

Cancel a delivery

Use POST /v2/deliveries/{id}/cancel with the delivery code. Enable delivery:cancel. The JSON body is optional:

json
{ "reason": "Customer requested cancellation" }

A successful cancellation returns 200 and the delivery representation with status: "canceled". Repeating cancellation of a canceled delivery preserves its first reason. An already failed delivery is returned unchanged.

ResultMeaning and next step
200Inspect status in the returned delivery.
400The current state or cancellation policy prevents the operation; a completed delivery cannot be canceled.
409A test delivery changed during cancellation. Read it and retry only if it still needs cancellation.

Live deliveries follow the merchant's cancellation and penalty policy. Simulated test deliveries can be canceled at dispatched, accepted and en_route; the simulator stops advancing a canceled delivery.

To receive the update, select Canceled in the key's saved webhook settings. The topic is order.updated with status: "canceled". After a timeout or other error, retrieve the delivery to confirm its state before retrying.

Estimate a delivery

Use branch_format with origin.branch_id, or location_format with origin coordinates. The destination must use location_format. Contact details are not required for estimates.

json
{
	"origin_format": "branch_format",
	"origin": { "branch_id": "YOUR_BRANCH_ID" },
	"destination_format": "location_format",
	"destination": { "latitude": 29.3759, "longitude": 47.9774 }
}
EndpointResponse fields
POST /v2/deliveries/estimatedelivery_fee, estimated_pickup_at, estimated_delivery_at
POST /v2/deliveries/estimate/staticdeliveryFee, durationToPickup, totalDeliveryDuration

The first endpoint returns timestamps, which can be null when an ETA is unavailable. The static endpoint returns durations in seconds using a fixed pickup allowance. Both calculate the fee using the route and merchant pricing. Estimates do not create a delivery.

Failed deliveries

Read the delivery's current state before taking further action. Contact Armada to arrange another delivery after a failure.

For status notifications, configure webhooks.