Introduction
Welcome to the Auto 5 Pro Scheduler API!
Having an account on the API, you can use it to view availabilities and book a slot for a specific center.
This documentation shows all the endpoints, how to call them and what data they return.
Environments
Auto 5 API has two environments.
- A test environment : https://api-uat.auto5-pro.be/api/
- A production environment : https://api.auto5-pro.be/api/
Authentication
For example, to call the POST initiate endpoint, you must use the API key in the header:
curl https://api-uat.auto5-pro.be/api/initiate \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"language": <string>,
}'
> Make sure to replace `your_token` with your API key.
Auto 5 API uses API keys to allow access to the API.
To get your API Key, you must have an account on the API. You must contact the administrator of your brand to get a valid token.
Auto 5 API expects for the API key to be included in all API requests to the server in a header that looks like the following:
Initiate
POST Initiate your booking
curl https://api-uat.auto5-pro.be/api/initiate \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"language": <string>,
"partner_key": <string>
}'
The above command returns JSON structured like this:
{
"reference": int
}
This endpoint creates a new booking to follow the user during the flow.
HTTP Request
POST https://api-uat.auto5-pro.be/api/initiate
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| language | String | Required | The language in which the request is done. |
| partner_key | String | Optional | If a partner key is defined, give it here to create booking with correct partner key linked. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| reference | String | The booking_id. |
GET Interface translations
curl https://api-uat.auto5-pro.be/api/translations \
--request GET \
--header "X-AUTH-TOKEN: <your_token>"
The above command returns JSON structured like this:
{
"en": {
"key": string,
...
},
"fr": {
"key": string,
...
},
"nl": {
"key": string,
...
}
}
This endpoint returns all the translations for the interface.
If you are implementing the API in your own website or application, you can avoid this call.
HTTP Request
GET https://api-uat.auto5-pro.be/api/translations
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
POST Get car from license plate
curl https://api-uat.auto5-pro.be/api/car \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"license_plate": <string>,
}'
The above command returns JSON structured like this:
{
"id": int,
"licensePlate": string,
"previousLicensePlate": string,
"vin": string,
"brand": string,
"model": string,
"tires": [
{
"axle": string (FRONT/REAR),
"type": string (SUMMER/WINTER/ALL),
"width": int,
"ratio": int,
"rimDiameter": int,
"loadIndex": int,
"speedRating": string
},
{...}
]
}
This endpoint returns a car based on its license plate, as long as a VIN number is associated in the API. If no matching record is found, return nothing.
HTTP Request
POST https://api-uat.auto5-pro.be/api/car
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| license_plate | String | Required | The license plate to look for. |
GET Get leasing companies
curl https://api-uat.auto5-pro.be/api/leasers \
--request GET \
--header "X-AUTH-TOKEN: <your_token>"
The above command returns JSON structured like this:
{
{
"id": int,
"name": string,
},
{
...
}
}
This endpoint returns the list of leasing companies.
HTTP Request
GET https://api-uat.auto5-pro.be/api/leasers
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Brand and tasks
POST Get brand
curl https://api-uat.auto5-pro.be/api/brands \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"domain": <string>
}'
The above command returns JSON structured like this:
{
"id": int,
"name": string,
"style": string,
"assets": {
"en": {
"favicon": string,
"footer_logo": string,
"header_logo": string
},
"fr": {
"favicon": string,
"footer_logo": string,
"header_logo": string
},
"nl": {
"favicon": string,
"footer_logo": string,
"header_logo": string
}
},
"hourRanges": {
"start":string,
"end": string
},
"displayOptions": boolean,
"commentMandatory": boolean,
"centers": [
{
"id": int,
"name":string,
"phone": string,
"addressLine1": string,
"addressLine2": string,
"hasSaturday": boolean,
"email": {
"emailAddressTo": string
}
}
]
}
This endpoint get the brand and all centers that are linked to a specific domain name. You must have at least one brand linked to the domain to retrieve a result.
HTTP Request
POST https://api-uat.auto5-pro.be/api/brands
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
| domain | String | Required | The domain to get the brand and centers for. The domain must be linked to at least one brand to return a result. |
POST Get tasks
curl https://api-uat.auto5-pro.be/api/tasks \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"brand_id": <int>,
"center_id": <int>,
"has_replacement_car": <boolean>
}'
The above command returns JSON structured like this:
[
[
{
"id": int,
"hasTires": boolean,
"translatedLabels": {
"en": string,
"fr": string,
"nl": string
}
},
{
...
}
]
]
This endpoint get the tasks that are available for a specific center.
You must specify the selected brand id and center id (choice made by your customer).
HTTP Request
POST https://api-uat.auto5-pro.be/api/tasks
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
| brand_id | Integer | Required | The brand id. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | Required | The center id. This corresponds to one of the id's returned in the POST brands endpoint. |
| has_replacement_car | Boolean | Optional | If TRUE, will return only tasks that provides replacement car. |
Timeslots
POST Get weeks
curl https://api-uat.auto5-pro.be/api/weeks \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"brand_id": <int>,
"center_id": <int>,
"tasks": {
<int>,
...
}
}'
The above command returns JSON structured like this:
[
{
"start": int,
"end": int
},
{
...
}
]
This endpoint get the next available weeks that have at least one slot available. This is linked to the brand, the center and the task asked by the customer.
You must specify the selected brand id and center id, and all the selected tasks id (choice made by your customer).
Weeks - HTTP Request
POST https://api-uat.auto5-pro.be/api/weeks
Weeks - Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Weeks - Body Parameters
| Parameter | Type | Description |
|---|---|---|
| booking_id | Integer | The booking id returned by the GET initiate endpoint. |
| brand_id | Integer | The brand id for which to get centers. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | The center id for which to get tasks for. This corresponds to one of the id's returned in the POST brands endpoint. |
| tasks | Array | At least one ot the tasks id. This corresponds to one of the id's returned in the POST tasks endpoint. |
POST Get timeslots
curl https://api-uat.auto5-pro.be/api/timeslots \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"brand_id": <int>,
"center_id": <int>,
"from_date": <string>,
"tasks": {
<int>,
...
}
}'
The above command returns JSON structured like this:
{
"start": string,
"end": string,
"timeslots": [
{
"start": string,
"end": string,
"timestamp": int,
},
{
"start": string,
"end": string,
"timestamp": int,
"selected": boolean
},
{
...
},
]
}
This endpoint get the available timeslots for one week.
You must provide the first day of the week to get all the timeslots.
You must specify the selected brand id and center id, and all the selected tasks id (choice made by your customer).
If a timeslot is already locked for the booking, the corresponding timeslot has a selected parameter in the response.
HTTP Request
POST https://api-uat.auto5-pro.be/api/timeslots
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
| brand_id | Integer | Required | The brand id. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | Required | The center id. This corresponds to one of the id's returned in the POST brands endpoint. |
| from_date | String | Required | The date from where to get timeslots. |
| tasks | Array | Required | At least one ot the tasks id. This corresponds to one of the id's returned in the POST tasks endpoint. |
PUT Lock timeslot
curl https://api-uat.auto5-pro.be/api/timeslots/lock \
--request PUT \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"brand_id": <int>,
"center_id": <int>,
"timestamp": <int>
}'
The above command returns JSON structured like this:
{
"timeslot_id": int
}
This endpoint locks one timeslot in the given timestamp.
It returns the timeslot id that was locked. You must retains this info to book or unlock it.
You must specify the selected brand id and center id (choice made by your customer).
HTTP Request
PUT https://api-uat.auto5-pro.be/api/timeslots/lock
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
| brand_id | Integer | Required | The brand id. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | Required | The center id. This corresponds to one of the id's returned in the POST brands endpoint. |
| timestamp | Integer | Required | The timestamp for which to lock a timeslot. This corresponds to one of the timestamp returned in the POST timeslots endpoint. |
PUT Unlock timeslot
curl https://api-uat.auto5-pro.be/api/timeslots/unlock \
--request PUT \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>
}'
The above command returns JSON structured like this:
{
"success": boolean
}
This endpoint unlocks the locked timeslot of the current booking.
If a customer select a timeslot then wants to change it, you have to call this endpoint before locking the new one.
This endpoint requires only the booking_id.
HTTP Request
PUT https://api-uat.auto5-pro.be/api/timeslots/unlock
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
Booking
PUT Book a timeslot
curl https://api-uat.auto5-pro.be/api/booking \
--request PUT \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"booking_id": <int>,
"brand_id": <int>,
"center_id": <int>,
"timeslot_id": <int>,
"customer": {
"language": "fr"|"en"|"nl",
"first_name": <string>,
"last_name": <string>,
"gender": 1|2,
"email": <string>,
"phone": <string>,
},
"car": {
"brand": <string>,
"model": <string>,
"license_plate": <string>,
"license_plate_has_changed": <boolean>
"vin": <string>,
"unknown_vin": <boolean>,
"mileage": <int>,
"company": <string,
"leasing_company": <int>
},
"options": {
"bicycle": <boolean>,
"meeting_room": <boolean>,
"replacement_car": <boolean>,
},
"comment": <string>,
"tires": {
"front": {
"season": "SUMMER"|"WINTER"|"ALL",
"width": <int>,
"ratio": <int>,
"rim_diameter": <int>,
"load_index": <int>,
"speed_rating": <string>
},
"rear": {
"season": "SUMMER"|"WINTER"|"ALL",
"width": <int>,
"ratio": <int>,
"rim_diameter": <int>,
"load_index": <int>,
"speed_rating": <string>
}
}
}'
The above command returns JSON structured like this:
{
"success": boolean,
"hash": string
}
This endpoint book a timeslot and send mails to the center and the customer.
It returns the hash of the booking, which can be retains in your system to allow you to delete it afterwards via the endpoint DELETE book.
HTTP Request
PUT https://api-uat.auto5-pro.be/api/booking
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| booking_id | Integer | Required | The booking id returned by the GET initiate endpoint. |
| brand_id | Integer | Required | The brand id. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | Required | The center id. This corresponds to one of the id's returned in the POST brands endpoint. |
| timeslot_id | Integer | Required | The timeslot id to book. This corresponds to one of the timestamp returned in the PUT lock endpoint. |
| comment | String | Optional | The customer comment |
| customer | Array | Required | |
| car | Array | Required | |
| options | Array | Required | |
| tires | Array | Optional |
Customer
| Parameter | Type | Required | Description |
|---|---|---|---|
| language | String | Required | The request language. Can be fr / nl / en |
| first_name | String | Required | The customer first name |
| last_name | String | Required | The customer last name |
| gender | Integer | Required | The customer gender. 1 = male, 2 = female |
| String | Required | The customer email | |
| phone | String | Required | The customer phone number |
Car
| Parameter | Type | Required | Description |
|---|---|---|---|
| brand | String | Required | The car brand |
| model | String | Required | The car model |
| license_plate | String | Required | The car license plate |
| license_plate_has_changed | Boolean | Optional | If license plate has changed, indicates to keep old one in dedicated field |
| vin | String | Required | The car VIN number |
| unknown_vin | Boolean | Optional | In case user does not know VIN number, set this to true |
| mileage | String | Required | The car mileage |
| company | String | Optional | The company owning the car. |
| leasing_company | Int | Optional | The leasing company. |
Options
| Parameter | Type | Required | Description |
|---|---|---|---|
| bicycle | Boolean | Optional | Indicates if the customer wants a loaner bike. |
| meeting_room | Boolean | Optional | Indicates if the customer wants to access a meeting room during his visit. |
| replacement_car | Boolean | Optional | Indicates if the customer needs a replacement car. |
Tires
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Required | Either SUMMER, WINTER or ALL. Defines the season type of the tires. |
| width | Int | Required | The tire width |
| ratio | Int | Required | The tire ratio |
| rim_diameter | Int | Required | The tire rim diameter |
| load_index | String | Required | The tire load index |
| speed_rating | String | Required | The tire speed rating |
DELETE Cancel a booking
curl https://api-uat.auto5-pro.be/api/booking \
--request DELETE \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"hash": <string>
}'
The above command returns JSON structured like this:
{
"success": boolean
}
This endpoint cancels a booking based on its hash.
HTTP Request
DELETE https://api-uat.auto5-pro.be/api/booking
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| hash | String | True | The booking hash to cancel. |
Lists
POST Get all bookings for Brand and Center
curl https://api-uat.auto5-pro.be/api/booking/all \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
--data '{
"brand_id": <int>,
"center_id": <int>,
"from": <string>,
"to": <string>
}'
The above command returns JSON structured like this:
[
{
"booking_id": int,
"date": datetime,
"partner_key": string,
"comment": string,
"customer": {
"last_name": string,
"firs_name": string,
"gender": string,
"phone": string,
"email": string,
"language": string,
},
"car": {
"car_model": string,
"license_plate": string,
"milage": string,
},
"options": {
"replacement_car": boolean,
"bicycle": boolean,
"meeting_room": boolean,
},
},
{
...
},
]
This endpoint returns the list of all bookings for a brand and center between 2 dates.
HTTP Request
POST https://api-uat.auto5-pro.be/api/book/all
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| brand_id | Integer | Required | The brand id. This corresponds to one of the id's returned in the POST brands endpoint. |
| center_id | Integer | Required | The center id. This corresponds to one of the id's returned in the POST brands endpoint. |
| from | Date | Required | The date from when to returns the booking. Format : Y-M-D (example: 2023-12-01) |
| to | Date | Required | The date until when to returns the booking. Format : Y-M-D (example: 2023-12-01) |
POST Get all centers available for user
curl https://api-uat.auto5-pro.be/api/centers/list \
--request POST \
--header "X-AUTH-TOKEN: <your_token>"
The above command returns JSON structured like this:
[
{
"id": int,
"name": string,
"phone": string,
"addressLine1": string,
"addressLine2": string,
"latitude": string,
"longitude": string,
"hasSaturday": boolean,
"brands": [
{
"brand": {
"name": string
},
"domain": string
}
],
"email": string
},
{
...
},
]
This endpoint returns the list of all centers available for current user. The list gives all brands linked to the center and available for current user, and the domain to use.
HTTP Request
POST https://api-uat.auto5-pro.be/api/centers/list
Header Parameters
| Parameter | Description |
|---|---|
| X-AUTH-TOKEN | Your API key. |
Errors
The Auto 5 API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 405 | Method Not Allowed -- You tried to access a resource with an invalid method. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |