Skip to content

Assign to driver

PUT/journeys/{id}/assign-driver

Auth: 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.

Guide: Assign a driver and a vehicle

Path parameters

  • idinteger · int64required

    The id of the journey to update

Headers

  • X-Request-IDstring

    The optional (ideally unique) request identifier used for later analysis or diagnostics

Request body

application/json · required

  • namestringrequired

    The driver's name, shown to the traveller.

  • phoneNumberstringrequired

    The driver's phone number in international format, for example +447700900456.

    Pattern: ^\+(?:[0-9]?){6,14}[0-9]$

  • notifyBySmsboolean

    Send the journey details to the driver by SMS.

  • reassignboolean

    Set to true to replace an assigned driver.

Responses

No content

Errors this endpoint can return

  • 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 message and correct the request. For 500, retry once; if it persists, contact Transferz support with the X-Request-ID you sent.

  • 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.