Gozem Developer DocsDocs
Courier API › Trip

Book a Trip

posthttps://sandbox-api.gozem.co/courier/v1/trips

Create a new delivery trip.

Body parameters

Send either quote_id, or the full itinerary: dropoffs, optimize_route, pickup, title, vehicle. Not both.

string

Quote ID (TQT_xxx format)

min 1 charspattern ^(TQT_[A-Za-z0-9]+)$
dropoffsarray of object

Delivery stops, at least one. Serviced in the order given unless `optimize_route` is set.

min 1 item
object
string

Contact name

string

Contact phone number

stringrequired

Dropoff location name

numberrequired

Dropoff latitude

-90 to 90
numberrequired

Dropoff longitude

-180 to 180
string

Note for the dropoff location

max 280 chars
boolean

If true, dropoffs will be reordered to optimize route

pickupobject

Where the package is collected

string

Contact name

string

Contact phone number

stringrequired

Pickup location name

numberrequired

Pickup latitude

-90 to 90
numberrequired

Pickup longitude

-180 to 180
string

Note for the pickup location

max 280 chars
string

Title of the trip

string

Unique ID or name of the selected vehicle/service type

Response 200

dataobjectrequired

The newly booked trip

created_atstringrequired

Trip creation timestamp

date-time
fareobjectrequired

Fare charged for the trip

amountnumberrequired

Total fare amount

breakdownarray of objectrequired

Fare components, adding up to `amount`

object
amountnumberrequired

Component amount

labelstringrequired

Fare component label

sub_labelstring

Extra detail about the component

currency_codestringrequired

Currency code

XOF
guidstringrequired

Unique trip identifier

statusstringrequired

Current status of the trip

pendingexpiredassignedat_pickupstartedcanceledcompleted
titlestring

Title of the trip

tracking_urlstring

Public tracking URL that can be shared with the recipient. Contains a signed, short-lived JWT valid for the duration of the delivery.

uri
updated_atstringrequired

Last update timestamp

date-time
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