Assign to driver
/journeys/{id}/assign-driverAuth: X-API-Key headerhttps://warpdrive.staging.transferz.com/transfercompanies
Assigns a journey to a driver and sends an optional SMS message
Assigns a driver to the journey; the journey moves to PLANNED and the partner receives the driver's name and phone number. With notifyBySms the driver receives the journey details by SMS. To replace an assigned driver send reassign true. The phone number must be in international format.
Path parameters
Headers
Request body
application/json · required
Responses
No content
Errors this endpoint can return
- 400, failedJOURNEY_ALREADY_ASSIGNED_TO_OTHER_DRIVER
When: Another driver is assigned and reassign is false.
What to do: Send reassign true to replace the driver, or unassign the current driver first.
- 400, failedUNKNOWN
When: The journey is completed or cancelled.
What to do: For 400, read
messageand correct the request. For 500, retry once; if it persists, contact Transferz support with the X-Request-ID you sent. - 403, failedINSUFFICIENT_PERMISSIONS
When: The journey is not assigned to your company (also returned for an unknown id).
What to do: Check that the id belongs to your company and that you use the key of the right user. Ask Transferz to check the account's permissions if the id is correct.