Skip to content

Assign vehicle

PUT/journeys/{id}/assign-vehicle

Auth: X-API-Key headerhttps://warpdrive.staging.transferz.com/transfercompanies

Assigns a vehicle to a journey driver

Assigns a vehicle to the journey's driver, so the traveller knows which car to look for. Assign the driver first. Send reassign true to replace an assigned vehicle.

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

  • licensePlatestring · min length 1required

    Licence plate the traveller should look for.

  • modelstring

    Model, for example Corolla Touring.

  • makestring

    Make, for example Toyota.

  • seriesstring

    Series or trim.

  • reassignboolean

    Set to true to replace an assigned vehicle.

Responses

No content

Errors this endpoint can return

  • When: No driver is assigned to the journey yet.

    What to do: Assign a driver first with Assign to driver.

  • When: A vehicle is assigned and reassign is false.

    What to do: Send reassign true to replace it, or unassign the vehicle 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.