Gozem Developer DocsDocs
Courier API › Trip

Cancel Trip

posthttps://sandbox-api.gozem.co/courier/v1/trips/{trip_id}/cancellation

Cancel an active trip and process any applicable refunds.

Path parameters

stringrequired

Trip ID (TRP_xxx format or numeric ID)

min 1 charspattern ^(TRP_\d+|\d+)$

Body parameters

string

Reason for cancellation

max 500 chars

Response 200

dataobjectrequired

The canceled trip

canceled_atstringrequired

Trip cancellation timestamp

date-time
cancellation_reasonstring

Reason for cancellation

statusstringrequired

Trip has been canceled

canceled
trip_idstringrequired

Unique trip identifier

messagestringrequired

Human-readable outcome. Defaults to `Ok`.

successbooleanrequired

Always `true` on a success response.

true

Errors

Every failure returns the same envelope. Branch on code — it is the stable contract; message is human-facing and may be reworded or localized. See the error reference for what each code means.

400401403404405409413415429500502