#
Webhooks
#
Introduction
To receive real-time updates on the status of orders placed through your app, you can provide a webhook URL in the Armada delivery Merchant Dashboard or via API branch managements.
This is an example sequence diagram illustrating the process from order creation to dispatching to the driver:
sequenceDiagram participant Client participant "Our API" as API participant "Merchant Dashboard" as Dashboard participant "Webhook URL" as Webhook participant Driver Client->>API: Send order API->>Dashboard: Order appears API->>Webhook: Send webhook with status "Pending" Webhook-->>API: Confirmation received Driver->>API: Accept order API->>Webhook: Send webhook with status "Dispatched" Webhook-->>API: Confirmation received API->>Dashboard: Update status to "Dispatched" Dashboard-->>Client: Order status updated
#
Status
Get real-time updates on order status changes with our API, which sends instant notifications by a POST request
to your webhook URL whenever there's a change.
Here is a table of statuses:
#
Payload
Upon each status change, you will receive the following information:
In headers:
Authorization
: The value of yourorder-webhook-key
you provide when you create the order (see order creation).
The body:
code
: Identifier for the delivery within Armada StringdeliveryFee
: Cost of the delivery Numberamount
: Order amount set by the merchant NumbercustomerAddress
: Address generated by Armada based on platform data StringcustomerLocation
: Customer's geographical coordinates Objectlatitude
: Latitude Numberlongitude
: Longitude Number
customerName
: Customer's name StringcustomerPhone
: Customer's phone number StringorderStatus
: Status of the order StringestimatedDistance
: Estimated distance from pickup to customer location (in meters) NumberestimatedDuration
: Estimated duration from pickup to customer location (in seconds) Numberdriver
: Information about the assigned driver:name
: Driver's name StringphoneNumber
: Driver's phone number Stringlatitude
: Driver's latitude Numberlongitude
: Driver's longitude Number
trackingLink
: URL for tracking delivery progress URLqrCodeLink
: URL for the delivery QR code, used for scanning URLorderCreatedAt
: Date and time of delivery creation ISO Datecurrency
: Currency used for the delivery String
#
Example
Header
Authorization: vE6gH8Rt2L1sK9w
Body
{
"code": "B1983149DA",
"deliveryFee": 2,
"amount": 5,
"customerAddress": "Al-Adan, Block 5, St 104",
"customerLocation": {
"latitude": 29.22536,
"longitude": 48.07328
},
"customerName": "mohamed",
"customerPhone": "51234567",
"orderStatus": "dispatched",
"estimatedDistance": 24144,
"estimatedDuration": 1788.2890000000002,
"driver": {
"name": "Anagipura Roshan",
"phoneNumber": "10102005",
"latitude": 29.372146666666662,
"longitude": 47.988613333333326
},
"trackingLink": "https://sandbox.tracking.armadadelivery.com/5400bb82-5550-414c-b63f-78b96da68c58",
"qrCodeLink": "https://armada-sand.s3.eu-central-1.amazonaws.com/qrCodes/51ecc71c0a57295370672190a13a4667.svg",
"orderCreatedAt": "2024-02-22T12:49:43.409Z",
"currency": "KWD"
}