/
Public API (v1)

Public API (v1)

 

URLs

There are two environments. One for testing (development) and one for the production (production).

Environment

URL

Environment

URL

development

https://api.dev.it.fahrzeugmarkt.online/public/v1

production

https://api.fahrzeugmarkt.online/public/v1

Authentication

To use the public API, you have to provide the Header X-Authorization in every request (X-Authorization: API_KEY).

Header

Required

Value

Description

Header

Required

Value

Description

X-Authorization

API_KEY

Ask our support team for your API_KEY.

 

Dealerships

Dealerships list

This service will list all the dealerships.

Example

Request

GET /dealerships Accept: application/json

Response

{ "data": [ { "code": 100, "name": "Autohaus Standort 1", "location": { "street": "Musterstraße 123", "zip": "123456", "city": "Musterhausen" } }, ], }

 

Leads

Create a new lead

Example

Request

POST /leads Content-Type: application/json { "offer": 123, "type": 1, "dealership": 100, "salutation": 1, "firstname": "Max", "lastname": "Mustermann", "company": "Firma", "phone": "123456789", "email": "mustermann.max@example.com", "message": "Hallo, ich habe Interesse an dem Fahrzeug.", "additional-data": { "Info 1": "Freitext 1", "Info 2": "Freitext 2" } }

Response

201 Created

Fields

field

type

required

constraints

description

field

type

required

constraints

description

offer

integer

 

The code of the offer. This can be obtained by using the /offers service.

type

integer | string

 

The id or the code of the lead-type. This can be obtained by using the /lead-types service.

dealership

integer

 

The code of the dealership. This can be obtained by using the /dealerships service.

If offer is set, it will be overridden by the dealership of the offer.

salutation

integer

 

The code of the salutation. This can be obtained by using the /references/salutations service.

firstname

string

required if category of salutation is PERSON

 

lastname

string

required if category of salutation is PERSON

 

company

string

required if category of salutation is COMPANY

 

phone

string

 

 

email

string

 

 

message

string

 

 

additional-data

array / objekt

 

 

 

Offers

Offers list

This service will list all the available offers.

The corresponding prices are displayed under prices. If a contract type is only possible on request, this is also displayed under prices.

"prices": { "sale": { "possibleOnRequest": true } }

Example

Request

GET /offers Accept: application/json

Response

{ "data": [ { "code": 25, "internalNumber": "8953A09", "title": "PEUGEOT 2008 1.2 PureTech 82 Allure USB KLIMA PDC SHZ", "createdAt": "2020-12-03T08:30:57.000000Z", "updatedAt": "2021-02-11T11:04:10.000000Z", "car": { "internalNumber": "8953F0633", "internalIdentNumber": "NW048646", "model": "2008", "brand": "Peugeot", "fuelCategory": "Benzin", "fuelConsumption": 7.4, "fuelConsumptionUrban": 9.1, "fuelConsumptionExtraUrban": 6.5, "mileage": 89000, "ps": null, "power": 60, "hsn": "3003", "cylinderCapacity": 1199, "firstRegistration": "2015-11", "carType": "Gebrauchtwagen", "carBody": "SUV/Geländewagen", "transmission": "manuelles Schaltgetriebe, 5-Gang", "doorCount": 5, "seatCount": 5, "bodyColor": "Weiss", "bodyColorName": "weiss", "eco": { "co2Emissions": null, "efficiencyClass": null, "efficiencyClassImage": "https://..", "euEmissionStandard": "Euro5", "germanEmissionsSticker": "4 - Grüne Plakette" }, "location": { "street": "Musterstraße 123", "zip": "123456", "city": "Musterhausen" }, "images": [ { "name": "neu-2", "extension": "JPG", "mimetype": "image/jpeg", "url": "https://.." } ], "details": [ { "category": "AUSSTATTUNG_KLIMA", "type": "CHECKBOX", "order": 20, "text": "Klimaautomatik", } ] }, "prices": { "sale": { "currency": "EUR", "price": 9980.00, "netPrice": 8083.80, "conditions": null, "vatRate": 19 }, "leasing": { "leasingTotalAmount": 1964.40, "netLoanAmount": null, "borrowingRate": null, "effectiveInterestRate": null, "bank": "ALD Leasing GmbH, Nedderfeld 95, 22529 Hamburg", "downPayment": 0.00, "finalInstallment": null, "duration": 24, "includedMileage": 10000, "factor": 0.25, "showFactor": true, "grossMonthlyRate": 81.85, "netMonthlyRate": 68.78, "residualValue": null, "conditions": null, "refundForLessDistance": null, "additionalDistanceCost": null }, "financing": { "bank": "ALD Leasing GmbH, Nedderfeld 95, 22529 Hamburg", "monthlyRate": 68.00, "netMontlyRate": 55.08, "debitInterestRate": 2.95, "annualRate": 2.99, "duration": 48, "includedMileage": null, "initialPayment": 2980.00, "endingRate": 4990.00, "grossCreditAmount": 8186.00, "netCreditAmount": 7443.00, "closingCosts": null, "paymentProtectionInsurance": 443.00, "conditions": null }, "rent": { "grossRentPrice": null, "netRentPrice": null, "inclusiveKm": null, "refundForLessDistance": null, "additionalDistanceCost": null, "duration": null, "conditions": null } }, "documents": { "expose": "https://..." }, "relationships": { "self": "/public/v1/offers/25" } } ], "links": { "first": "/public/v1/offers?page=1", "last": "/public/v1/offers?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "links": [ { "url": null, "label": "pagination.previous", "active": false }, { "url": "/public/v1/offers?page=1", "label": "1", "active": true }, { "url": null, "label": "pagination.next", "active": false } ], "path": "/public/v1/offers", "per_page": 15, "to": 1, "total": 1 } }

Parameters

You can add parameters such as paginate or filter to get the offers according to your needs.

Parameter

Target

Required

Constraints

Request

Description

Parameter

Target

Required

Constraints

Request

Description

paginate

pagination

The maximum value per page is 1000, by default the number per page of items is of 15 if the parameter is not present in the request

GET /offers?paginate=200

Get all the offers with 200 items per page.

code

filter

Filters by the codes. This is required for the “Merkliste”.

GET /offers?filter[code]=100,150

Get all the offers where the code is 100 OR 150

car.brand

filter

List available from service /references/brands

GET /offers?filter[car.brand]=20,23

Get all the offers where the car brand is 20 OR 23

car.model

filter

List available from service /references/brands

GET /offers?filter[car.model]=149

Get all the offers where the car model is 149

car.type

filter

List available from service /references/car-types

GET /offers?filter[car.type]=NW

Get all the offers where the car type code is “NW”

car.body

filter

List available from service /references/car-bodies

GET /offers?filter[car.body]=2,1

Get all the offers where the car body is 2 OR 1

car.transmission

filter

List available from service /references/transmissions

GET /offers?filter[car.transmission]=4

Get all the offers where the car transmission code is 4

car.fuel

filter

List available from service /references/fuels

GET /offers?filter[car.fuel]=1,3

Get all the offers where the car fuel is 1 OR 3

car.firstRegistration

filter

This filter needs a range of values like 2019-01,2020-12. If there is only one value, it will be used as the minimum value.

List available from service /references/first-registration

GET /offers?filter[car.firstRegistration]=2019-01,2019-12

Get all the cars registered between 2019-01 AND 2019-12

car.mileage

filter

This filter needs a range of values like 10000,30000. If there is only one value, it will be used as the minimum value.

List available from service /references/mileage

GET /offers?filter[car.mileage]=0,30000

Get all the cars with mileage between 0 AND 30000

 

filter

 

You can combine the filters according to your needs

GET /offers?filter[car.fuel]=1,3&filter[car.brand]=20,23

Get all the offers where the car fuel is 1 OR 3 AND car brand is 20 OR 23

car.brand (ascending)
-car.brand (descending)

sort

 

GET /offers?sort=car.brand

 

car.mileage (ascending)
-car.mileage (descending)

sort

 

GET /offers?sort=car.mileage

 

car.firstRegistration (ascending)
-car.firstRegistration (descending)

sort

 

GET /offers?sort=car.firstRegistration

 

prices.sale.price (ascending)
-prices.sale.price (descending)

sort

 

GET /offers?sort=prices.sale.price

The list will only include offers where a price is set.

prices.leasing.grossMonthlyRate (ascending)
-prices.leasing.grossMonthlyRate (descending)

sort

 

GET /offers?sort=prices.leasing.grossMonthlyRate

The list will only include offers where a gross monthly rate is set.

prices.rent.grossRentPrice (ascending)
-prices.rent.grossRentPrice (descending)

sort

 

GET /offers?sort=prices.rent.grossRentPrice

The list will only include offers where a gross rent price is set.

 

sort

 

You can combine the sorts according to your needs

GET /offers?sort=car.brand,car.mileage

Sort the offers by the brand and then by the mileage

Offer

This service will all the details for available offer.

Example

Request

GET /offers/25 Accept: application/json
GET /offers/8953A09 Accept: application/json
GET /offers/8953A09-peugeot-2008-1.2-puretech-82-allure-usb-klima-pdc-shz Accept: application/json

Response

{ "data": { "code": 25, "internalNumber": "8953A09", "slug": "8953A09-peugeot-2008-1.2-puretech-82-allure-usb-klima-pdc-shz", "title": "PEUGEOT 2008 1.2 PureTech 82 Allure USB KLIMA PDC SHZ", "createdAt": "2020-12-03T08:30:57.000000Z", "updatedAt": "2021-02-11T11:04:10.000000Z", "car": { "internalNumber": "8953F0633", "internalIdentNumber": "NW048646", "model": "2008", "brand": "Peugeot", "fuelCategory": "Benzin", "fuelConsumption": 7.4, "fuelConsumptionUrban": 9.1, "fuelConsumptionExtraUrban": 6.5, "mileage": 89000, "ps": null, "power": 60, "hsn": "3003", "cylinderCapacity": 1199, "firstRegistration": "2015-11", "carType": "Gebrauchtwagen", "carBody": "SUV/Geländewagen", "transmission": "manuelles Schaltgetriebe, 5-Gang", "doorCount": 5, "seatCount": 5, "bodyColor": "Weiss", "bodyColorName": "weiss", "eco": { "co2Emissions": null, "efficiencyClass": null, "efficiencyClassImage": "https://..", "euEmissionStandard": "Euro5", "germanEmissionsSticker": "4 - Grüne Plakette" }, "location": { "street": "Musterstraße 123", "zip": "123456", "city": "Musterhausen" }, "images": [ { "name": "neu-2", "extension": "JPG", "mimetype": "image/jpeg", "url": "https://.." } ], "details": [ { "category": "AUSSTATTUNG_KLIMA", "type": "CHECKBOX", "order": 20, "text": "Klimaautomatik", } ] }, "prices": { "sale": { "currency": "EUR", "price": 9980.00, "netPrice": 8083.80, "conditions": null, "vatRate": 19 }, "leasing": { "leasingTotalAmount": 1964.40, "netLoanAmount": null, "borrowingRate": null, "effectiveInterestRate": null, "bank": "ALD Leasing GmbH, Nedderfeld 95, 22529 Hamburg", "downPayment": 0.00, "finalInstallment": null, "duration": 24, "includedMileage": 10000, "factor": 0.25, "showFactor": true, "grossMonthlyRate": 81.85, "netMonthlyRate": 68.78, "residualValue": null, "conditions": null, "refundForLessDistance": null, "additionalDistanceCost": null }, "financing": { "bank": "ALD Leasing GmbH, Nedderfeld 95, 22529 Hamburg", "monthlyRate": 68.00, "netMontlyRate": 55.08, "debitInterestRate": 2.95, "annualRate": 2.99, "duration": 48, "includedMileage": null, "initialPayment": 2980.00, "endingRate": 4990.00, "grossCreditAmount": 8186.00, "netCreditAmount": 7443.00, "closingCosts": null, "paymentProtectionInsurance": 443.00, "conditions": null }, "rent": { "grossRentPrice": null, "netRentPrice": null, "inclusiveKm": null, "refundForLessDistance": null, "additionalDistanceCost": null, "duration": null, "conditions": null } }, "documents": { "expose": "https://..." }, "relationships": { "self": "/public/v1/offers/25" } } }

 

Reference-Services

A reference service will return the possible types of a resource.

Salutations

This service will list all the available salutations.

Example

Request

GET /references/salutations Accept: application/json

Response

{ "data": [ { "code": 1, "category": "PERSON", "name": "Herr" }, { "code": 2, "category": "PERSON", "name": "Frau" }, {...} ] }

Lead Types

This service will list all the available types of a lead.

Example

Request

GET /references/lead-types Accept: application/json

Response

{ "data": [ { "id": 1, "code": "REQUEST_OFFER", "name": "Angebot-Anfrage" }, { "id": 2, "code": "REQUEST_TEST_DRIVE", "name": "Probefahrt-Anfrage" }, {...} ] }

 

Brands

This service will list all the available brands and models.

Example

Request

GET /references/brands Accept: application/json

Response

{ "data": [ { "code": 2, "text": "AlfaRomeo", "offersCount": 20 "models": [ { "code": 3, "text": "Giulia", "offersCount": 5 }, { "code": 4, "text": "Giulietta", "offersCount": 15 }, ] }, {...}, ] }

Fuels

This service will list all the available fuels.

Example

Request

GET /references/fuels Accept: application/json

Response

{ "data": [ { "code": 135, "text": "Benzin" }, { "code": 136, "text": "Diesel" }, {...} ] }

Transmissions

This service will list all the available transmissions.

Example

Request

GET /references/transmissions Accept: application/json

Response

{ "data": [ { "code": 184, "text": "manuelles Schaltgetriebe, 4-Gang" }, { "code": 185, "text": "manuelles Schaltgetriebe, 5-Gang" }, {...}, ] }

Car Types

This service will list all the available car types.

Example

Request

GET /references/car-types Accept: application/json

Response

{ "data": [ { "code": 223, "text": "Neuwagen" }, { "code": 225, "text": "Gebrauchtwagen" }, {...}, ] }

Car Bodies

This service will list all the available car bodies.

Example

Request

GET /references/car-bodies Accept: application/json

Response

{ "data": [ { "code": 188, "text": "Kleinwagen" }, { "code": 189, "text": "Kombi" }, {...} ] }

Mileage

This service will list the min and max values of the mileage.

Example

Request

GET /references/mileage Accept: application/json

Response

{ "data": [ "min": 0, "max": 10000 ] }

First Registration

This service will list the min and max values of the firstRegistration.

Example

Request

GET /references/first-registration Accept: application/json

Response

{ "data": [ "min": { "full": "2000-01-01", "year": 2000, "month": 1, "day": 1 }, "max": { "full": "2021-01-01", "year": 2021, "month": 1, "day": 1 } ] }

 

Related content