Cancelled (cancelled)
POST https://my-api.example.com/first-delivery/webhook
status_v3: cancelled · status: Cancelled
The order was cancelled. Terminal for that delivery lifecycle.
The payload is intentionally minimal: orderNumber, ETAs, and driver fields may be absent. Common fleet fields remain present but nullable.
cancel_details
Section titled “cancel_details”- User cancellation may include a
userblock (id,name,username). - DSP cancellation can include provider-specific
reasonanddetailsvalues. Do not build a closed enum from these raw values.
Cancel confirmation
Section titled “Cancel confirmation”If your 2xx response body includes cancelConfirmationId, First stores it on the order. Respond quickly; perform business processing asynchronously.
Request body
Section titled “Request body”{ "orderId": "5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42", "externalId": "ABC-123456", "status": "Cancelled", "status_v3": "cancelled", "cancel_details": { "user": { "id": "9c4e2b7a-3f1d-4a8e-b6c5-2d7f9e1a0b34", "name": "Alex", "username": "alex@merchant.example.com" } }, "trackerLink": "https://trackdelivery.io/?orderId=5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42", "dspTrackerLink": "https://track.example-dsp.com/d/8f2c41", "trackerLinkFleet": "https://track.example-dsp.com/d/8f2c41", "fleetName": "Example Fleet"}Examples
Section titled “Examples”curl --request POST 'https://my-api.example.com/first-delivery/webhook' \ --header 'Content-Type: application/json' \ --data '{ "orderId": "5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42", "externalId": "ABC-123456", "status": "Cancelled", "status_v3": "cancelled", "cancel_details": { "user": { "id": "9c4e2b7a-3f1d-4a8e-b6c5-2d7f9e1a0b34", "name": "Alex", "username": "alex@merchant.example.com" } }, "trackerLink": "https://trackdelivery.io/?orderId=5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42", "dspTrackerLink": "https://track.example-dsp.com/d/8f2c41", "trackerLinkFleet": "https://track.example-dsp.com/d/8f2c41", "fleetName": "Example Fleet"}'const response = await fetch("https://my-api.example.com/first-delivery/webhook", { "method": "POST", "headers": { "Content-Type": "application/json" }, "body": "{\n \"orderId\": \"5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42\",\n \"externalId\": \"ABC-123456\",\n \"status\": \"Cancelled\",\n \"status_v3\": \"cancelled\",\n \"cancel_details\": {\n \"user\": {\n \"id\": \"9c4e2b7a-3f1d-4a8e-b6c5-2d7f9e1a0b34\",\n \"name\": \"Alex\",\n \"username\": \"alex@merchant.example.com\"\n }\n },\n \"trackerLink\": \"https://trackdelivery.io/?orderId=5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42\",\n \"dspTrackerLink\": \"https://track.example-dsp.com/d/8f2c41\",\n \"trackerLinkFleet\": \"https://track.example-dsp.com/d/8f2c41\",\n \"fleetName\": \"Example Fleet\"\n}"})const data = await response.json()import requests
response = requests.request( "POST", "https://my-api.example.com/first-delivery/webhook", headers={ 'Content-Type': 'application/json'}, data="{\n \"orderId\": \"5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42\",\n \"externalId\": \"ABC-123456\",\n \"status\": \"Cancelled\",\n \"status_v3\": \"cancelled\",\n \"cancel_details\": {\n \"user\": {\n \"id\": \"9c4e2b7a-3f1d-4a8e-b6c5-2d7f9e1a0b34\",\n \"name\": \"Alex\",\n \"username\": \"alex@merchant.example.com\"\n }\n },\n \"trackerLink\": \"https://trackdelivery.io/?orderId=5b1f3c20-0e4a-11f1-8c2d-3f9a7e6b1d42\",\n \"dspTrackerLink\": \"https://track.example-dsp.com/d/8f2c41\",\n \"trackerLinkFleet\": \"https://track.example-dsp.com/d/8f2c41\",\n \"fleetName\": \"Example Fleet\"\n}",)response.raise_for_status()Saved responses
Section titled “Saved responses”{ "cancelConfirmationId": "CXL-98765"}
