Перейти к содержимому

Cancel a delivery

POST
/orders/{external_order_id}/cancel
curl --request POST \
--url https://api.govza.app/v1/delivery/orders/example/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "reason": "example", "comment": "example" }'
external_order_id
required
string
<= 128 characters

Your own identifier for the order.

Media typeapplication/json
object
reason
string
<= 255 characters
comment
string
<= 2000 characters
Examplegenerated
{
"reason": "example",
"comment": "example"
}

The delivery was cancelled.

Media typeapplication/json
object
success
boolean
data
object
external_order_id
string
order_code

The human-readable Govza order code.

string
status
string
Allowed values: new assigned in_progress delivered cancelled
price
number
nullable
tracking_url

Public tracking page, safe to forward to the recipient. Expires 24 hours after the order is delivered or cancelled. Present on create; when reading or listing, null if the order has no link yet — reads never create one. Use POST /orders/{external_order_id}/tracking_link to issue one.

string
nullable
tracking_urls

Individual tracking pages, one per dropoff in your order, whatever order they are visited in. Null for a single-dropoff order or when unavailable.

Array<string>
nullable
visit_order

Zero-based positions in your dropoffs array, in the order the courier visits them. Everything else stays in your order: quote legs, tracking_urls and index in PATCH.

Array<integer>
Example
{
"data": {
"status": "new",
"visit_order": [
2,
0,
1
]
}
}

The key is missing, malformed, revoked, or its account can no longer create orders.

Media typeapplication/json
object
success
boolean
error
object
id
string
code
string
message
string
details
string
Example
{
"success": false
}

No order exists for this external_order_id.

Media typeapplication/json
object
success
boolean
error
object
id
string
code
string
message
string
details
string
Example
{
"success": false
}