Partner - Transaction API
Create transaction.
Adds a new transaction to the system and returns its ID and details.
Endpoint
POST - https://api.travisroadservices.com/partners/v1/transactions
Copy
Header params
| Parameter | Type | Description |
|---|---|---|
location
|
string | Location ID of the requesting location. |
Request body
Response body
Response 201
TransactionResource resource created
Fields
| Field | Type | Description |
|---|---|---|
id
|
integer | Unique identifier of the transaction. |
service
|
string | Service for which the transaction is created. Possible values: parking, repair. |
serviceInformation
|
object | Service-specific information such as arrival and departure for parking, or order number for repair. |
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. |
vehicles
|
object | Vehicles involved in the transaction. At least one vehicle (truck or trailer) must be provided. |
truck
|
object | |
licensePlate
|
string | |
trailer
|
object | |
licensePlate
|
string | |
driver
|
string | Name or identifier of the driver. |
payment
|
object | Payment means used for the transaction. |
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. Currently booking codes are not allowed. |
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. |
price
|
object | Total price of the transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
payout
|
object | Payout amount applicable to the transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
customerDiscount
|
object | Customer discount applied to the transaction. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
status
|
object | Current status of the transaction. |
createdAt
|
string (date-time) | Date and time the transaction was created. |
cancelledAt
|
string (date-time) | Date and time the transaction was cancelled, if applicable. |
creditTransactionId
|
integer | Identifier of the related credit transaction. Only present when the transaction has been credited. |
additionalCosts
|
array | List of additional cost transactions related to this transaction. |
priceParts
|
object | Price of parts. Required and applicable to the repair service only. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
priceLabour
|
object | Price of labour. Required and applicable to the repair service only. |
amount
|
number | Price amount in the specified currency. |
currency
|
string | ISO 4217 currency code. |
Example