- Print
- DarkLight
Swagger
You can find our swagger documentation here: https://console.autochat.ai/api/docs.html
Environments
We have 2 environments:
Production: https://console.autochat.ai
Staging: https://staging.autochat.ai/api/cars
Authentication
After an agreement has been signed you will receive credentials to our API. You can request (POST) a token on this URL https://autochat-dev.eu.auth0.com/oauth/token it works for both production and staging. You will receive a client_id and client_secret from us. You can retrieve a token in this way:
{
"client_id":"",
"client_secret":"",
"audience":"http://api.autochat.com/",
"grant_type":"client_credentials"
}
The response will look someting like this:
{
"access_token": "xxxxxxxxxxxxxxxxxxxxxx",
"token_type": "Bearer"
}
You can now use the bearer token in the header.
Please keep in mind that the token is valid for 24 hours. Please do not request a new token for every request you make but reuse it until it’s not valid anymore. If we notice a high number of token requests your access might be limited.
Dashboard
It is important that in our dashboard the correct stock integration is enabled. If this is not the case you can’t send us cars via the API. Often we will set this for you in advance.
Creating a car
When posting a new car to api/cars you need to supply valid information. This is an example of a car:
{
"bodyColor": "white",
"bodyType": "suv",
"currency": "EUR",
"dateOfFirstRegistration": "2022-09-16",
"dealershipId": "you get this from us",
"description": "A nice car",
"engineDisplacement": 2137,
"engineEmission": 191,
"engineKw": 74,
"fuelType": "diesel",
"images": [],
"internalId": "SEB-21347958",
"isTaxDeductible": true,
"licensePlate": "XD9913",
"brand": "bmw",
"model": "x6",
"options": [
"power_steering",
"passenger_airbag",
"tempomat",
"armrest",
"sliding_door",
"side_airbag",
"ac",
"dark_tinted_glass",
"seat_heating",
"abs",
"chassis_double_cabin",
"power_windows_front",
"fog_lights",
"heated_seats",
"radio_cd",
"multi_functional_steering_wheel",
"trailer_hitch",
"parking_assist_system_camera",
"radio",
"shift_paddles",
"start_stop_system",
"on_board_computer",
"navigation_system",
"cd_player",
"parking_assist_system_sensors_rear",
"central_door_lock_remote",
"board_computer",
"towbar",
"light_sensor",
"interior_mirror_automatically_dimmable",
"cruise_control",
"leather_steering_wheel",
"adaptive_headlights"],
"salesPrice": 15944.63,
"salesPriceExVat": 15944.63,
"tags": [],
"taxAmount": 9873,
"tradePrice": 159454.63,
"transmission": "manual",
"gears": 3,
"mileage": 2137,
"mileageUnit": "KM",
"version": "2.3 TDCI Diesel",
"vin": "WAVWGBFH3AN026569",
"numberOfDoors": 4,
"yearOfConstruction": 2019
}
Defining options on a car
When accessing api/options you will see a list of all available options
{
"esaco_identifier": 0,
"name": "power_steering",
"prettyName": "Power steering",
"uuid": "02f50f11-f840-4ba0-8232-2ec459c3008f"
},
{
"esaco_identifier": 0,
"name": "keyless_central_door_lock",
"prettyName": "Keyless central door lock",
"uuid": "03d18842-0bb6-4aa0-8984-c5dd3ee4aa96"
},
{
"esaco_identifier": 0,
"name": "driver_drowsiness_detection",
"prettyName": "Driver drowsiness detection",
"uuid": "04204c98-9018-47c0-86bb-3dadbd6fabdb"
}
Please be aware that this list can be different on staging and production. Also you need to provide the option via the name property not the uuid.
Images
If the car doesn’t have any images yet please do include the images property with an empty array.