{"openapi":"3.1.0","info":{"title":"Dropp Delivery API","version":"1.1.0","summary":"Send deliveries to Errands4Me couriers from your own system.","description":"Create a delivery with a pickup and a drop-off; Dropp prices it, holds the fee from your delivery wallet, and posts it to Errands4Me couriers nearby. You follow it through webhooks or by polling.\n\n**Money.** Every amount is in major units (e.g. `18.81` cedis) of the delivery's `currency`, which is the pickup country's. Deliveries are priced exactly like an Errands4Me errand in that country (distance, the courier's distance to the pickup, surge).\n\n**Countries.** A business operates in its home country. Pickup and drop-off must be in the same country, and it must be one Errands4Me is open in. Multi-country access is granted by Errands4Me support.\n\n**Limits.** 120 requests per minute per API key.","contact":{"name":"Errands4Me developer support","url":"https://errands4me.com/developers"}},"servers":[{"url":"https://dropp-core.smarthivelabs.dev/api","description":"Production"}],"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":[{"name":"Deliveries","description":"Estimate, create, follow and settle deliveries."},{"name":"Webhooks","description":"Delivery events sent to your webhook URL, and their logs."},{"name":"Account","description":"Wallet, API keys and webhook settings. Usually managed in the dashboard."},{"name":"Usage","description":"Your API traffic."},{"name":"Docs","description":"This document."}],"paths":{"/v1/openapi.json":{"get":{"tags":["Docs"],"summary":"This OpenAPI document","security":[],"responses":{"200":{"description":"The spec","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/docs":{"get":{"tags":["Docs"],"summary":"Guides and rendered code samples","security":[],"responses":{"200":{"description":"Guides","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/deliveries/price-estimate":{"get":{"tags":["Deliveries"],"operationId":"estimateDelivery","summary":"Estimate a delivery","description":"The price you would be charged now, in the pickup country's currency, and a `quote_token` that locks it for 15 minutes when passed to *Create a delivery*. Give coordinates, or addresses Dropp can geocode.","parameters":[{"name":"pickup_lat","in":"query","schema":{"type":"number"}},{"name":"pickup_lng","in":"query","schema":{"type":"number"}},{"name":"dropoff_lat","in":"query","schema":{"type":"number"}},{"name":"dropoff_lng","in":"query","schema":{"type":"number"}},{"name":"pickup_address","in":"query","schema":{"type":"string"},"description":"Used when coordinates are missing."},{"name":"dropoff_address","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Price","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"allOf":[{"$ref":"#/components/schemas/Price"},{"type":"object","properties":{"pickup":{"$ref":"#/components/schemas/LatLng"},"dropoff":{"$ref":"#/components/schemas/LatLng"},"sourced":{"type":"object","description":"Whether each end came from coordinates or geocoding."}}}]}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/PricingRefused"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/PricingUnavailable"}}}},"/v1/deliveries":{"post":{"tags":["Deliveries"],"operationId":"createDelivery","summary":"Create a delivery","description":"Prices the delivery, holds the fee from your delivery wallet (in the delivery's currency), creates the courier job and starts matching. Returns `201` with `status: \"dispatched\"`, and sends `delivery.created`.\n\nIf no courier accepts within 30 minutes the fee is returned and `delivery.failed` is sent with `reason: \"matching_timeout\"`, `retryable: true` — create the delivery again to retry.\n\nSend an `Idempotency-Key` so a retried request never creates a second delivery.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeliveryRequest"}}}},"responses":{"201":{"description":"Delivery created and dispatched","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/CreatedDelivery"}}}}},"headers":{"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientBalance"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/PricingRefused"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/PricingUnavailable"}}},"get":{"tags":["Deliveries"],"operationId":"listDeliveries","summary":"List deliveries","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/DeliveryStatus"}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Order code, external_ref, contact name/phone or address."},{"name":"source","in":"query","schema":{"type":"string","enum":["api","all"],"default":"api"},"description":"`api`: deliveries created through the API or dashboard. `all`: also marketplace orders."}],"responses":{"200":{"description":"A page of deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/deliveries/{tracking_id}":{"get":{"tags":["Deliveries"],"operationId":"getDelivery","summary":"Get a delivery","parameters":[{"$ref":"#/components/parameters/TrackingId"}],"responses":{"200":{"description":"The delivery","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Delivery"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/deliveries/{tracking_id}/cancel":{"post":{"tags":["Deliveries"],"operationId":"cancelDelivery","summary":"Cancel a delivery","description":"Only before a courier has accepted it. The held fee goes back to your wallet and `delivery.cancelled` is sent.","parameters":[{"$ref":"#/components/parameters/TrackingId"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"tracking_id":{"type":"string","format":"uuid"},"status":{"const":"cancelled"}}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/deliveries/{tracking_id}/confirm":{"post":{"tags":["Deliveries"],"operationId":"confirmDelivery","summary":"Confirm a delivery","description":"After the courier marks it delivered, their pay waits for your confirmation. Confirming pays them now; if you do nothing (and don't dispute) it is released automatically 24 hours after delivery.","parameters":[{"$ref":"#/components/parameters/TrackingId"}],"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"tracking_id":{"type":"string"},"already_confirmed":{"type":"boolean"}}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/deliveries/{tracking_id}/dispute":{"post":{"tags":["Deliveries"],"operationId":"disputeDelivery","summary":"Dispute a delivery","description":"Report a problem with a delivered order before the courier is paid. Their pay is held until Errands4Me support reviews it.","parameters":[{"$ref":"#/components/parameters/TrackingId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string","enum":["item_not_delivered","wrong_location","damaged","unable_to_contact_carrier","other"]},"details":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"Dispute opened","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"tracking_id":{"type":"string"},"dispute_status":{"const":"flagged"},"already_disputed":{"type":"boolean"}}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/webhooks/logs":{"get":{"tags":["Webhooks"],"operationId":"listWebhookLogs","summary":"Webhook delivery attempts","description":"Every attempt to reach your webhook URL, newest first, with the status code your server returned.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100,"default":20}}],"responses":{"200":{"description":"Attempts","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookLog"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/usage":{"get":{"tags":["Usage"],"operationId":"getUsage","summary":"API usage summary","responses":{"200":{"description":"Counts and latency for the last 24 h / 7 d / 30 d","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/usage/requests":{"get":{"tags":["Usage"],"operationId":"listUsageRequests","summary":"Recent API requests","responses":{"200":{"description":"Request log","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"array","items":{"type":"object"}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/wallet":{"get":{"tags":["Account"],"operationId":"getWallet","summary":"Delivery wallet balance","description":"Your home-currency wallet, plus `wallets` with every currency you hold (multi-country businesses have one per currency).","parameters":[{"name":"currency","in":"query","schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"Wallet","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Wallet"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/wallet/transactions":{"get":{"tags":["Account"],"operationId":"listWalletTransactions","summary":"Wallet transactions","responses":{"200":{"description":"Transactions","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"array","items":{"type":"object"}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/keys":{"get":{"tags":["Account"],"operationId":"listKeys","summary":"List API keys","description":"Only the key prefix is ever returned.","responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"tags":["Account"],"operationId":"createKey","summary":"Create an API key","description":"The full key is in this response only. Store it in a secrets manager.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Key created","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"key":{"type":"string"},"warning":{"type":"string"}}}]}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/keys/{id}":{"delete":{"tags":["Account"],"operationId":"revokeKey","summary":"Revoke an API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/ApiKey"}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/settings/webhook":{"get":{"tags":["Account"],"operationId":"getWebhookSettings","summary":"Webhook URL and signing secret","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"webhook_url":{"type":["string","null"]},"webhook_secret":{"type":["string","null"]}}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"tags":["Account"],"operationId":"updateWebhookSettings","summary":"Set the webhook URL or rotate the secret","description":"HTTPS only. A secret is created the first time a URL is set.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_url":{"type":["string","null"],"format":"uri"},"rotate_secret":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"webhook_url":{"type":["string","null"]},"webhook_secret":{"type":["string","null"]},"secret_rotated":{"type":"boolean"}}}}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"webhooks":{"delivery.created":{"post":{"summary":"The delivery was created, its fee held, and couriers are being matched.","description":"The delivery was created, its fee held, and couriers are being matched.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.assigned":{"post":{"summary":"A courier accepted and is heading to the pickup (carrier name and phone included).","description":"A courier accepted and is heading to the pickup (carrier name and phone included).\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.unassigned":{"post":{"summary":"The courier dropped the job; it is back with couriers nearby. Your fee stays held.","description":"The courier dropped the job; it is back with couriers nearby. Your fee stays held.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.picked_up":{"post":{"summary":"The courier has the package and is on the way to the drop-off.","description":"The courier has the package and is on the way to the drop-off.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.delivered":{"post":{"summary":"The courier marked it delivered. Confirm it (or it auto-confirms after 24 hours).","description":"The courier marked it delivered. Confirm it (or it auto-confirms after 24 hours).\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.cancelled":{"post":{"summary":"Cancelled by you or by Errands4Me. The held fee was returned to your wallet.","description":"Cancelled by you or by Errands4Me. The held fee was returned to your wallet.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"delivery.failed":{"post":{"summary":"It could not be completed. `reason: matching_timeout` with `retryable: true` means no courier accepted in time and the fee was returned.","description":"It could not be completed. `reason: matching_timeout` with `retryable: true` means no courier accepted in time and the fee was returned.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"order.paid":{"post":{"summary":"A marketplace order was paid. `data` carries `order_id`, `order_code`, `total`, `currency`, `fulfillment_method` and `items`.","description":"A marketplace order was paid. `data` carries `order_id`, `order_code`, `total`, `currency`, `fulfillment_method` and `items`.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"order.ready":{"post":{"summary":"You marked a pickup (or customer-arranged delivery) order ready.","description":"You marked a pickup (or customer-arranged delivery) order ready.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"order.collected":{"post":{"summary":"The customer collected a pickup order.","description":"The customer collected a pickup order.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"order.cancelled":{"post":{"summary":"A paid order was cancelled. Any refund follows as `refund.issued`.","description":"A paid order was cancelled. Any refund follows as `refund.issued`.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"refund.issued":{"post":{"summary":"A customer was refunded to their Dropp wallet. `data` carries `refund_id`, `order_id`, `amount`, `currency` and `origin`.","description":"A customer was refunded to their Dropp wallet. `data` carries `refund_id`, `order_id`, `amount`, `currency` and `origin`.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"payout.requested":{"post":{"summary":"A withdrawal of your earnings was requested. `data` carries `payout_id`, `amount`, `net_amount` and `currency`.","description":"A withdrawal of your earnings was requested. `data` carries `payout_id`, `amount`, `net_amount` and `currency`.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"payout.paid":{"post":{"summary":"A withdrawal reached your payout account.","description":"A withdrawal reached your payout account.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"payout.failed":{"post":{"summary":"A withdrawal could not be sent to your payout account. Check the account details.","description":"A withdrawal could not be sent to your payout account. Check the account details.\n\nHeaders: `X-DaaS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your webhook secret>`, `X-DaaS-Event`, `X-DaaS-Delivery-Id` (same on every retry — dedupe on it), `X-DaaS-Timestamp`. `X-DaaS-Signature-Legacy: sha256=<HMAC of the body>` is also sent for older receivers and will be removed.\n\nReject a `t` more than 5 minutes from your clock. Answer 2xx within 10 seconds; otherwise we retry immediately, after 1 min, after 5 min, after 30 min, after 2 h, after 12 h.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"`em_live_` + 64 hex characters, from the dashboard."},"Bearer":{"type":"http","scheme":"bearer","description":"The API key as a Bearer token (same key), or a dashboard session."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","schema":{"type":"string","pattern":"^[A-Za-z0-9_\\-:.]{1,255}$"},"description":"Your unique id for this request (e.g. your order id). Retrying with the same key and body returns the first response; a different body is refused with `IDEMPOTENCY_CONFLICT`. Kept 24 hours."},"TrackingId":{"name":"tracking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}},"headers":{"IdempotentReplayed":{"description":"`true` when this response is a replay of an earlier request with the same Idempotency-Key.","schema":{"type":"string"}},"RateLimit":{"description":"Limit, remaining and reset (`RateLimit-*` and `X-RateLimit-*`).","schema":{"type":"string"}}},"responses":{"ValidationError":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"code":"VALIDATION_ERROR","error":"Required: dropoff_address","fields":[{"field":"dropoff_address","message":"is required"}]}}}},"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"code":"UNAUTHORIZED","error":"Unauthorized"}}}},"Forbidden":{"description":"Plan or key scope does not allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"code":"PLAN_NOT_SUPPORTED","error":"…"}}}},"NotFound":{"description":"Not found (or not yours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"code":"NOT_FOUND","error":"Delivery not found"}}}},"Conflict":{"description":"State conflict: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `DUPLICATE_EXTERNAL_REF` (`data.tracking_id` is the existing delivery), `QUOTE_EXPIRED` (with the current `data.price`), `ORDER_NOT_CANCELLABLE`, `NOT_DELIVERED`, `DELIVERY_UNDER_REVIEW`, `NOT_DISPUTABLE`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientBalance":{"description":"Your wallet in this delivery's currency can't cover it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"code":"INSUFFICIENT_BALANCE","error":"Insufficient wallet balance","data":{"required":18.81,"current_balance":5,"currency":"GHS"}}}}},"PricingRefused":{"description":"Can't be delivered: `COORDS_REQUIRED` (400), `COUNTRY_NOT_AVAILABLE`, `CROSS_BORDER_NOT_SUPPORTED`, `COUNTRY_NOT_ALLOWED`, `PICKUP_NOT_ON_MAP`, `DROPOFF_NOT_ON_MAP`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PricingUnavailable":{"description":"Pricing is temporarily unavailable (`PRICING_UNAVAILABLE`). Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"More than 120 requests in a minute (`RATE_LIMITED`). Wait `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Something went wrong on our side. Safe to retry with the same Idempotency-Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["success","error"],"properties":{"success":{"const":false},"error":{"type":"string","description":"Readable message."},"code":{"type":"string","description":"Stable machine code — branch on this."},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"data":{"type":"object"}}},"LatLng":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"Money":{"type":"number","description":"Major units of `currency` (e.g. 18.81)."},"Price":{"type":"object","required":["total","currency"],"properties":{"total":{"$ref":"#/components/schemas/Money"},"currency":{"type":"string","description":"ISO 4217, the pickup country's (GHS, NGN, KES…)."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 of the pickup."},"distance_km":{"type":"number"},"straight_line_km":{"type":"number"},"estimated_duration_minutes":{"type":"integer"},"base_fee":{"$ref":"#/components/schemas/Money"},"distance_fee":{"$ref":"#/components/schemas/Money"},"breakdown":{"type":"object","properties":{"base_fee":{"$ref":"#/components/schemas/Money"},"distance_fee":{"$ref":"#/components/schemas/Money"},"weight_fee":{"$ref":"#/components/schemas/Money"},"urgency_surcharge":{"$ref":"#/components/schemas/Money"},"carrier_pickup_fee":{"$ref":"#/components/schemas/Money"},"surge_amount":{"$ref":"#/components/schemas/Money"}}},"quote_token":{"type":"string","description":"Pass to *Create a delivery* within 15 minutes to be charged this exact total."},"expires_at":{"type":"string","format":"date-time"}}},"CreateDeliveryRequest":{"type":"object","required":["pickup_address","dropoff_address","dropoff_contact_name","dropoff_contact_phone"],"properties":{"external_ref":{"type":"string","description":"Your own reference (order id). Unique per business: reusing one returns 409 `DUPLICATE_EXTERNAL_REF` with the existing `tracking_id`."},"pickup_address":{"type":"string"},"pickup_lat":{"type":"number"},"pickup_lng":{"type":"number"},"pickup_contact_name":{"type":"string","description":"Shown to the assigned courier."},"pickup_contact_phone":{"type":"string","description":"E.164 preferred (+233…); local numbers are read in the pickup's country."},"dropoff_address":{"type":"string"},"dropoff_lat":{"type":"number"},"dropoff_lng":{"type":"number"},"dropoff_contact_name":{"type":"string","description":"Shown to the assigned courier only."},"dropoff_contact_phone":{"type":"string"},"package_description":{"type":"string"},"package_weight":{"type":"string"},"package_fragile":{"type":"boolean","default":false},"special_instructions":{"type":"string","description":"For the courier."},"quote_token":{"type":"string","description":"From an estimate ≤15 minutes old for the same route: charge that price. Expired or different route → 409 `QUOTE_EXPIRED` with the current price."},"metadata":{"type":"object","description":"Your own data, returned on reads (max 8 KB). Keys starting `delivery_`, `dispatch_`, `price_`… are reserved and dropped."}}},"CreatedDelivery":{"type":"object","properties":{"tracking_id":{"type":"string","format":"uuid","description":"Use this id for every later call."},"errand_id":{"type":"string","format":"uuid"},"status":{"const":"dispatched"},"auto_accepted":{"type":"boolean","description":"A courier took it instantly."},"price":{"$ref":"#/components/schemas/Price"},"order_code":{"type":"string"},"external_ref":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"DeliveryStatus":{"type":"string","enum":["pending","dispatched","assigned","in_progress","delivered","cancelled","failed"],"description":"`dispatched` looking for a courier · `assigned` courier on the way to pickup · `in_progress` picked up · `delivered` · `cancelled` · `failed` · `pending` matching timed out (fee returned; create again)."},"Delivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tracking_id":{"type":"string","format":"uuid"},"order_code":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/DeliveryStatus"},"fulfillment_status":{"type":["string","null"]},"errand_id":{"type":["string","null"]},"pickup_address":{"type":"string"},"pickup_lat":{"type":["number","null"]},"pickup_lng":{"type":["number","null"]},"pickup_contact_name":{"type":["string","null"]},"pickup_contact_phone":{"type":["string","null"]},"dropoff_address":{"type":"string"},"dropoff_lat":{"type":["number","null"]},"dropoff_lng":{"type":["number","null"]},"dropoff_contact_name":{"type":"string"},"dropoff_contact_phone":{"type":"string"},"package_description":{"type":["string","null"]},"price":{"type":["string","null"],"description":"The charged delivery fee (decimal string)."},"currency":{"type":"string"},"carrier_payment_status":{"type":["string","null"],"description":"`awaiting_confirmation` after delivery until confirmed/auto-released, then `released`."},"dispute_status":{"type":["string","null"]},"dispatch_error":{"type":["string","null"]},"metadata":{"type":"object","description":"Your own metadata."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"}}},"Wallet":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"string","description":"Decimal string, major units."},"currency":{"type":"string"},"wallets":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"balance":{"type":"number"}}}}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"last_used_at":{"type":["string","null"]},"revoked_at":{"type":["string","null"]},"created_at":{"type":"string"}}},"WebhookLog":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["delivery.created","delivery.assigned","delivery.unassigned","delivery.picked_up","delivery.delivered","delivery.cancelled","delivery.failed","order.paid","order.ready","order.collected","order.cancelled","refund.issued","payout.requested","payout.paid","payout.failed"]},"order_id":{"type":["string","null"]},"delivery_id":{"type":["string","null"],"description":"The event's X-DaaS-Delivery-Id."},"payload":{"type":"object"},"webhook_url":{"type":"string"},"response_status":{"type":["integer","null"]},"attempt":{"type":"integer"},"success":{"type":"boolean"},"error_message":{"type":["string","null"]},"created_at":{"type":"string"}}},"WebhookEvent":{"type":"object","required":["id","event","delivery_id","timestamp","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Same as X-DaaS-Delivery-Id."},"event":{"type":"string","enum":["delivery.created","delivery.assigned","delivery.unassigned","delivery.picked_up","delivery.delivered","delivery.cancelled","delivery.failed","order.paid","order.ready","order.collected","order.cancelled","refund.issued","payout.requested","payout.paid","payout.failed"]},"delivery_id":{"type":"string","description":"The delivery's tracking_id."},"business_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"tracking_id":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/DeliveryStatus"},"errand_id":{"type":"string"},"carrier_name":{"type":"string","description":"delivery.assigned onwards."},"carrier_phone":{"type":"string"},"price":{"$ref":"#/components/schemas/Price"},"reason":{"type":"string","description":"delivery.failed: e.g. `matching_timeout`."},"retryable":{"type":"boolean"},"order_id":{"type":"string","description":"order.* and refund.issued."},"order_code":{"type":"string"},"total":{"type":"string","description":"order.paid."},"currency":{"type":"string"},"fulfillment_method":{"type":"string"},"items":{"type":"array","items":{"type":"object"},"description":"order.paid: name, quantity, unit_price."},"refund_id":{"type":"string","description":"refund.issued."},"origin":{"type":"string","description":"refund.issued: buyer_request, seller_cancelled, delivery_failed or staff."},"payout_id":{"type":"string","description":"payout.*."},"amount":{"type":"string"},"net_amount":{"type":"string","description":"payout.*: what reaches your account after the transfer fee."}}}},"example":{"id":"0f5b8c1e-6a52-4c9e-9a51-2c0d8d1f6e11","event":"delivery.assigned","delivery_id":"b01c2406-0f92-47e1-8777-7bad8633e31f","business_id":"5d1f…","timestamp":"2026-11-21T10:15:00.000Z","data":{"tracking_id":"b01c2406-0f92-47e1-8777-7bad8633e31f","external_ref":"ORDER-1042","status":"assigned","errand_id":"7f13…","carrier_name":"Yaw Boateng","carrier_phone":"233200000009"}}}}}}