Download OpenAPI specification:Download
Accept | any Example: application/vnd.api+json |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "1",
- "type": "light_photo"
}, - {
- "id": "2",
- "type": "light_photo"
}, - {
- "id": "3",
- "type": "light_photo"
}
]
}
{- "data": [
- {
- "id": "3",
- "type": "light_photo"
}, - {
- "id": "2",
- "type": "light_photo"
}, - {
- "id": "1",
- "type": "light_photo"
}
]
}
id | number Example: 1 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token cvaK9JZwemijK2jd1kxE |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": 1,
- "nameplate_id": 1,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:10.677Z",
- "updated_at": "2024-10-02T13:24:10.677Z",
- "msrp_price": "49264.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "used",
- "status": "stock",
- "delivery_date": "2024-10-27",
- "transmission": "auto",
- "vin": null,
- "mileage": 825276,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "power": 166,
- "video_url": null,
- "owner_id": 74,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "b28061",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
}
id | number Example: 20 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token XEQQgxuXm1HVEhjZdykn |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 98,
- "color_id": 27,
- "power": 166,
- "msrp_price": "33628.0",
- "base_price": null,
- "features_optional": null,
- "id": 20,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:11.718Z",
- "updated_at": "2024-10-02T13:24:11.739Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "delivery_date": "2024-10-29",
- "transmission": "manual",
- "vin": null,
- "mileage": 29644,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "ec4a5d",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
Action is used to lock vehicle after successful booking. It locks vehicle for 15 minutes in order to enable user completing the booking payment. In response it returns lock_id, which can be further used to perform acquire
action to permanently reserve or mark vehicle as sold.
Request Path
PUT /integration_api/buy_online/vehicles/:id/lock
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
Response
Request response is JSON. Vehicle details are returned under data
, while booking details (lock_id
and locked_until
) are returned under meta
> lock_data
.
When vehicle is not found, 404 status is returned.
When lock cannot be performed (because vehicle has reserved
or sold
status or it has already been locked), 422 status is returned.
id | number Example: 3 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token cp7vguKGrbxyGDSMJG_u |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "2ad1",
- "locked_until": "2024-10-02T13:39:10.782Z",
- "nameplate_id": 3,
- "owner_id": 76,
- "id": 3,
- "color_id": 10,
- "power": 161,
- "msrp_price": "21429.0",
- "base_price": null,
- "features_optional": null,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:10.772Z",
- "updated_at": "2024-10-02T13:24:10.808Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "status": "stock",
- "delivery_date": "2024-10-09",
- "transmission": "manual",
- "vin": null,
- "mileage": 892497,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "bev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "ed4bdb",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}, - "meta": {
- "lock_data": {
- "locked_until": "2024-10-02T13:39:10.782Z",
- "lock_id": "2ad1"
}
}
}
Action is used to unlock soft-locked vehicle. By providing vehicle id and its lock_id lock can be cancelled before expiration time.
Request Path
PUT /integration_api/buy_online/vehicles/:id/unlock/:lock_id
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
lock_id |
44c2 |
string | yes (in request path) | Lock ID of the vehicle |
Response
Request response is JSON. Vehicle details are returned under data
.
When vehicle is not found or is not locked, 404 status is returned.
When unlock fails, 422 status is returned.
Parameters
10
(number, required)lock-id
(string, required)Request returns 200 status when vehicle with lock_id is found
id | number Example: 10 |
lock_id | string Example: lock-id |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token EixszB8ivH-ndBHZZ_B5 |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": null,
- "locked_until": null,
- "nameplate_id": 10,
- "owner_id": 83,
- "color_id": 17,
- "power": 360,
- "msrp_price": "31258.0",
- "base_price": null,
- "features_optional": null,
- "id": 10,
- "version": "Multiversity",
- "drivetrain": "Detective Comics",
- "short_description": "Eius amet ut natus molestiae aliquid dignissimos soluta omnis esse.",
- "production_year": 2018,
- "created_at": "2024-10-02T13:24:11.144Z",
- "updated_at": "2024-10-02T13:24:11.176Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Molestiae ex nihil earum amet natus eos excepturi labore consectetur veritatis sit veniam corrupti qui vel facilis est et maiores.",
- "state": "approved",
- "status": "delivery",
- "delivery_date": "2024-10-03",
- "transmission": "auto",
- "vin": null,
- "mileage": 629056,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "a98d52",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Quae expedita possimus laboriosam quis sint aspernatur consectetur enim error.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
}
Action is used to permanently reserve or mark vehicle as sold. It is verified by lock id provided by lock
action and optionally removes vehicle from all listings.
Request Path
PUT /integration_api/buy_online/vehicles/:id/acquire
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
status |
reserved |
string | yes | requested status, possible values are reserved and sold |
lock_id |
12ab |
string | yes if vehicle has lock_id attr | used to check lock identity, if vehicle has matching lock_id, lock is overridden and status is changed |
remove_listings |
true | boolean | no | when set to true vehicle is removed from all listings |
Response
Request response is JSON. Vehicle details are returned under data
key.
When vehicle is not found, 404 status is returned.
When lock cannot be performed (when status param is invalid or lock ids don't match), 422 status is returned.
id | number Example: 15 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token ixtRZoMVQXLwYQPytK6J |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "status": "reserved",
- "manual_update_attributes": [
- "status"
], - "lock_id": null,
- "locked_until": null,
- "nameplate_id": 15,
- "owner_id": 93,
- "color_id": 22,
- "power": 310,
- "msrp_price": "42483.0",
- "base_price": null,
- "features_optional": null,
- "id": 15,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:11.492Z",
- "updated_at": "2024-10-02T13:24:11.511Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "delivery_date": "2024-10-27",
- "transmission": "auto",
- "vin": null,
- "mileage": 185970,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "5b1488",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
}
Authentication is implemented using the HTTP Bearer token.
Every request needs to include that token.
Example Authorization: Token abc123
- where abc123 is the token value.
Accept | any Example: application/json |
Content-Type | any Example: application/json |
Authorization | any Example: Token 17G2dCYu-u4sWGCzquqx |
{- "vehicle": {
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "production_year": 2015,
- "state": "used",
- "status": "reserved",
- "transmission": "manual",
- "engine_type": [
- "petrol"
], - "delivery_date": "2024-10-30",
- "power": 364,
- "msrp_price": 43196,
- "interior_color": "Ebony",
- "mileage": 927004,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "a7cf0f",
- "features_optional": null,
- "features_standard": null,
- "nameplate_name": "Hooloovoo",
- "color_name": "Chocolate Concrete",
}
}
{- "id": 25,
- "nameplate_id": 31,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.329Z",
- "updated_at": "2024-10-02T13:24:12.337Z",
- "msrp_price": "40806.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "status": "stock",
- "delivery_date": "2024-10-27",
- "transmission": "manual",
- "vin": null,
- "mileage": 861510,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 405,
- "video_url": null,
- "owner_id": 111,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f8dba3",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": null,
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": {
- "test": 1
}, - "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
This endpoint allows you to create or update a vehicle in the Stock Locator system. For vehicle creation, you need to provide a set of required attributes (described below) but there are some extra, non-obligatory attributes which may be worth filling in to keep the vehicle description as complete as possible. For vehicle update, the attributes marked as required are no longer required - if they are not provided, the Stock Locator application assumes that they don't have to be updated.
One attribute which is important in this API is external_id
- in general it is optional in the Stock Locator system, however in this API you should
consider it as required. This attribute allows you to set an ID (you should set your own value or use value from your stock management system). The
external_id
is later used to identify a vehicle you may want to update od remove from the system.
param | example | type | description |
---|---|---|---|
color_name |
'Eiger Grey' | string | See /colors endpoint for available colors. You can alternatively pass 'color_id' instead of the ID of the Color |
nameplate_name |
'F-Pace' | string | See /nameplates endpoint for available nameplates. You can alternatively pass nameplate_id instead with the ID of the Nameplate |
version |
'HSE' | string | Version/Trim Level name/description |
drivetrain |
'P300 AWD' | string | Drivetrain (Engine, gearbox etc) description |
state |
'new' | enum | Vehicle state. New, User or Approved |
status |
'stock' | enum | Stock status of the Vehicle |
transmission |
'auto' | enum | type of transmission, auto by default |
mileage |
123000 | number | vehicle mileage in ower company units |
engine_type |
['petrol', 'mhev'] | array | kind of engine, as a strings array |
production_year |
2020 | integer | Year when vehicle was manufacturedd |
msrp_price |
123000 | decimal(18,2) | Retailer price |
external_id |
'abd-3345' | string | External ID (of your choice) for the vehicle. Required to allow vehicle update/removal |
param | example | type | description |
---|---|---|---|
short_description |
'Lorem ipsum' | string | Short description paragraph |
sale_price |
120000 | decimal(18,2) | Sale Price |
monthly_price |
2500.01 | decimal(18,2) | Monthly price |
subscribe_price |
2700.00 | decimal(18,2) | Subscribe price |
long_description |
'Lorem ...' | string | Full description copy (potentialy HTML) |
delivery_date |
2020-02-02 | date | Date of delivery |
vin |
'XXX' | string | Vehicle Vin number |
engine_capacity |
1999 | number | engine capacity in ccm |
battery_capacity |
2020 | number | battery capacity in owner company units |
power |
200 | number | vehicle power in owner company units |
video_url |
'https://youtu.be/bJqimfimHjE' | string | youtube video url |
photos |
['http://site.com/1.png'] | array | photos url (first photo will become a cover photo) |
attachment |
'http://example.com/file.pdf' | string | attachment link |
features_standard |
[{"code": "S1", "label": "Label1"}, ...] | [Feature] | array of Feature-type objects, described below |
features_optional |
[{"code": "O1", "label": "Label2"}, ...] | [Feature] | array of Feature-type objects, described below |
interior_color |
'Snow white' | string | interior color |
price_hidden |
false | boolean | defines if the price should be hidden for visitors (default: false ) |
prices_type |
'incl_taxes' | string | defines if the price includes taxes |
metadata |
{ "some_key": "some_value" } | json | any metadata you'd like to set for the vehicle, not displayed in Stock Locator |
listing_ids |
[] | [integer] | array of liting IDs the vehicle should be published to. Empty array unpublishes the vehicle from all listings |
config_url |
'https://config.url/conf213' | string | link to configuration of the vehicle |
type |
DraftVehicle |
string | ActiveVehicle (default) or DraftVehicle |
Feature
type objectsEach "feature" is a JSON object with 3 possible attributes:
Allowed values for category
are:
state
valuesnew
used
approved
status
valuesstock
- Vehicles in stockdelivery
- Vehicle in deliveryreserved
- Reserved Vehicle (will be user later)in_production
- Vehicle in productionavailable_soon
- Vehicle will be available soonon_demand
- Vehicle is available on demandsold
- Vehicle has been soldtranssmision
valuesauto
manual
engine_type
valuespetrol
diesel
bev
- Electric Vehiclehev
- Hybridmhev
- Mild Hybridphev
- Plug-In Hybridprices_type
valuesincl_taxes
(if the price includes taxes)excl_taxes
(if the prices does not include taxes)null
/ empty - not specifiedAccept | any Example: application/vnd.api+json |
Authorization | any Example: Token UhscTxPwKWB_GwpA5sca |
Content-Type | any Example: application/vnd.api+json |
{- "vehicle": {
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "production_year": 2015,
- "state": "new",
- "status": "reserved",
- "transmission": "manual",
- "engine_type": [
- "phev"
], - "delivery_date": "2024-10-03",
- "power": 443,
- "msrp_price": 38548,
- "interior_color": "Ebony",
- "mileage": 272826,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "a573a6",
- "features_optional": null,
- "features_standard": null,
- "nameplate_name": "Hooloovoo",
- "color_name": "Chocolate Concrete",
}
}
{- "id": 26,
- "nameplate_id": 32,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.439Z",
- "updated_at": "2024-10-02T13:24:12.449Z",
- "msrp_price": "38548.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "status": "reserved",
- "delivery_date": "2024-10-03",
- "transmission": "manual",
- "vin": null,
- "mileage": 272826,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 443,
- "video_url": null,
- "owner_id": 113,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "a573a6",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": null,
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": {
- "test": 1
}, - "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
external_id | string Example: f50929aa-c2c5-4bd8-9a25-fe1b682153b4 |
external_id required | string Example: external_id=external_system_id_string Uniq Id from integrated system alowing to find particular vehicle |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token 4GDZxeZMbzSVScfkSsks |
Content-Type | any Example: application/vnd.api+json |
{- "id": 27,
- "nameplate_id": 33,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.523Z",
- "updated_at": "2024-10-02T13:24:12.523Z",
- "msrp_price": "42733.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "status": "in_production",
- "delivery_date": "2024-10-19",
- "transmission": "auto",
- "vin": null,
- "mileage": 76031,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "diesel"
], - "power": 175,
- "video_url": null,
- "owner_id": 116,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f50929aa-c2c5-4bd8-9a25-fe1b682153b4",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
Authentication is implemented using the HTTP Bearer token.
Every request needs to include that token.
Example Authorization: Token abc123
- where abc123 is the token value.
Accept | any Example: application/json |
Content-Type | any Example: application/json |
Authorization | any Example: Token 7sFtEsShaLsyStzaSS6X |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token Wc-Ds3d2hmeaNK8hhxud |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 29,
- "name": "Puce Steel",
- "canonical": "white",
- "owner_type": "Company",
- "owner_id": 102,
- "created_at": "2024-10-02T13:24:11.836Z",
- "updated_at": "2024-10-02T13:24:11.836Z"
}, - {
- "id": 30,
- "name": "Cerulean Granite",
- "canonical": "black",
- "owner_type": "Company",
- "owner_id": 102,
- "created_at": "2024-10-02T13:24:11.838Z",
- "updated_at": "2024-10-02T13:24:11.838Z"
}, - {
- "id": 31,
- "name": "Periwinkle Rubber",
- "canonical": "orange",
- "owner_type": "Company",
- "owner_id": 102,
- "created_at": "2024-10-02T13:24:11.840Z",
- "updated_at": "2024-10-02T13:24:11.840Z"
}
]
Authentication is implemented using the HTTP Bearer token.
Every request needs to include that token.
Example Authorization: Token abc123
- where abc123 is the token value.
Accept | any Example: application/json |
Content-Type | any Example: application/json |
Authorization | any Example: Token 5h6RzDzcxdsJZw2xAeax |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token MVzbFaoTM4fGDRzeXenR |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 22,
- "name": "Mattress",
- "brand_id": 56,
- "created_at": "2024-10-02T13:24:11.911Z",
- "updated_at": "2024-10-02T13:24:11.911Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 23,
- "name": "Hooloovoo",
- "brand_id": 57,
- "created_at": "2024-10-02T13:24:11.915Z",
- "updated_at": "2024-10-02T13:24:11.915Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 24,
- "name": "Belcerebon",
- "brand_id": 58,
- "created_at": "2024-10-02T13:24:11.920Z",
- "updated_at": "2024-10-02T13:24:11.920Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 25,
- "name": "Sarkopsi",
- "brand_id": 59,
- "created_at": "2024-10-02T13:24:11.924Z",
- "updated_at": "2024-10-02T13:24:11.924Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 26,
- "name": "Jatravartid",
- "brand_id": 60,
- "created_at": "2024-10-02T13:24:11.928Z",
- "updated_at": "2024-10-02T13:24:11.928Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}
]
vehicle_external_id | string Example: abc123 |
Accept | any Example: application/json |
Authorization | any Example: Token invalid_token |
Content-Type | any Example: application/json |
{
}
[- {
- "id": 4,
- "sequence": 0,
- "vehicle_id": 23,
- "created_at": "2024-10-02T13:24:12.120Z",
- "updated_at": "2024-10-02T13:24:12.137Z"
}
]
id | number Example: 1 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token cvaK9JZwemijK2jd1kxE |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": 1,
- "nameplate_id": 1,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:10.677Z",
- "updated_at": "2024-10-02T13:24:10.677Z",
- "msrp_price": "49264.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "used",
- "status": "stock",
- "delivery_date": "2024-10-27",
- "transmission": "auto",
- "vin": null,
- "mileage": 825276,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "power": 166,
- "video_url": null,
- "owner_id": 74,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "b28061",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
}
id | number Example: 20 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token XEQQgxuXm1HVEhjZdykn |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 98,
- "color_id": 27,
- "power": 166,
- "msrp_price": "33628.0",
- "base_price": null,
- "features_optional": null,
- "id": 20,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:11.718Z",
- "updated_at": "2024-10-02T13:24:11.739Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "delivery_date": "2024-10-29",
- "transmission": "manual",
- "vin": null,
- "mileage": 29644,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "ec4a5d",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
Action is used to lock vehicle after successful booking. It locks vehicle for 15 minutes in order to enable user completing the booking payment. In response it returns lock_id, which can be further used to perform acquire
action to permanently reserve or mark vehicle as sold.
Request Path
PUT /integration_api/buy_online/vehicles/:id/lock
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
Response
Request response is JSON. Vehicle details are returned under data
, while booking details (lock_id
and locked_until
) are returned under meta
> lock_data
.
When vehicle is not found, 404 status is returned.
When lock cannot be performed (because vehicle has reserved
or sold
status or it has already been locked), 422 status is returned.
id | number Example: 3 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token cp7vguKGrbxyGDSMJG_u |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "2ad1",
- "locked_until": "2024-10-02T13:39:10.782Z",
- "nameplate_id": 3,
- "owner_id": 76,
- "id": 3,
- "color_id": 10,
- "power": 161,
- "msrp_price": "21429.0",
- "base_price": null,
- "features_optional": null,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:10.772Z",
- "updated_at": "2024-10-02T13:24:10.808Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "status": "stock",
- "delivery_date": "2024-10-09",
- "transmission": "manual",
- "vin": null,
- "mileage": 892497,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "bev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "ed4bdb",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}, - "meta": {
- "lock_data": {
- "locked_until": "2024-10-02T13:39:10.782Z",
- "lock_id": "2ad1"
}
}
}
Action is used to unlock soft-locked vehicle. By providing vehicle id and its lock_id lock can be cancelled before expiration time.
Request Path
PUT /integration_api/buy_online/vehicles/:id/unlock/:lock_id
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
lock_id |
44c2 |
string | yes (in request path) | Lock ID of the vehicle |
Response
Request response is JSON. Vehicle details are returned under data
.
When vehicle is not found or is not locked, 404 status is returned.
When unlock fails, 422 status is returned.
Parameters
10
(number, required)lock-id
(string, required)Request returns 200 status when vehicle with lock_id is found
id | number Example: 10 |
lock_id | string Example: lock-id |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token EixszB8ivH-ndBHZZ_B5 |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": null,
- "locked_until": null,
- "nameplate_id": 10,
- "owner_id": 83,
- "color_id": 17,
- "power": 360,
- "msrp_price": "31258.0",
- "base_price": null,
- "features_optional": null,
- "id": 10,
- "version": "Multiversity",
- "drivetrain": "Detective Comics",
- "short_description": "Eius amet ut natus molestiae aliquid dignissimos soluta omnis esse.",
- "production_year": 2018,
- "created_at": "2024-10-02T13:24:11.144Z",
- "updated_at": "2024-10-02T13:24:11.176Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Molestiae ex nihil earum amet natus eos excepturi labore consectetur veritatis sit veniam corrupti qui vel facilis est et maiores.",
- "state": "approved",
- "status": "delivery",
- "delivery_date": "2024-10-03",
- "transmission": "auto",
- "vin": null,
- "mileage": 629056,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "a98d52",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Quae expedita possimus laboriosam quis sint aspernatur consectetur enim error.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
}
Action is used to permanently reserve or mark vehicle as sold. It is verified by lock id provided by lock
action and optionally removes vehicle from all listings.
Request Path
PUT /integration_api/buy_online/vehicles/:id/acquire
Request Header
Authorization: "Bearer {dealer authorization token}"
Request Body Structure
param | example | type | required | description |
---|---|---|---|---|
id |
2 | integer | yes (in request path) | Id of the vehicle in StockLocator |
status |
reserved |
string | yes | requested status, possible values are reserved and sold |
lock_id |
12ab |
string | yes if vehicle has lock_id attr | used to check lock identity, if vehicle has matching lock_id, lock is overridden and status is changed |
remove_listings |
true | boolean | no | when set to true vehicle is removed from all listings |
Response
Request response is JSON. Vehicle details are returned under data
key.
When vehicle is not found, 404 status is returned.
When lock cannot be performed (when status param is invalid or lock ids don't match), 422 status is returned.
id | number Example: 15 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token ixtRZoMVQXLwYQPytK6J |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "status": "reserved",
- "manual_update_attributes": [
- "status"
], - "lock_id": null,
- "locked_until": null,
- "nameplate_id": 15,
- "owner_id": 93,
- "color_id": 22,
- "power": 310,
- "msrp_price": "42483.0",
- "base_price": null,
- "features_optional": null,
- "id": 15,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:11.492Z",
- "updated_at": "2024-10-02T13:24:11.511Z",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "delivery_date": "2024-10-27",
- "transmission": "auto",
- "vin": null,
- "mileage": 185970,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "5b1488",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "code5000": null,
- "price_metadata": { },
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null
}
}
Authentication is implemented using the HTTP Bearer token.
Every request needs to include that token.
Example Authorization: Token abc123
- where abc123 is the token value.
Accept | any Example: application/json |
Content-Type | any Example: application/json |
Authorization | any Example: Token 17G2dCYu-u4sWGCzquqx |
{- "vehicle": {
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "production_year": 2015,
- "state": "used",
- "status": "reserved",
- "transmission": "manual",
- "engine_type": [
- "petrol"
], - "delivery_date": "2024-10-30",
- "power": 364,
- "msrp_price": 43196,
- "interior_color": "Ebony",
- "mileage": 927004,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "a7cf0f",
- "features_optional": null,
- "features_standard": null,
- "nameplate_name": "Hooloovoo",
- "color_name": "Chocolate Concrete",
}
}
{- "id": 25,
- "nameplate_id": 31,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.329Z",
- "updated_at": "2024-10-02T13:24:12.337Z",
- "msrp_price": "40806.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "status": "stock",
- "delivery_date": "2024-10-27",
- "transmission": "manual",
- "vin": null,
- "mileage": 861510,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 405,
- "video_url": null,
- "owner_id": 111,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f8dba3",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": null,
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": {
- "test": 1
}, - "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
This endpoint allows you to create or update a vehicle in the Stock Locator system. For vehicle creation, you need to provide a set of required attributes (described below) but there are some extra, non-obligatory attributes which may be worth filling in to keep the vehicle description as complete as possible. For vehicle update, the attributes marked as required are no longer required - if they are not provided, the Stock Locator application assumes that they don't have to be updated.
One attribute which is important in this API is external_id
- in general it is optional in the Stock Locator system, however in this API you should
consider it as required. This attribute allows you to set an ID (you should set your own value or use value from your stock management system). The
external_id
is later used to identify a vehicle you may want to update od remove from the system.
param | example | type | description |
---|---|---|---|
color_name |
'Eiger Grey' | string | See /colors endpoint for available colors. You can alternatively pass 'color_id' instead of the ID of the Color |
nameplate_name |
'F-Pace' | string | See /nameplates endpoint for available nameplates. You can alternatively pass nameplate_id instead with the ID of the Nameplate |
version |
'HSE' | string | Version/Trim Level name/description |
drivetrain |
'P300 AWD' | string | Drivetrain (Engine, gearbox etc) description |
state |
'new' | enum | Vehicle state. New, User or Approved |
status |
'stock' | enum | Stock status of the Vehicle |
transmission |
'auto' | enum | type of transmission, auto by default |
mileage |
123000 | number | vehicle mileage in ower company units |
engine_type |
['petrol', 'mhev'] | array | kind of engine, as a strings array |
production_year |
2020 | integer | Year when vehicle was manufacturedd |
msrp_price |
123000 | decimal(18,2) | Retailer price |
external_id |
'abd-3345' | string | External ID (of your choice) for the vehicle. Required to allow vehicle update/removal |
param | example | type | description |
---|---|---|---|
short_description |
'Lorem ipsum' | string | Short description paragraph |
sale_price |
120000 | decimal(18,2) | Sale Price |
monthly_price |
2500.01 | decimal(18,2) | Monthly price |
subscribe_price |
2700.00 | decimal(18,2) | Subscribe price |
long_description |
'Lorem ...' | string | Full description copy (potentialy HTML) |
delivery_date |
2020-02-02 | date | Date of delivery |
vin |
'XXX' | string | Vehicle Vin number |
engine_capacity |
1999 | number | engine capacity in ccm |
battery_capacity |
2020 | number | battery capacity in owner company units |
power |
200 | number | vehicle power in owner company units |
video_url |
'https://youtu.be/bJqimfimHjE' | string | youtube video url |
photos |
['http://site.com/1.png'] | array | photos url (first photo will become a cover photo) |
attachment |
'http://example.com/file.pdf' | string | attachment link |
features_standard |
[{"code": "S1", "label": "Label1"}, ...] | [Feature] | array of Feature-type objects, described below |
features_optional |
[{"code": "O1", "label": "Label2"}, ...] | [Feature] | array of Feature-type objects, described below |
interior_color |
'Snow white' | string | interior color |
price_hidden |
false | boolean | defines if the price should be hidden for visitors (default: false ) |
prices_type |
'incl_taxes' | string | defines if the price includes taxes |
metadata |
{ "some_key": "some_value" } | json | any metadata you'd like to set for the vehicle, not displayed in Stock Locator |
listing_ids |
[] | [integer] | array of liting IDs the vehicle should be published to. Empty array unpublishes the vehicle from all listings |
config_url |
'https://config.url/conf213' | string | link to configuration of the vehicle |
type |
DraftVehicle |
string | ActiveVehicle (default) or DraftVehicle |
Feature
type objectsEach "feature" is a JSON object with 3 possible attributes:
Allowed values for category
are:
state
valuesnew
used
approved
status
valuesstock
- Vehicles in stockdelivery
- Vehicle in deliveryreserved
- Reserved Vehicle (will be user later)in_production
- Vehicle in productionavailable_soon
- Vehicle will be available soonon_demand
- Vehicle is available on demandsold
- Vehicle has been soldtranssmision
valuesauto
manual
engine_type
valuespetrol
diesel
bev
- Electric Vehiclehev
- Hybridmhev
- Mild Hybridphev
- Plug-In Hybridprices_type
valuesincl_taxes
(if the price includes taxes)excl_taxes
(if the prices does not include taxes)null
/ empty - not specifiedAccept | any Example: application/vnd.api+json |
Authorization | any Example: Token UhscTxPwKWB_GwpA5sca |
Content-Type | any Example: application/vnd.api+json |
{- "vehicle": {
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "production_year": 2015,
- "state": "new",
- "status": "reserved",
- "transmission": "manual",
- "engine_type": [
- "phev"
], - "delivery_date": "2024-10-03",
- "power": 443,
- "msrp_price": 38548,
- "interior_color": "Ebony",
- "mileage": 272826,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "a573a6",
- "features_optional": null,
- "features_standard": null,
- "nameplate_name": "Hooloovoo",
- "color_name": "Chocolate Concrete",
}
}
{- "id": 26,
- "nameplate_id": 32,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.439Z",
- "updated_at": "2024-10-02T13:24:12.449Z",
- "msrp_price": "38548.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "new",
- "status": "reserved",
- "delivery_date": "2024-10-03",
- "transmission": "manual",
- "vin": null,
- "mileage": 272826,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 443,
- "video_url": null,
- "owner_id": 113,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "a573a6",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": null,
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": {
- "test": 1
}, - "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
external_id | string Example: f50929aa-c2c5-4bd8-9a25-fe1b682153b4 |
external_id required | string Example: external_id=external_system_id_string Uniq Id from integrated system alowing to find particular vehicle |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token 4GDZxeZMbzSVScfkSsks |
Content-Type | any Example: application/vnd.api+json |
{- "id": 27,
- "nameplate_id": 33,
- "version": "Crisis On Infinite Earths",
- "drivetrain": "The Sinestro Corps War",
- "short_description": "Blanditiis quia laudantium numquam voluptate et eos earum quaerat quae.",
- "production_year": 2015,
- "created_at": "2024-10-02T13:24:12.523Z",
- "updated_at": "2024-10-02T13:24:12.523Z",
- "msrp_price": "42733.0",
- "sale_price": null,
- "monthly_price": null,
- "long_description": "Id laborum perferendis eaque illo repellendus autem quo aut iste enim explicabo doloremque voluptas alias suscipit culpa hic aut non.",
- "state": "approved",
- "status": "in_production",
- "delivery_date": "2024-10-19",
- "transmission": "auto",
- "vin": null,
- "mileage": 76031,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "diesel"
], - "power": 175,
- "video_url": null,
- "owner_id": 116,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f50929aa-c2c5-4bd8-9a25-fe1b682153b4",
- "interior_color": "Ebony",
- "created_by": null,
- "price_hidden": false,
- "prices_type": null,
- "model_code": null,
- "footnote": "Deserunt est aut iure et enim rem nobis natus consectetur.",
- "config_url": null,
- "subscribe_price": null,
- "vehicle_batch_upload_id": null,
- "order_number": null,
- "metadata": null,
- "locked_until": null,
- "lock_id": null,
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "base_price": null,
- "total_price": null
}
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token token |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "179",
- "type": "company",
- "attributes": {
- "name": "Ritchie-Kunde",
- "uuid": "bf3a19cb-8470-4580-a869-ce0691aac8da"
}
}, - {
- "id": "180",
- "type": "company",
- "attributes": {
- "name": "Barton Inc",
- "uuid": "00e920b3-6fb7-4451-af76-253a198ae652"
}
}, - {
- "id": "181",
- "type": "company",
- "attributes": {
- "name": "Marquardt-Kozey",
- "uuid": "5dc6c83b-a5de-46c0-8a10-36c8230f667d"
}
}
]
}
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token token |
Content-Type | any Example: application/vnd.api+json |
{- "data": "digraph G {\n \"182\" [label=\"Ritchie-Kunde\"]\n}\n"
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: e847eb27-d448-4660-85c7-f897be98ba73 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [ ]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 68d4a66a-7436-48ef-b76b-f792b5b1d626 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Ligier",
- "brand_code": "jlr"
}
}
}
{- "data": {
- "id": "4",
- "type": "brand",
- "attributes": {
- "name": "Ligier"
}, - "relationships": {
- "nameplates": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "self": "/brands/4",
- "all": "/brands"
}
}
}
id | number Example: 3 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: dff85ed5-f42c-4078-8704-a49d7b9c89a1 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "3",
- "type": "brand",
- "attributes": {
- "name": "Ligier"
}, - "relationships": {
- "nameplates": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "self": "/brands/3",
- "all": "/brands"
}
}
}
id | number Example: 5 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 3d402d4d-059a-4c85-8cc9-069b575fcbda |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Barton Inc",
- "brand_code": "jlr"
}
}
}
{- "data": {
- "id": "5",
- "type": "brand",
- "attributes": {
- "name": "Barton Inc"
}, - "relationships": {
- "nameplates": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "self": "/brands/5",
- "all": "/brands"
}
}
}
attr | type | required | example | notes |
---|---|---|---|---|
label |
string | yes | "Main set" | ButtonSet name |
buttons |
array | no | [{"label": "Click here", ...}] | Nested buttons attributes (see table below) |
button_set_type |
string | yes | "extended" | Can be either "standard" or "extended" |
reservation_fee |
decimal(18,2) | if extended(*) | 2000.00 | Reservation fee |
financing_options |
array | if extended(*) | ["cash"] | Multiselect - array can contain some or all of following values: ['cash', 'lease', 'rent'] |
(*) - reservation_fee
and financing_options
attributes are required only, if button_set_type
value is set to extended
attr | type | required | example | notes |
---|---|---|---|---|
label | string | yes | "Click here" | Button label displayed to user |
target | string | yes | "john@doe.com" | Target URL, phone, code (embed) etc. |
button_type | enum | yes | "secondary" | A type of a button (primary/secondary) |
target_action | enum | yes | "self" | Defines what happens on button click |
target_type | enum | yes | "email" | Defines a type of a target action |
Button type can be either primary
or secondary
. Please note that only 1 primary button is allowed for a company. Secondary buttons are optional.
Defines what happens when the button is clicked. Accepted values:
self
- executes defined action in current browser's tabnew_tab
- executes defined action in a new tabmodal
- executes defined action in a modalattr | type | reqiured | example | notes |
---|---|---|---|---|
name | string | yes | "Firenze Red" | Display name of the color showed to end user |
canonical | enum | yes | "red" | Canonical color mapping, used for filtering |
Brand Color name can not be very descriptive, also local retailers sometimes want to add their own colors named in local language like "Niebieski".
On the other hand customers looking for a vehicle do not want to find "Fuji White" vehicles. They are interested in selecting actuall color like brown.
Thats why all Colors in the system require to be mapped to predetermined color pallet through the canonical
attribute.
This attribute is strongly validated againts list determined by system and only available options are:
This endpoint will return two combined sets of Colors
Brand
objectsX-Company-UUID
headerAccept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: a95abe2f-f2c4-42db-8298-5b30153b1d90 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "2",
- "type": "color",
- "attributes": {
- "name": "Azure Wool",
- "canonical": "orange"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "28",
- "type": "company"
}
}
}, - "links": {
- "self": "/brands/2",
- "all": "/brands"
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 8576e406-0874-4f1b-ba9b-1cd57926d46f |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Puce Steel",
- "canonical": "red"
}
}
}
{- "data": {
- "id": "4",
- "type": "color",
- "attributes": {
- "name": "Puce Steel",
- "canonical": "red"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "30",
- "type": "company"
}
}
}, - "links": {
- "self": "/brands/4",
- "all": "/brands"
}
}
}
This endpoint will return color only if it is in one of the disinct sets
Brand
objectsX-Company-UUID
headerNote: Colors owned by other Companies will trigger 404
response.
id | number Example: 3 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 96ded36a-6158-4fa5-9120-173caaf2dfb4 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "3",
- "type": "color",
- "attributes": {
- "name": "Puce Steel",
- "canonical": "black"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "29",
- "type": "company"
}
}
}, - "links": {
- "self": "/brands/3",
- "all": "/brands"
}
}
}
Owner is defined based on required X-Company-UUID
header.
API does not allow for modification of Colors other then owned by a Company specified by X-Company-UUID
header.
There is no option to modify Brand
owned colors through this API.
id | number Example: 5 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 5829db22-7baa-4a73-818a-e4a8cc8de590 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "King and Sons",
- "canonical": "yellow"
}
}
}
{- "data": {
- "id": "5",
- "type": "color",
- "attributes": {
- "name": "King and Sons",
- "canonical": "yellow"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "32",
- "type": "company"
}
}
}, - "links": {
- "self": "/brands/5",
- "all": "/brands"
}
}
}
Owner is defined based on required X-Company-UUID
header.
API does not allow to delete Colors not owned by a Company specified
by X-Company-UUID
header.
This also means Brand
owner colors cannot be deleted through the API.
id | number Example: 7 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 72d53dd0-df93-4adb-b0de-476223c615ef |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
Represents Company data.
All API actions are to be executed in the context of selected Company.
uuid
parameterCompany object is by default equiped with randomly generate uuid
attribute.
It's purpose is to be Company unique indentifier used in X-Company-UUID
header
to filter all action and resources in the API requests.
NOTE: uuid
value cannot be modified directly through the api calls.
All API Actions performed on Companies are scoped to current company instance.
The current company is found based on the X-Company-UUID
header value.
Due to this the some Company controller actions and URLs were changed.
Verb | Old URL | New URL | Behaviour (after changes) |
---|---|---|---|
GET | /companies | (same) | It list only current company and its Subcompanies |
POST | /companies | (same) | Creates compnany owned by current company |
GET | /company | /companies/{id} | Fetches Current Company |
PATCH | /company | /companies/{id} | Updates Current Company |
For easier transition both new and old URLs are working simultanously.
Company Deleting endpoit was turned off
All actions performed on Company
objects need to happen in context of current Company
object.
Current Company is determined based on X-Company-UUID
header value. This value should contain uuid
attribute of
Company
obejct.
If header is not present API will raise 400 - Bad Request
response with information about missing header
If header is present but no Company with provided uuid
values is present in the database the 404 - Not Found
response is given.
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
X-Company-UUID | any Example: bad-uuid-value |
{- "errors": [
- {
- "status": 400,
- "source": null,
- "title": "Bad Request",
- "detail": "X-Company-UUID header is missing"
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 0ee7eb4f-844b-48d2-b43b-1299c249e50e |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "37",
- "type": "company",
- "attributes": {
- "uuid": "0ee7eb4f-844b-48d2-b43b-1299c249e50e",
- "name": "Ritchie-Kunde",
- "city": "Hermistonshire",
- "address": "99667 Major Corners, Antoniomouth, LA 39348-8794",
- "phone": "+994 987.432.9120",
- "email": "harriett@lesch.io",
- "locale": "ro_RO",
- "currency": "GBP",
- "zipcode": null,
- "timezone": "UTC",
- "mileage_unit": "km",
- "power_unit": "bhp",
- "engine_capacity_unit": "cc",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "contact_details": "31019 Velvet Rest\nLake Irafurt",
- "skip_company_name_in_location": false,
- "config_locale": null,
- "account_type": "importer",
- "state": null,
- "dealer_codes": [ ],
- "operating_states": [
- "NSW",
- "VIC"
], - "feature_flag_policies": [ ]
}, - "relationships": {
- "parent": {
- "data": null
}, - "children": {
- "data": [ ]
}, - "descendants": {
- "data": [ ]
}, - "ancestors": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "all": "/companies"
}, - "meta": {
- "power_units": [
- "bhp",
- "kw"
], - "mileage_units": [
- "km",
- "mi"
], - "engine_capacity_units": [
- "cc",
- "l"
]
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 88d2387c-5ca3-470c-85e1-aa1e6d658f50 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Barton Inc",
- "city": "Randellshire",
- "address": "Apt. 836 403 Marks Points, New Deonton, SD 94716-7763",
- "email": "julian.bashirian@lueilwitz.io",
- "phone": "+685 1-379-505-1252 x131",
- "locale": "pl_PL",
- "currency": "JMD",
- "contact_details": "87669 Kathrin Pass\nLarkinborough",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "skip_company_name_in_location": false,
- "account_type": "importer",
- "operating_states": [
- "NSW",
- "VIC"
]
}
}
}
{- "data": {
- "id": "56",
- "type": "company",
- "attributes": {
- "uuid": "b840feb3-9144-4bb3-a8ed-d542c93baec6",
- "name": "Barton Inc",
- "city": "Randellshire",
- "address": "Apt. 836 403 Marks Points, New Deonton, SD 94716-7763",
- "phone": "+685 1-379-505-1252 x131",
- "email": "julian.bashirian@lueilwitz.io",
- "locale": "pl_PL",
- "currency": "JMD",
- "zipcode": null,
- "timezone": "UTC",
- "mileage_unit": "km",
- "power_unit": "bhp",
- "engine_capacity_unit": "cc",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "contact_details": "87669 Kathrin Pass\nLarkinborough",
- "skip_company_name_in_location": false,
- "config_locale": null,
- "account_type": null,
- "state": null,
- "dealer_codes": [ ],
- "operating_states": [
- "NSW",
- "VIC"
], - "feature_flag_policies": [ ]
}, - "relationships": {
- "parent": {
- "data": {
- "id": "55",
- "type": "company"
}
}, - "children": {
- "data": [ ]
}, - "descendants": {
- "data": [ ]
}, - "ancestors": {
- "data": [
- {
- "id": "55",
- "type": "company"
}
]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "all": "/companies"
}, - "meta": {
- "power_units": [
- "bhp",
- "kw"
], - "mileage_units": [
- "km",
- "mi"
], - "engine_capacity_units": [
- "cc",
- "l"
]
}
}
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 3d199949-adfd-4db0-bb9e-a3630353bda9 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [ ]
}
This endpoints provide option to fetch all Timezones needed to update Compane Time Zone setting.
It is possible to filter this list to only specific country based on country ISO code but list of all available 151 zones is also available.
TimeZone name
and id
attributes are the same value and it should be used as value for time_zone company attribute when updating data.
country_code | string Example: IN |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: a6c6e9ac-a217-4af5-904e-c255d66c9d99 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "Chennai",
- "type": "time_zone",
- "attributes": {
- "name": "Chennai",
- "label": "Chennai [GMT+05:30]",
- "formatted_offset": "+05:30",
- "tz_identifier": "Asia/Kolkata"
}
}, - {
- "id": "Kolkata",
- "type": "time_zone",
- "attributes": {
- "name": "Kolkata",
- "label": "Kolkata [GMT+05:30]",
- "formatted_offset": "+05:30",
- "tz_identifier": "Asia/Kolkata"
}
}, - {
- "id": "Mumbai",
- "type": "time_zone",
- "attributes": {
- "name": "Mumbai",
- "label": "Mumbai [GMT+05:30]",
- "formatted_offset": "+05:30",
- "tz_identifier": "Asia/Kolkata"
}
}, - {
- "id": "New Delhi",
- "type": "time_zone",
- "attributes": {
- "name": "New Delhi",
- "label": "New Delhi [GMT+05:30]",
- "formatted_offset": "+05:30",
- "tz_identifier": "Asia/Kolkata"
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: cc750d74-6535-47af-ac37-b3630d4cc6c7 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "53",
- "type": "company",
- "attributes": {
- "uuid": "cc750d74-6535-47af-ac37-b3630d4cc6c7",
- "name": "Ritchie-Kunde",
- "city": "Hermistonshire",
- "address": "99667 Major Corners, Antoniomouth, LA 39348-8794",
- "phone": "+994 987.432.9120",
- "email": "harriett@lesch.io",
- "locale": "ro_RO",
- "currency": "GBP",
- "zipcode": null,
- "timezone": "UTC",
- "mileage_unit": "km",
- "power_unit": "bhp",
- "engine_capacity_unit": "cc",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "contact_details": "31019 Velvet Rest\nLake Irafurt",
- "skip_company_name_in_location": false,
- "config_locale": null,
- "account_type": "importer",
- "state": null,
- "dealer_codes": [ ],
- "operating_states": [
- "NSW",
- "VIC"
], - "feature_flag_policies": [ ]
}, - "relationships": {
- "parent": {
- "data": null
}, - "children": {
- "data": [ ]
}, - "descendants": {
- "data": [ ]
}, - "ancestors": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "all": "/companies"
}, - "meta": {
- "power_units": [
- "bhp",
- "kw"
], - "mileage_units": [
- "km",
- "mi"
], - "engine_capacity_units": [
- "cc",
- "l"
]
}
}
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 889bbf0a-7da8-48c6-9bfa-5f71aefa3c35 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Barton Inc",
- "city": "Dwayneborough",
- "address": "4039 Saundra Underpass, Port Bryanna, GA 71677",
- "email": "hedy.hessel@koch.info",
- "phone": "+1-268 716-279-5051 x252",
- "locale": "ro_RO",
- "currency": "VND",
- "contact_details": "411 Armstrong Brook\nArmstrongfurt",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "skip_company_name_in_location": false,
- "account_type": "importer",
- "operating_states": [
- "NSW",
- "VIC"
]
}
}
}
{- "data": {
- "id": "58",
- "type": "company",
- "attributes": {
- "uuid": "889bbf0a-7da8-48c6-9bfa-5f71aefa3c35",
- "name": "Barton Inc",
- "city": "Dwayneborough",
- "address": "4039 Saundra Underpass, Port Bryanna, GA 71677",
- "phone": "+1-268 716-279-5051 x252",
- "email": "hedy.hessel@koch.info",
- "locale": "ro_RO",
- "currency": "VND",
- "zipcode": null,
- "timezone": "UTC",
- "mileage_unit": "km",
- "power_unit": "bhp",
- "engine_capacity_unit": "cc",
- "opening_hours": "Mon-Fri: 9:00 - 19:00\nSat: 11:00 - 18:00\nSun: Closed\n",
- "contact_details": "411 Armstrong Brook\nArmstrongfurt",
- "skip_company_name_in_location": false,
- "config_locale": null,
- "account_type": "retailer",
- "state": null,
- "dealer_codes": [ ],
- "operating_states": [
- "NSW",
- "VIC"
], - "feature_flag_policies": [ ]
}, - "relationships": {
- "parent": {
- "data": null
}, - "children": {
- "data": [ ]
}, - "descendants": {
- "data": [ ]
}, - "ancestors": {
- "data": [ ]
}, - "colors": {
- "data": [ ]
}
}, - "links": {
- "all": "/companies"
}, - "meta": {
- "power_units": [
- "bhp",
- "kw"
], - "mileage_units": [
- "km",
- "mi"
], - "engine_capacity_units": [
- "cc",
- "l"
]
}
}
}
GET /feature_flag_policies/flags
This endpoint is used to get flags for owner defined in params.
param | example | type | required | description |
---|---|---|---|---|
company_uuid |
1 | integer | yes | uuid of the company |
brand_ids |
1 | integer | no | ids of brands (spearated by comma) |
To fetch flags only for company, we define only company_uuid
paramater. If we want to get additional brand flags we have to define specific brand_ids
.
status 200
Returns array with flags for defined owners. If there is no flags array will be empty.
status 404
Company defined in params does not exist.
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 72cbd6a5-2fa6-4344-9937-18146a9b0e78 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "company_uuid": "72cbd6a5-2fa6-4344-9937-18146a9b0e78"
}
{- "data": [
- "avl_field"
]
}
GET /job_results/:job_uid
This endpoint is used to fetch the result of completed asynchronous job.
param | example | type | required | description |
---|---|---|---|---|
job_uid |
1 | string | yes (in url) | uid of the job |
status 200
Job result was found and it has follwing attributes:
job_uid
- uid of the job
data
- data of the job result
status 404
Job result was not found
job_uid | string Example: JBGRP8BW1hs1bOn6 |
Accept | any Example: application/json |
X-Company-UUID | any Example: 7e3d9345-1847-4143-8476-bdf9f29193ea |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/json |
{- "job_uid": "JBGRP8BW1hs1bOn6",
- "data": {
- "data": "details"
}
}
POST /osvd/vehicle_import
This endpoint is used to trigger vehicle mapper job to fetch data for the vehicle from OSVD API
param | example | type | required | description |
---|---|---|---|---|
vehicle_id |
SALVT1BG1EH795896 | string | yes (in url) | VIN or order number of the vehicle |
job_uid
- uid of the job
vehicle_id
- id of the vehicle
vehicle_id_type
- id type, can be 'vin' in case alphabetic characters are dected in vehicle in id or 'order_number' otherwise
Accept | any Example: application/json |
X-Company-UUID | any Example: 04952082-c1ce-4edd-a717-f42e2cf11566 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/json |
{- "data": {
- "attributes": {
- "vehicle_id": "SALVT1BG1EH795896"
}
}
}
{- "vehicle_id": "SALVT1BG1EH795896",
- "vehicle_id_type": "vin",
- "job_uid": null
}
attr | type | reqiured | example | notes |
---|---|---|---|---|
title | string | yes | "Winter Sale" | Display name of the list to be displayed in system |
uuid
parameterListing object is by default equiped with randomly generate uuid
attribute.
It's purpose is to be Listing unique indentifier used when fetchin vehicles on external websites
through the API.
NOTE: uuid
value cannot be modified directly through the api calls.
All actions performed on Listing
objects need to happen in context of Company
object.
The Company is determined based on X-Company-UUID
header value. This value should contain uuid
attribute of
Company
obejct.
If header is not present API will raise 400 - Bad Request
response with information about missing header
If header is present but no Company with provided uuid
values is present in the database the 404 - Not Found
response is given.
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
X-Company-UUID | any Example: bad-uuid-value |
{- "errors": [
- {
- "status": 400,
- "source": null,
- "title": "Bad Request",
- "detail": "X-Company-UUID header is missing"
}
]
}
This endpoint will return Listings owned by a Company specified by X-Company-UUID
header
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 91325719-dda7-44a1-9d86-d76d5371a0ae |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "3",
- "type": "listing",
- "attributes": {
- "title": "Massaman Curry 3",
- "uuid": "549d02bb-2722-45de-a95d-039309afe451",
- "sort_order": "desc",
- "sort_attribute": "display_price",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "132",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "25",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/3",
- "all": "/listings"
}, - "meta": {
- "sort_order": [
- "asc",
- "desc"
], - "sort_attribute": [
- "production_year",
- "created_at",
- "mileage",
- "display_price",
- "status_sort"
]
}
}, - {
- "id": "4",
- "type": "listing",
- "attributes": {
- "title": "Souvlaki 4",
- "uuid": "c3749ccf-d99b-4639-9bbf-f718daa2cd33",
- "sort_order": "asc",
- "sort_attribute": "display_price",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "132",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "26",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/4",
- "all": "/listings"
}, - "meta": {
- "sort_order": [
- "asc",
- "desc"
], - "sort_attribute": [
- "production_year",
- "created_at",
- "mileage",
- "display_price",
- "status_sort"
]
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 1a794d9f-a14d-4da0-b384-3c71f7f35ee1 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "title": "Massaman Curry 8",
- "sort_order": "asc",
- "sort_attribute": "mileage",
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
]
}, - "relationships": {
- "button_set": {
- "data": {
- "type": "button_set",
- "id": 38
}
}
}
}
}
{- "data": {
- "id": "8",
- "type": "listing",
- "attributes": {
- "title": "Massaman Curry 8",
- "uuid": "da664e3f-9d98-45cf-a7da-17a7f72d5c34",
- "sort_order": "asc",
- "sort_attribute": "mileage",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "153",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "38",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/8",
- "all": "/listings"
}, - "meta": {
- "sort_order": [
- "asc",
- "desc"
], - "sort_attribute": [
- "production_year",
- "created_at",
- "mileage",
- "display_price",
- "status_sort"
]
}
}, - "included": [
- {
- "id": "23",
- "type": "button",
- "attributes": {
- "label": "explicabo",
- "button_type": "secondary",
- "target_type": "url",
- "target_action": "self"
}
}, - {
- "id": "24",
- "type": "button",
- "attributes": {
- "label": "provident",
- "button_type": "secondary",
- "target_type": "url",
- "target_action": "self"
}
}, - {
- "id": "38",
- "type": "button_set",
- "attributes": {
- "button_set_type": "standard",
- "created_at": "2024-10-02T13:24:13.279Z",
- "financing_options": null,
- "name": "dolorum 37",
- "reservation_fee": null
}, - "relationships": {
- "buttons": {
- "data": [
- {
- "id": "23",
- "type": "button"
}, - {
- "id": "24",
- "type": "button"
}
]
}, - "listings": {
- "data": [
- {
- "id": "8",
- "type": "listing"
}
]
}
}
}
]
}
This endpoint will return Listings owned by a Company specified by X-Company-UUID
header.
Note: Colors owned by other Companies will trigger 404
response.
id | number Example: 7 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 4832e0eb-765f-45fb-b46b-05f6d0b1fe22 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "7",
- "type": "listing",
- "attributes": {
- "title": "Massaman Curry 7",
- "uuid": "37c91951-76c3-4fa6-82e0-e082df7dc5cb",
- "sort_order": "desc",
- "sort_attribute": "display_price",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "147",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "35",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/7",
- "all": "/listings"
}, - "meta": {
- "sort_order": [
- "asc",
- "desc"
], - "sort_attribute": [
- "production_year",
- "created_at",
- "mileage",
- "display_price",
- "status_sort"
]
}
}, - "included": [
- {
- "id": "35",
- "type": "button_set",
- "attributes": {
- "button_set_type": "standard",
- "created_at": "2024-10-02T13:24:13.174Z",
- "financing_options": null,
- "name": "quisquam 34",
- "reservation_fee": null
}, - "relationships": {
- "buttons": {
- "data": [ ]
}, - "listings": {
- "data": [
- {
- "id": "7",
- "type": "listing"
}
]
}
}
}
]
}
Owner is defined based on required X-Company-UUID
header.
id | number Example: 9 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 339233d1-35eb-4eeb-8ccb-5475e77305d4 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "title": "Fettuccine Alfredo 11",
- "sort_order": "desc",
- "sort_attribute": "production_year",
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
]
}, - "relationships": {
- "button_set": {
- "data": {
- "type": "button_set",
- "id": 44
}
}
}
}
}
{- "data": {
- "id": "9",
- "type": "listing",
- "attributes": {
- "title": "Fettuccine Alfredo 11",
- "uuid": "2a51c374-dd11-4ba4-b88d-ca4fda2079c3",
- "sort_order": "desc",
- "sort_attribute": "production_year",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "163",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "44",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/9",
- "all": "/listings"
}, - "meta": {
- "sort_order": [
- "asc",
- "desc"
], - "sort_attribute": [
- "production_year",
- "created_at",
- "mileage",
- "display_price",
- "status_sort"
]
}
}, - "included": [
- {
- "id": "27",
- "type": "button",
- "attributes": {
- "label": "explicabo",
- "button_type": "secondary",
- "target_type": "url",
- "target_action": "self"
}
}, - {
- "id": "28",
- "type": "button",
- "attributes": {
- "label": "provident",
- "button_type": "secondary",
- "target_type": "url",
- "target_action": "self"
}
}, - {
- "id": "44",
- "type": "button_set",
- "attributes": {
- "button_set_type": "standard",
- "created_at": "2024-10-02T13:24:13.438Z",
- "financing_options": null,
- "name": "dolorum 43",
- "reservation_fee": null
}, - "relationships": {
- "buttons": {
- "data": [
- {
- "id": "27",
- "type": "button"
}, - {
- "id": "28",
- "type": "button"
}
]
}, - "listings": {
- "data": [
- {
- "id": "9",
- "type": "listing"
}
]
}
}
}
]
}
Owner is defined based on required X-Company-UUID
header.
API does not allow to delete Listings not owned by a Company specified
by X-Company-UUID
header.
id | number Example: 11 |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: d9c608fc-cb9d-4e4a-b849-e790077cde63 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
Publishing controller is very simple in usage. All parameters are passed in the URLs as showed below.
PUT
request adds vehicle to listingDELETE
request removes vehicle from listingAdding or removing vehicle twice will not raise any error. The Vehicle will simply not be added/removed again and response will reflect actual state.
NOTE: Both Vehile and Listing need to be owned by the same company that is passed through X-Company-UUID
header value
id | number Example: 54 |
vehicle_id | number Example: 227 |
id required | number Example: id=2 Listing ID |
vehicle_id required | number Example: vehicle_id=2 Vehicle ID |
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 0bb4aa3d-b64e-4a47-947b-ff96940fc9d6 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "54",
- "type": "listing",
- "attributes": {
- "title": "Linguine with Clams 56",
- "uuid": "04ac4d38-e378-40c4-80bb-65516e817b55",
- "sort_order": "desc",
- "sort_attribute": "production_year",
- "disclaimers"