Driver API

Register driver.

Register driver.


Open Swagger Specification

Endpoint

    POST - https://api.travisroadservices.com/v1/drivers
    Copy
  

Request body

Fields

Field Type Required Description
driverInformation object Yes Personal information of the driver such as name and phone number.
firstName string No First name of the driver.
lastName string No Last name of the driver.
email string No Email address of the driver.
phoneNumber string No Phone number of the driver in E.164 format (e.g. +31612345678).
companyName string No Name of the company the driver is associated with.
language string No Preferred language of the driver as a BCP 47 language code (e.g. en, nl, de).
country string No ISO 3166-1 alpha-2 country code of the driver (e.g. NL, DE, FR).
fleetSize string Yes Set fleet size for the account, possible options: solo (1 vehicle), extra_small (1-20 vehicles), small (21-50 vehicles), medium (51-100 vehicles), large (101-500 vehicles), extra_large (500+ vehicles).
agreeTermsAndConditions boolean Yes Must be true to confirm the driver agrees to the terms and conditions.
vehicleInformation object No Vehicle information to register alongside the driver.
licensePlate string No License plate number of the vehicle.
fleetNumber string No Fleet number used to identify the vehicle within the fleet.
vehicleType integer No Identifier of the vehicle type.
referrer string No Referrer code used during driver registration.

Example

Response body

Response 201

DriverResource resource created

Fields

Field Type Description
id string (uuid) Unique identifier of the driver.
driverInformation object Personal information of the driver such as name and phone number.
firstName string First name of the driver.
lastName string Last name of the driver.
email string Email address of the driver.
phoneNumber string Phone number of the driver in E.164 format (e.g. +31612345678).
companyName string Name of the company the driver is associated with.
language string Preferred language of the driver as a BCP 47 language code (e.g. en, nl, de).
country string ISO 3166-1 alpha-2 country code of the driver (e.g. NL, DE, FR).
fleetSize string Set fleet size for the account, possible options: solo (1 vehicle), extra_small (1-20 vehicles), small (21-50 vehicles), medium (51-100 vehicles), large (101-500 vehicles), extra_large (500+ vehicles).
agreeTermsAndConditions boolean Must be true to confirm the driver agrees to the terms and conditions.
vehicleInformation object Vehicle information to register alongside the driver.
id integer Unique identifier of the vehicle.
licensePlate string License plate number of the vehicle.
fleetNumber string Fleet number used to identify the vehicle within the fleet.
vehicleType integer Identifier of the vehicle type.
status string Current status of the driver account.
notificationToken string Device push notification token for the driver.
accountType string Type of the driver account.
bookableServices array List of services the driver is allowed to book.
features array Features enabled for the driver. Possible values: vehicle_management, wash_frequency.
isVehicleManagementEnabled boolean Indicates whether vehicle management is enabled for the driver.
customerStatus string Status of the customer account associated with the driver.
frozenReason string Reason why the customer account is frozen, if applicable.
referrer string Referrer code used during driver registration.
paymentMethodType string Payment method type available for the driver.
isBookingReferenceRequired boolean Indicates whether a booking reference is mandatory for this driver.
bookingReferenceRequired boolean

Example

Response 400

Invalid input

Fields

Field Type Description
title string A short, human-readable summary of the problem.
detail string A human-readable explanation specific to this occurrence of the problem.
status integer The HTTP status code applicable to this problem.
instance string A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
type string A URI reference that identifies the problem type

Example

Response 401

No response body - No bearer token set verify if your token is added as bearer token

Response 403

No response body - You don't have access to this API resource

Response 422

An error occurred

Fields

Field Type Description
status integer The HTTP status code (422).
violations array A list of constraint violations that caused the error.
detail string A human-readable description of the validation errors.
type string A URI reference identifying the validation error type.
title string A short summary of the error.
instance string A URI reference identifying the specific occurrence of the error.

Example