API documentation
  • 12 Oct 2023
  • 2 Minutes to read
  • Contributors
  • Dark

API documentation

  • Dark

Article summary


You can find our swagger documentation here: https://console.autochat.ai/api/docs.html


We have 2 environments:


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:


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.


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": [
    "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.


If the car doesn’t have any images yet please do include the images property with an empty array.

Was this article helpful?