Partner - Drive In API
End and settle a parking session
Registers the departure of a truck from your location and ends the session. The open parking session of the truck is looked up by its license plate. Payment is settled for the session and the resulting transactions are returned in the response. As in some scenarios, like overstay or error, the transactions cannot be created directly, the results are split between approved and pending.
Endpoint
POST - https://api.travisroadservices.com/partners/v1/drive-in/check-out
Copy
Header params
| Parameter | Type | Description |
|---|---|---|
location
|
string | Location ID of the requesting location. |
Request body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
arrival
|
string (date-time) | Yes | Arrival in local time of the location, without timezone. |
departure
|
string (date-time) | Yes | Departure in local time of the location, without timezone. Must be after arrival, at most 1 hour in the past and at most 1 hour in the future. |
truckLicensePlate
|
string | Yes | License plate of the truck. Identifies the parking session. |
price
|
object | No | List price of the stay, before any customer discount. Required when the location has no Travis pricing configured. If provided, overrides any Travis pricing configuration. |
amount
|
number | No | Price amount in the specified currency. |
currency
|
string | No | ISO 4217 currency code. |
Example
Response body
Response 201
CheckOutResource resource created
Fields
| Field | Type | Description |
|---|---|---|
amounts
|
object | Amounts breakdown: approved, pending and total. |
approved
|
object | Sum of approved transaction prices. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
pending
|
object | Pending transaction price. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
total
|
object | Total amount, approved plus pending. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
pendingTransaction
|
object | Transaction still to be created: the overstay request awaiting approval, or the direct transaction that could not be created yet (id omitted). |
id
|
integer | Transaction id. Always null for pending transactions. |
service
|
string | Service for which the pending transaction was created. Always "parking". |
serviceInformation
|
object | Arrival and departure of the pending transaction. |
arrival
|
string (date-time) | In local time. Required and applicable only to the parking service. |
departure
|
string (date-time) | In local time. Required and applicable only to the parking service. |
orderNumber
|
string | Work order number for repair service. Required and applicable only to the repair service. |
reference
|
string | Optional partner reference. Applicable only to the tankcleaning service. |
costSpecification
|
array | Optional itemised cost specification. Applicable only to the tankcleaning service. When provided, the sum of the line costs must equal the transaction price amount. |
vehicles
|
object | Vehicles associated with the pending transaction. |
truck
|
object | |
licensePlate
|
string | |
trailer
|
object | |
licensePlate
|
string | |
driver
|
string | Driver. Always null for pending transaction. |
payment
|
object | Payment used for the related booking. |
type
|
string | The type of payment used. Available choices: travis_code, fuel_card. If "travis_code", then a travis code must be provided in "information". If "fuel_card", then the track data must be provided in "information.fuelCard". |
information
|
object | |
travisCode
|
string | Travis code for payment. |
fuelCard
|
object | |
provider
|
string | Fuel card provider. |
holder
|
string | Fuel card holder name. |
cardNumber
|
string | Fuel card number. |
expiryDate
|
string (date-time) | Fuel card expiration date. |
licensePlateType
|
string | Plate type that paid the transaction. "truck" or "trailer". Only set for drive_in payments. |
price
|
object | Pending transaction transaction price. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
payout
|
object | Payout for the pending transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
customerDiscount
|
object | Customer discount for the pending transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
status
|
string | Status of the rendered transaction. Always "pending". |
createdAt
|
string (date-time) | Date and time the pending transaction was created. |
cancelledAt
|
string (date-time) | Cancellation timestamp. Always null for pending transaction. |
creditTransactionId
|
integer | Credit transaction id. Always null for pending transaction. |
additionalCosts
|
array | Additional cost transactions. Always empty for pending transaction. |
priceParts
|
object | Repair price of parts. Always null for pending parking transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
priceLabour
|
object | Repair price of labour. Always null for pending parking transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
approvedTransactions
|
array | Approved transactions |
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 422
Unprocessable entity, the request is invalid or the parking session cannot be ended: invalid input, no parking session can be started for the truck (see check-in codes), departure more than 1 hour in the past or future (019b3a01-3333-7000-8000-000000000005), the location cannot price the stay, or the linked Booking cannot be settled (stay out of range). Each violation carries a code: 019b3a01-2222-7000-8000-000000000003 (stay out of range), …0006 (invalid location configuration)
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
Response 500
Internal server error, something went wrong at TRAVIS
No response bodyResponse 503
Service unavailable, the overstay could not be created; retry later
No response body