Simulate Trip State Change
https://sandbox-api.gozem.co/courier/v1/trips/{trip_id}/simulation/stateSimulate trip state progression (assign driver, arrive at pickup, start trip, update location, complete trip).
Path parameters
Trip ID (TRP_xxx format or numeric ID)
Body parameters
Which fields apply depends on action. Every branch takes action; the rest are only read for the actions that use them.
Assign an available simulated driver to the trip
Latitude
Longitude
Optional cancellation reason
Message sender (default: driver)
Message text
Response 200
The trip and its current state
Driver assigned timestamp
Trip canceled timestamp
Delivery completed timestamp
Trip creation timestamp
Total distance in kilometers
Driver handling the trip. Absent until one is assigned.
Driver name
Driver phone number
Vehicle plate number
Vehicle type and details
Delivery stops, in the order they are serviced
Dropoff completed timestamp
Contact name
Contact phone number
Dropoff location name
Dropoff latitude
Dropoff longitude
Note for the dropoff location
Total duration in minutes
Fare charged for the trip
Total fare amount
Fare components, adding up to `amount`
Component amount
Fare component label
Extra detail about the component
Currency code
Unique trip identifier
Where the package was collected
Pickup completed timestamp
Contact name
Contact phone number
Pickup location name
Pickup latitude
Pickup longitude
Note for the pickup location
Package picked up timestamp
Current status of the trip
Title of the trip
Public tracking URL that can be shared with the recipient. Contains a signed, short-lived JWT valid for the duration of the delivery.
Last update timestamp
Human-readable outcome. Defaults to `Ok`.
Always `true` on a success response.
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.