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 X9GbKFuzxN4iEzBKG-NT |
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-12-03T10:58:22.655Z",
- "updated_at": "2024-12-03T10:58:22.655Z",
- "msrp_price": "37463.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-12-30",
- "transmission": "auto",
- "vin": null,
- "mileage": 462891,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 291,
- "video_url": null,
- "owner_id": 79,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "8b169b",
- "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,
- "published_at": null
}
}
id | number Example: 20 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token QPBUwoyxxy79uJFFhN2K |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 103,
- "color_id": 27,
- "power": 275,
- "msrp_price": "40813.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-12-03T10:58:23.800Z",
- "updated_at": "2024-12-03T10:58:23.830Z",
- "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-12-16",
- "transmission": "auto",
- "vin": null,
- "mileage": 897707,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "diesel"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "9791e6",
- "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,
- "published_at": 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 s7etf_WtDtiwh1Khw-xc |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "4719",
- "base_price": null,
- "features_optional": null,
- "id": 3,
- "nameplate_id": 3,
- "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-12-03T10:58:22.740Z",
- "updated_at": "2024-12-03T10:58:22.801Z",
- "msrp_price": "26166.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-12-20",
- "transmission": "manual",
- "vin": null,
- "mileage": 638630,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "power": 377,
- "video_url": null,
- "owner_id": 81,
- "color_id": 10,
- "features_standard": null,
- "model_year": null,
- "external_id": "caa780",
- "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": "2024-12-03T11:13:22.771Z",
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null,
- "published_at": null
}, - "meta": {
- "lock_data": {
- "locked_until": "2024-12-03T11:13:22.771Z",
- "lock_id": "4719"
}
}
}
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 2BKkyLWgPAcsLwuG9mHt |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": null,
- "locked_until": null,
- "nameplate_id": 10,
- "owner_id": 88,
- "color_id": 17,
- "power": 449,
- "msrp_price": "20526.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-12-03T10:58:23.136Z",
- "updated_at": "2024-12-03T10:58:23.166Z",
- "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": "new",
- "status": "sold",
- "delivery_date": "2024-12-13",
- "transmission": "manual",
- "vin": null,
- "mileage": 395,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "bev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "068848",
- "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,
- "published_at": 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 Bqoh4vEds9P4hD73cgsy |
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": 98,
- "color_id": 22,
- "power": 408,
- "msrp_price": "27492.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-12-03T10:58:23.431Z",
- "updated_at": "2024-12-03T10:58:23.472Z",
- "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-12-22",
- "transmission": "manual",
- "vin": null,
- "mileage": 191559,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "b96ba3",
- "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,
- "published_at": 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 Kv5mxVB3MTgjzvC51SS- |
{- "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": "auto",
- "engine_type": [
- "bev"
], - "delivery_date": "2024-12-20",
- "power": 299,
- "msrp_price": 44619,
- "interior_color": "Ebony",
- "mileage": 404701,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "390a0d",
- "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-12-03T10:58:24.444Z",
- "updated_at": "2024-12-03T10:58:24.454Z",
- "msrp_price": "28435.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": "sold",
- "delivery_date": "2024-12-06",
- "transmission": "auto",
- "vin": null,
- "mileage": 111541,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 240,
- "video_url": null,
- "owner_id": 116,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "e023e7",
- "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,
- "published_at": 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 Z_NvpVBDXW1aTR2Eg57g |
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": [
- "hev"
], - "delivery_date": "2024-12-17",
- "power": 159,
- "msrp_price": 21234,
- "interior_color": "Ebony",
- "mileage": 860509,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "d315d8",
- "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-12-03T10:58:24.552Z",
- "updated_at": "2024-12-03T10:58:24.560Z",
- "msrp_price": "21234.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-12-17",
- "transmission": "manual",
- "vin": null,
- "mileage": 860509,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 159,
- "video_url": null,
- "owner_id": 118,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "d315d8",
- "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,
- "published_at": null
}
external_id | string Example: 5b15ccb5-31ae-4799-ab36-014789532d72 |
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 N2K3F61Rm82CH8ptVgPR |
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-12-03T10:58:24.624Z",
- "updated_at": "2024-12-03T10:58:24.624Z",
- "msrp_price": "45005.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": "on_demand",
- "delivery_date": "2024-12-13",
- "transmission": "manual",
- "vin": null,
- "mileage": 880972,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 269,
- "video_url": null,
- "owner_id": 121,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "5b15ccb5-31ae-4799-ab36-014789532d72",
- "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,
- "published_at": 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 _ohETAT8QLNk_eBoSsS5 |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token yS-Wv7mpxm6fgWwJjmPa |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 29,
- "name": "Puce Steel",
- "canonical": "green",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-12-03T10:58:23.957Z",
- "updated_at": "2024-12-03T10:58:23.957Z"
}, - {
- "id": 30,
- "name": "Cerulean Granite",
- "canonical": "yellow",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-12-03T10:58:23.959Z",
- "updated_at": "2024-12-03T10:58:23.959Z"
}, - {
- "id": 31,
- "name": "Periwinkle Rubber",
- "canonical": "white",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-12-03T10:58:23.961Z",
- "updated_at": "2024-12-03T10:58:23.961Z"
}
]
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 n4kyx-FRBjdJ6tftrG_U |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token bTssyso8FEerKsG-4DYU |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 22,
- "name": "Mattress",
- "brand_id": 56,
- "created_at": "2024-12-03T10:58:24.039Z",
- "updated_at": "2024-12-03T10:58:24.039Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 23,
- "name": "Hooloovoo",
- "brand_id": 57,
- "created_at": "2024-12-03T10:58:24.043Z",
- "updated_at": "2024-12-03T10:58:24.043Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 24,
- "name": "Belcerebon",
- "brand_id": 58,
- "created_at": "2024-12-03T10:58:24.048Z",
- "updated_at": "2024-12-03T10:58:24.048Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 25,
- "name": "Sarkopsi",
- "brand_id": 59,
- "created_at": "2024-12-03T10:58:24.052Z",
- "updated_at": "2024-12-03T10:58:24.052Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 26,
- "name": "Jatravartid",
- "brand_id": 60,
- "created_at": "2024-12-03T10:58:24.056Z",
- "updated_at": "2024-12-03T10:58:24.056Z",
- "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-12-03T10:58:24.241Z",
- "updated_at": "2024-12-03T10:58:24.256Z"
}
]
id | number Example: 1 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token X9GbKFuzxN4iEzBKG-NT |
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-12-03T10:58:22.655Z",
- "updated_at": "2024-12-03T10:58:22.655Z",
- "msrp_price": "37463.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-12-30",
- "transmission": "auto",
- "vin": null,
- "mileage": 462891,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 291,
- "video_url": null,
- "owner_id": 79,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "8b169b",
- "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,
- "published_at": null
}
}
id | number Example: 20 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token QPBUwoyxxy79uJFFhN2K |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 103,
- "color_id": 27,
- "power": 275,
- "msrp_price": "40813.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-12-03T10:58:23.800Z",
- "updated_at": "2024-12-03T10:58:23.830Z",
- "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-12-16",
- "transmission": "auto",
- "vin": null,
- "mileage": 897707,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "diesel"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "9791e6",
- "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,
- "published_at": 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 s7etf_WtDtiwh1Khw-xc |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "4719",
- "base_price": null,
- "features_optional": null,
- "id": 3,
- "nameplate_id": 3,
- "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-12-03T10:58:22.740Z",
- "updated_at": "2024-12-03T10:58:22.801Z",
- "msrp_price": "26166.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-12-20",
- "transmission": "manual",
- "vin": null,
- "mileage": 638630,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "power": 377,
- "video_url": null,
- "owner_id": 81,
- "color_id": 10,
- "features_standard": null,
- "model_year": null,
- "external_id": "caa780",
- "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": "2024-12-03T11:13:22.771Z",
- "code5000": null,
- "price_metadata": { },
- "manual_update_attributes": [ ],
- "disclaimers": { },
- "price_breakdown": false,
- "total_price": null,
- "published_at": null
}, - "meta": {
- "lock_data": {
- "locked_until": "2024-12-03T11:13:22.771Z",
- "lock_id": "4719"
}
}
}
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 2BKkyLWgPAcsLwuG9mHt |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": null,
- "locked_until": null,
- "nameplate_id": 10,
- "owner_id": 88,
- "color_id": 17,
- "power": 449,
- "msrp_price": "20526.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-12-03T10:58:23.136Z",
- "updated_at": "2024-12-03T10:58:23.166Z",
- "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": "new",
- "status": "sold",
- "delivery_date": "2024-12-13",
- "transmission": "manual",
- "vin": null,
- "mileage": 395,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "bev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "068848",
- "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,
- "published_at": 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 Bqoh4vEds9P4hD73cgsy |
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": 98,
- "color_id": 22,
- "power": 408,
- "msrp_price": "27492.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-12-03T10:58:23.431Z",
- "updated_at": "2024-12-03T10:58:23.472Z",
- "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-12-22",
- "transmission": "manual",
- "vin": null,
- "mileage": 191559,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "b96ba3",
- "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,
- "published_at": 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 Kv5mxVB3MTgjzvC51SS- |
{- "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": "auto",
- "engine_type": [
- "bev"
], - "delivery_date": "2024-12-20",
- "power": 299,
- "msrp_price": 44619,
- "interior_color": "Ebony",
- "mileage": 404701,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "390a0d",
- "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-12-03T10:58:24.444Z",
- "updated_at": "2024-12-03T10:58:24.454Z",
- "msrp_price": "28435.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": "sold",
- "delivery_date": "2024-12-06",
- "transmission": "auto",
- "vin": null,
- "mileage": 111541,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 240,
- "video_url": null,
- "owner_id": 116,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "e023e7",
- "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,
- "published_at": 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 Z_NvpVBDXW1aTR2Eg57g |
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": [
- "hev"
], - "delivery_date": "2024-12-17",
- "power": 159,
- "msrp_price": 21234,
- "interior_color": "Ebony",
- "mileage": 860509,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "d315d8",
- "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-12-03T10:58:24.552Z",
- "updated_at": "2024-12-03T10:58:24.560Z",
- "msrp_price": "21234.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-12-17",
- "transmission": "manual",
- "vin": null,
- "mileage": 860509,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 159,
- "video_url": null,
- "owner_id": 118,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "d315d8",
- "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,
- "published_at": null
}
external_id | string Example: 5b15ccb5-31ae-4799-ab36-014789532d72 |
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 N2K3F61Rm82CH8ptVgPR |
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-12-03T10:58:24.624Z",
- "updated_at": "2024-12-03T10:58:24.624Z",
- "msrp_price": "45005.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": "on_demand",
- "delivery_date": "2024-12-13",
- "transmission": "manual",
- "vin": null,
- "mileage": 880972,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 269,
- "video_url": null,
- "owner_id": 121,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "5b15ccb5-31ae-4799-ab36-014789532d72",
- "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,
- "published_at": null
}
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token token |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "204",
- "type": "company",
- "attributes": {
- "name": "Ritchie-Kunde",
- "uuid": "6bda5144-b757-4e79-be12-d4dfafe93d88"
}
}, - {
- "id": "205",
- "type": "company",
- "attributes": {
- "name": "Barton Inc",
- "uuid": "7bead4d2-93df-4a0d-8c94-d55d83187893"
}
}, - {
- "id": "206",
- "type": "company",
- "attributes": {
- "name": "Marquardt-Kozey",
- "uuid": "cf8667d1-9465-4035-8c6f-69733d72e782"
}
}
]
}
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token token |
Content-Type | any Example: application/vnd.api+json |
{- "data": "digraph G {\n \"207\" [label=\"Ritchie-Kunde\"]\n}\n"
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: 471adb72-bdb8-45a0-a254-978a4898adf8 |
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: 024a3a9d-a1cb-4e57-a5e9-3bdd4de3426d |
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: 124ad640-34a6-4579-8246-7dc8b3450790 |
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: 84f86ef8-b949-4d59-8e5f-a68550e0c1f5 |
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: ccc1df17-9742-440d-926c-290541ba9673 |
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": "blue"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "33",
- "type": "company"
}
}
}, - "links": {
- "self": "/brands/2",
- "all": "/brands"
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: a6564a70-135a-47e1-9649-5a3dd8c9099c |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Puce Steel",
- "canonical": "silver"
}
}
}
{- "data": {
- "id": "4",
- "type": "color",
- "attributes": {
- "name": "Puce Steel",
- "canonical": "silver"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "35",
- "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: 357a25cb-b388-4bfb-907c-87c7f5d55556 |
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": "green"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "34",
- "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: 2110f99c-795f-400f-8557-40df7cfdfbe9 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "King and Sons",
- "canonical": "blue"
}
}
}
{- "data": {
- "id": "5",
- "type": "color",
- "attributes": {
- "name": "King and Sons",
- "canonical": "blue"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "37",
- "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: c73c6b08-b67c-4570-9f04-5eca0b8e476f |
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: 0faa573e-2243-46b0-990f-c18d2966cb8c |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "42",
- "type": "company",
- "attributes": {
- "uuid": "0faa573e-2243-46b0-990f-c18d2966cb8c",
- "name": "Ritchie-Kunde",
- "city": "Hermistonshire",
- "address": "99667 Major Corners, Antoniomouth, LA 39348-8794",
- "phone": "+994 987.432.9120",
- "email": "harriett@lesch.io",
- "locale": "en_IE",
- "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": "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"
]
}
}
]
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: db14e082-7fcb-4755-901e-ea4aecda48be |
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": "61",
- "type": "company",
- "attributes": {
- "uuid": "4474b4fd-c61c-4ddd-a2f7-6e04c1569509",
- "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": "60",
- "type": "company"
}
}, - "children": {
- "data": [ ]
}, - "descendants": {
- "data": [ ]
}, - "ancestors": {
- "data": [
- {
- "id": "60",
- "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: a421fade-a655-4052-aa01-90edf2ea9e6b |
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: 3c73b549-db19-4b84-9911-d38439192174 |
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: 12b5cbbb-f056-4716-860d-69dab7b8bf78 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "58",
- "type": "company",
- "attributes": {
- "uuid": "12b5cbbb-f056-4716-860d-69dab7b8bf78",
- "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": "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"
]
}
}
}
Accept | any Example: application/vnd.api+json |
X-Company-UUID | any Example: ebaf8f9f-7b50-4bd3-8ad0-1df21e14ac6f |
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": "en_IE",
- "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": "63",
- "type": "company",
- "attributes": {
- "uuid": "ebaf8f9f-7b50-4bd3-8ad0-1df21e14ac6f",
- "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": "en_IE",
- "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": "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"
]
}
}
}
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: 3d9a4bde-bafb-4e7d-9f88-5d1f736fde4e |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "company_uuid": "3d9a4bde-bafb-4e7d-9f88-5d1f736fde4e"
}
{- "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: WpodiepqmO93NhOc |
Accept | any Example: application/json |
X-Company-UUID | any Example: 67db4e10-9000-4829-8ac0-33a25e569598 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/json |
{- "job_uid": "WpodiepqmO93NhOc",
- "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: bb9a0286-eaca-43da-8b91-291e6ab1d03d |
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: 70b73310-5662-4ee0-a856-01c01693b75f |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "3",
- "type": "listing",
- "attributes": {
- "title": "Arepas 3",
- "uuid": "834ba895-823b-45d1-ad79-a5b105098f9b",
- "sort_order": "desc",
- "sort_attribute": "created_at",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "141",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "36",
- "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": "Teriyaki Chicken Donburi 4",
- "uuid": "098c6429-473d-4f96-adff-16b877590d81",
- "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": "141",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "37",
- "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: ced63b63-ea07-49c4-a136-2b42931b7429 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "title": "Arepas 8",
- "sort_order": "desc",
- "sort_attribute": "display_price",
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
]
}, - "relationships": {
- "button_set": {
- "data": {
- "type": "button_set",
- "id": 55
}
}
}
}
}
{- "data": {
- "id": "8",
- "type": "listing",
- "attributes": {
- "title": "Arepas 8",
- "uuid": "f81e66cd-85db-4cef-9249-2b6c9aa33b75",
- "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": "168",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "55",
- "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": "55",
- "type": "button_set",
- "attributes": {
- "button_set_type": "standard",
- "created_at": "2024-12-03T10:58:25.462Z",
- "defined_by": null,
- "financing_options": null,
- "name": "non 53",
- "reservation_fee": null
}, - "relationships": {
- "button_set_setups": {
- "data": [
- {
- "id": "39",
- "type": "button_set_setup"
}, - {
- "id": "40",
- "type": "button_set_setup"
}
]
}, - "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: dd0c742c-64b1-4839-b59d-4b109f6a001f |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "7",
- "type": "listing",
- "attributes": {
- "title": "Arepas 7",
- "uuid": "d4f2b759-253a-447d-97d9-6374c3a72705",
- "sort_order": "desc",
- "sort_attribute": "status_sort",
- "disclaimers": { },
- "allowed_vehicle_states": [
- "new",
- "used",
- "approved"
], - "owner_name": "Marquardt-Kozey",
- "owner_city": "West Donitachester"
}, - "relationships": {
- "owner": {
- "data":