Booking API
Update parking booking.
Updates an existing parking booking for a specified location and timeslot. Verify availability using the parking availability endpoint before updating. All fields can be updated except parkingType.
Endpoint
PUT - https://api.travisroadservices.com/v1/booking/parking/{id}
Copy
Path params
| Parameter | Type | Description |
|---|---|---|
id
|
string | BookingParking identifier |
Query params
| Parameter | Type | Description |
|---|---|---|
language
|
string | Specifies the language of the response. |
Request body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
arrival
|
object | No | Expected arrival date and time for the parking booking. |
date
|
string (date-time) | Yes | Expected date in Y-m-d format. |
time
|
string (date-time) | Yes | Expected time in H:i format. Only returned when the service is Parking or Truck Charging. |
departure
|
object | No | Expected departure date and time for the parking booking. |
date
|
string (date-time) | Yes | Expected date in Y-m-d format. |
time
|
string (date-time) | Yes | Expected time in H:i format. Only returned when the service is Parking or Truck Charging. |
allowedToUpdate
|
array | No | List of fields that are allowed to be updated on this booking. |
location
|
integer | No | Location ID for the location you want to place the booking. |
reference
|
string | No | Customer reference attached to the transaction for easy identification. Maximum 50 characters. |
truck
|
object | No | Truck vehicle for the booking. Provide a known vehicle ID from the vehicle API or supply a licensePlate directly. |
vehicleId
|
integer | No | Vehicle ID known at TRAVIS. When provided, other vehicle parameters are ignored. |
licensePlate
|
string | No | License plate of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vinNumber
|
string | No | VIN number of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vehicleType
|
integer | No | Vehicle type identifier. Required when no vehicle ID is provided; otherwise ignored. |
trailer
|
object | No | Trailer vehicle for the booking. Provide a known vehicle ID from the vehicle API or supply a licensePlate directly. |
vehicleId
|
integer | No | Vehicle ID known at TRAVIS. When provided, other vehicle parameters are ignored. |
licensePlate
|
string | No | License plate of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vinNumber
|
string | No | VIN number of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vehicleType
|
integer | No | Vehicle type identifier. Required when no vehicle ID is provided; otherwise ignored. |
recipient
|
object | No | Specifies how the driver receives booking instructions. Possible values: email (sent to the given address), sms (sent to the given phone number), driver_app (pushed to driver app), manual (caller is responsible for delivery). |
type
|
string | Yes | Delivery method for booking instructions: email, sms, manual, or driver_app. |
language
|
string | No | Language code for the instructions delivered to the driver. |
phoneNumber
|
string | No | Phone number for SMS delivery. Required when type is sms. |
email
|
string | No | Email address for email delivery. Required when type is email. |
assignedDriver
|
string (iri-reference) | No | Assigned driver when type is driver_app; must have an active contract with the same customer. |
driverName
|
string | No | Name of the driver associated with the booking. |
Example
Response body
Response 200
BookingParking resource updated
Fields
| Field | Type | Description |
|---|---|---|
parkingType
|
string | Type of parking reservation (e.g. fixed). |
arrival
|
object | Expected arrival date and time for the parking booking. |
date
|
string (date-time) | Expected date in Y-m-d format. |
time
|
string (date-time) | Expected time in H:i format. Only returned when the service is Parking or Truck Charging. |
departure
|
object | Expected departure date and time for the parking booking. |
date
|
string (date-time) | Expected date in Y-m-d format. |
time
|
string (date-time) | Expected time in H:i format. Only returned when the service is Parking or Truck Charging. |
entry
|
object | Entry instructions and access details for the parking location. |
instructions
|
string | Entry instructions for accessing the location. |
entryCode
|
string | Code required to enter the location. |
entryLink
|
string | URL link with entry instructions for the location. |
reportAt
|
string | Location or gate where the driver should report on arrival. |
emergencyPhone
|
string | Emergency phone number for the location. |
locationReservationNumber
|
string | Reservation number assigned by the location for this booking. |
shareUrl
|
string | URL that can be shared with the driver to access entry instructions. |
driverInstructions
|
object | Driver instructions for the parking booking, keyed by language code. |
allowedToUpdate
|
array | List of fields that are allowed to be updated on this booking. |
cancellationPolicy
|
string | Cancellation policy applicable to the parking booking. |
id
|
integer | Unique identifier of the booking. |
travisCode
|
string | The Travis code uniquely identifying the booking. |
status
|
string | |
location
|
integer | Location ID for the location you want to place the booking. |
reference
|
string | Customer reference attached to the transaction for easy identification. Maximum 50 characters. |
truck
|
object | Truck vehicle for the booking. Provide a known vehicle ID from the vehicle API or supply a licensePlate directly. |
vehicleId
|
integer | Vehicle ID known at TRAVIS. When provided, other vehicle parameters are ignored. |
licensePlate
|
string | License plate of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vinNumber
|
string | VIN number of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vehicleType
|
integer | Vehicle type identifier. Required when no vehicle ID is provided; otherwise ignored. |
fleetNumber
|
string | Fleet number the vehicle belongs to. |
vehicleDepotName
|
string | Name of the vehicle depot the vehicle belongs to. |
trailer
|
object | Trailer vehicle for the booking. Provide a known vehicle ID from the vehicle API or supply a licensePlate directly. |
vehicleId
|
integer | Vehicle ID known at TRAVIS. When provided, other vehicle parameters are ignored. |
licensePlate
|
string | License plate of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vinNumber
|
string | VIN number of the vehicle. Required when no vehicle ID is provided; otherwise ignored. |
vehicleType
|
integer | Vehicle type identifier. Required when no vehicle ID is provided; otherwise ignored. |
fleetNumber
|
string | Fleet number the vehicle belongs to. |
vehicleDepotName
|
string | Name of the vehicle depot the vehicle belongs to. |
payment
|
object | Payment details for the booking, including invoice customer and optional fuel card. |
invoiceCustomer
|
integer | ID of the customer to be invoiced for this booking. |
fuelCard
|
object | Fuel card details used to pay for the booking. |
provider
|
string | Fuel card provider identifier. |
cardNumber
|
integer | Card number of the fuel card. |
expiryDate
|
string (date-time) | Expiry date of the fuel card. Format: YYYY-MM. |
recipient
|
object | Specifies how the driver receives booking instructions. Possible values: email (sent to the given address), sms (sent to the given phone number), driver_app (pushed to driver app), manual (caller is responsible for delivery). |
type
|
string | Delivery method for booking instructions: email, sms, manual, or driver_app. |
language
|
string | Language code for the instructions delivered to the driver. |
phoneNumber
|
string | Phone number for SMS delivery. Required when type is sms. |
email
|
string | Email address for email delivery. Required when type is email. |
assignedDriver
|
string (iri-reference) | Assigned driver when type is driver_app; must have an active contract with the same customer. |
createdBy
|
string | Identifier of the user or system that created the booking. |
createdAt
|
string (date-time) | Date and time when the booking was created. |
updatedAt
|
string (date-time) | Date and time when the booking was last updated. |
cancelled
|
object | When the booking was cancelled and by which party. Null if it was not. |
at
|
string (date-time) | Date and time of the transition. Null for bookings cancelled before this was recorded; the actor may still be known. |
by
|
object | The party behind the transition, or null when none was recorded. |
type
|
string | Which party acted: customer for the fleet's own user, location for the workshop or parking site, travis for Travis itself. |
name
|
string | Full name of the customer user who acted. Null for location and travis, which are reported as a party rather than as a person. |
declined
|
object | When the booking was declined and by which party. Null if it was not. |
at
|
string (date-time) | Date and time of the transition. Null for bookings cancelled before this was recorded; the actor may still be known. |
by
|
object | The party behind the transition, or null when none was recorded. |
type
|
string | Which party acted: customer for the fleet's own user, location for the workshop or parking site, travis for Travis itself. |
name
|
string | Full name of the customer user who acted. Null for location and travis, which are reported as a party rather than as a person. |
price
|
object | Price of the booking including amount and currency. |
price
|
integer | Price amount in minor currency units (e.g. cents). |
currency
|
string | ISO 4217 currency code. |
driverName
|
string | Name of the driver associated with the booking. |
isDeletable
|
boolean | Indicates whether the booking can be deleted (cancelled). |
qrUrl
|
string | URL to the QR code for the booking. |
shareUrl
|
string | URL that can be shared with the driver to access booking instructions. |
locationInformation
|
object | Detailed address and coordinate information for the booking location. |
id
|
integer | Unique identifier of the location. |
name
|
string | Name of the location. |
address
|
string | Street address of the location. |
houseNumber
|
string | House number of the location address. |
zipCode
|
string | Postal/zip code of the location. |
city
|
string | City where the location is situated. |
latitude
|
number | Latitude coordinate of the location. |
longitude
|
number | Longitude coordinate of the location. |
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 tokenResponse 403
No response body - You don't have access to this API resourceResponse 404
Not found
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 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