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 _aRYJrqapi-7Cy9PzKLy |
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-11-05T13:42:52.819Z",
- "updated_at": "2024-11-05T13:42:52.819Z",
- "msrp_price": "32563.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-11-12",
- "transmission": "manual",
- "vin": null,
- "mileage": 913319,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 324,
- "video_url": null,
- "owner_id": 79,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "8c3f29",
- "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 XJydLd_3J-qqBa5GSgZr |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 103,
- "color_id": 27,
- "power": 303,
- "msrp_price": "35761.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-11-05T13:42:53.802Z",
- "updated_at": "2024-11-05T13:42:53.820Z",
- "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-11-09",
- "transmission": "manual",
- "vin": null,
- "mileage": 497592,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "11d877",
- "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 ZcDZdvBRgrpkEd2c2qdq |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "b19a",
- "locked_until": "2024-11-05T13:57:53.008Z",
- "nameplate_id": 3,
- "owner_id": 81,
- "id": 3,
- "color_id": 10,
- "power": 196,
- "msrp_price": "20717.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-11-05T13:42:52.997Z",
- "updated_at": "2024-11-05T13:42:53.033Z",
- "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-11-20",
- "transmission": "manual",
- "vin": null,
- "mileage": 310329,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "bb3f12",
- "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-11-05T13:57:53.008Z",
- "lock_id": "b19a"
}
}
}
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 _bCwVqbcKKUcs_4SGQCR |
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": 217,
- "msrp_price": "41336.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-11-05T13:42:53.314Z",
- "updated_at": "2024-11-05T13:42:53.347Z",
- "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": "used",
- "status": "demo",
- "delivery_date": "2024-11-15",
- "transmission": "auto",
- "vin": null,
- "mileage": 632825,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "f6a8ae",
- "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 BTNAy6yLPXcnAk6VsPB5 |
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": 310,
- "msrp_price": "26564.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-11-05T13:42:53.551Z",
- "updated_at": "2024-11-05T13:42:53.574Z",
- "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",
- "delivery_date": "2024-11-25",
- "transmission": "auto",
- "vin": null,
- "mileage": 604819,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "4b44b1",
- "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 DtCQdx5uBEzv8PVs4xVV |
{- "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": "on_demand",
- "transmission": "auto",
- "engine_type": [
- "phev"
], - "delivery_date": "2024-11-13",
- "power": 230,
- "msrp_price": 43682,
- "interior_color": "Ebony",
- "mileage": 51259,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "0911cf",
- "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-11-05T13:42:54.298Z",
- "updated_at": "2024-11-05T13:42:54.306Z",
- "msrp_price": "37593.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": "stock",
- "delivery_date": "2024-11-23",
- "transmission": "manual",
- "vin": null,
- "mileage": 149257,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 219,
- "video_url": null,
- "owner_id": 116,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "efc3d1",
- "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 LHg-FW3cdbwBum45Mn2R |
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": "used",
- "status": "in_production",
- "transmission": "manual",
- "engine_type": [
- "petrol"
], - "delivery_date": "2024-11-05",
- "power": 448,
- "msrp_price": 26677,
- "interior_color": "Ebony",
- "mileage": 154632,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "1503d5",
- "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-11-05T13:42:54.391Z",
- "updated_at": "2024-11-05T13:42:54.398Z",
- "msrp_price": "26677.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": "in_production",
- "delivery_date": "2024-11-05",
- "transmission": "manual",
- "vin": null,
- "mileage": 154632,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 448,
- "video_url": null,
- "owner_id": 118,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "1503d5",
- "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: f017cbbb-32dd-484e-b127-6093e3917ed2 |
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 utQge_WshkM5aCT6Xs_P |
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-11-05T13:42:54.452Z",
- "updated_at": "2024-11-05T13:42:54.452Z",
- "msrp_price": "45078.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": "delivery",
- "delivery_date": "2024-11-17",
- "transmission": "manual",
- "vin": null,
- "mileage": 66338,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 199,
- "video_url": null,
- "owner_id": 121,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f017cbbb-32dd-484e-b127-6093e3917ed2",
- "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 EQZ-Qfqey9bvh1vSrg4b |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token PweEMmhsqcSk-nFXgSpT |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 29,
- "name": "Puce Steel",
- "canonical": "white",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-11-05T13:42:53.914Z",
- "updated_at": "2024-11-05T13:42:53.914Z"
}, - {
- "id": 30,
- "name": "Cerulean Granite",
- "canonical": "blue",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-11-05T13:42:53.916Z",
- "updated_at": "2024-11-05T13:42:53.916Z"
}, - {
- "id": 31,
- "name": "Periwinkle Rubber",
- "canonical": "orange",
- "owner_type": "Company",
- "owner_id": 107,
- "created_at": "2024-11-05T13:42:53.917Z",
- "updated_at": "2024-11-05T13:42:53.917Z"
}
]
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 zy2kmY9EJF3Jmcz4DRKR |
[ ]
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token GyptZUVsXRAnF5gKuz7Y |
Content-Type | any Example: application/vnd.api+json |
[- {
- "id": 22,
- "name": "Mattress",
- "brand_id": 56,
- "created_at": "2024-11-05T13:42:53.972Z",
- "updated_at": "2024-11-05T13:42:53.972Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 23,
- "name": "Hooloovoo",
- "brand_id": 57,
- "created_at": "2024-11-05T13:42:53.974Z",
- "updated_at": "2024-11-05T13:42:53.974Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 24,
- "name": "Belcerebon",
- "brand_id": 58,
- "created_at": "2024-11-05T13:42:53.976Z",
- "updated_at": "2024-11-05T13:42:53.976Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 25,
- "name": "Sarkopsi",
- "brand_id": 59,
- "created_at": "2024-11-05T13:42:53.978Z",
- "updated_at": "2024-11-05T13:42:53.978Z",
- "model_code_years": null,
- "model_group": null,
- "external_code_long": null
}, - {
- "id": 26,
- "name": "Jatravartid",
- "brand_id": 60,
- "created_at": "2024-11-05T13:42:53.981Z",
- "updated_at": "2024-11-05T13:42:53.981Z",
- "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-11-05T13:42:54.133Z",
- "updated_at": "2024-11-05T13:42:54.146Z"
}
]
id | number Example: 1 |
Accept | any Example: application/vnd.api+json |
Authorization | any Example: Token _aRYJrqapi-7Cy9PzKLy |
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-11-05T13:42:52.819Z",
- "updated_at": "2024-11-05T13:42:52.819Z",
- "msrp_price": "32563.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-11-12",
- "transmission": "manual",
- "vin": null,
- "mileage": 913319,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "power": 324,
- "video_url": null,
- "owner_id": 79,
- "color_id": 8,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "8c3f29",
- "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 XJydLd_3J-qqBa5GSgZr |
Content-Type | any Example: application/vnd.api+json |
{- "status": "reserved",
- "nameplate_id": 20,
- "owner_id": 103,
- "color_id": 27,
- "power": 303,
- "msrp_price": "35761.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-11-05T13:42:53.802Z",
- "updated_at": "2024-11-05T13:42:53.820Z",
- "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-11-09",
- "transmission": "manual",
- "vin": null,
- "mileage": 497592,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "hev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "11d877",
- "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 ZcDZdvBRgrpkEd2c2qdq |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "lock_id": "b19a",
- "locked_until": "2024-11-05T13:57:53.008Z",
- "nameplate_id": 3,
- "owner_id": 81,
- "id": 3,
- "color_id": 10,
- "power": 196,
- "msrp_price": "20717.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-11-05T13:42:52.997Z",
- "updated_at": "2024-11-05T13:42:53.033Z",
- "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-11-20",
- "transmission": "manual",
- "vin": null,
- "mileage": 310329,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "bb3f12",
- "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-11-05T13:57:53.008Z",
- "lock_id": "b19a"
}
}
}
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 _bCwVqbcKKUcs_4SGQCR |
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": 217,
- "msrp_price": "41336.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-11-05T13:42:53.314Z",
- "updated_at": "2024-11-05T13:42:53.347Z",
- "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": "used",
- "status": "demo",
- "delivery_date": "2024-11-15",
- "transmission": "auto",
- "vin": null,
- "mileage": 632825,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "f6a8ae",
- "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 BTNAy6yLPXcnAk6VsPB5 |
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": 310,
- "msrp_price": "26564.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-11-05T13:42:53.551Z",
- "updated_at": "2024-11-05T13:42:53.574Z",
- "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",
- "delivery_date": "2024-11-25",
- "transmission": "auto",
- "vin": null,
- "mileage": 604819,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev_rev"
], - "video_url": null,
- "features_standard": null,
- "model_year": null,
- "external_id": "4b44b1",
- "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 DtCQdx5uBEzv8PVs4xVV |
{- "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": "on_demand",
- "transmission": "auto",
- "engine_type": [
- "phev"
], - "delivery_date": "2024-11-13",
- "power": 230,
- "msrp_price": 43682,
- "interior_color": "Ebony",
- "mileage": 51259,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "0911cf",
- "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-11-05T13:42:54.298Z",
- "updated_at": "2024-11-05T13:42:54.306Z",
- "msrp_price": "37593.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": "stock",
- "delivery_date": "2024-11-23",
- "transmission": "manual",
- "vin": null,
- "mileage": 149257,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 219,
- "video_url": null,
- "owner_id": 116,
- "color_id": 39,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "efc3d1",
- "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 LHg-FW3cdbwBum45Mn2R |
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": "used",
- "status": "in_production",
- "transmission": "manual",
- "engine_type": [
- "petrol"
], - "delivery_date": "2024-11-05",
- "power": 448,
- "msrp_price": 26677,
- "interior_color": "Ebony",
- "mileage": 154632,
- "type": "ActiveVehicle",
- "metadata": {
- "test": 1
}, - "external_id": "1503d5",
- "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-11-05T13:42:54.391Z",
- "updated_at": "2024-11-05T13:42:54.398Z",
- "msrp_price": "26677.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": "in_production",
- "delivery_date": "2024-11-05",
- "transmission": "manual",
- "vin": null,
- "mileage": 154632,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "petrol"
], - "power": 448,
- "video_url": null,
- "owner_id": 118,
- "color_id": 41,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "1503d5",
- "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: f017cbbb-32dd-484e-b127-6093e3917ed2 |
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 utQge_WshkM5aCT6Xs_P |
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-11-05T13:42:54.452Z",
- "updated_at": "2024-11-05T13:42:54.452Z",
- "msrp_price": "45078.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": "delivery",
- "delivery_date": "2024-11-17",
- "transmission": "manual",
- "vin": null,
- "mileage": 66338,
- "engine_capacity": null,
- "battery_capacity": null,
- "engine_type": [
- "phev"
], - "power": 199,
- "video_url": null,
- "owner_id": 121,
- "color_id": 42,
- "features_standard": null,
- "features_optional": null,
- "model_year": null,
- "external_id": "f017cbbb-32dd-484e-b127-6093e3917ed2",
- "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": "204",
- "type": "company",
- "attributes": {
- "name": "Ritchie-Kunde",
- "uuid": "62365e5d-f4da-450a-8673-f835bce41595"
}
}, - {
- "id": "205",
- "type": "company",
- "attributes": {
- "name": "Barton Inc",
- "uuid": "068c6394-786f-4e7e-b3ed-42fe2591500a"
}
}, - {
- "id": "206",
- "type": "company",
- "attributes": {
- "name": "Marquardt-Kozey",
- "uuid": "3b7bfff1-66b7-4cb1-b5ec-421138250653"
}
}
]
}
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: bb2d804b-5a34-4093-8169-0d1f36432ad0 |
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: 1bf623bf-7f24-4361-ac2e-8ff1edc73f49 |
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: 27a8cb7c-7f32-421a-9bca-bdc8671f5818 |
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: 25c6d4ef-5b49-4f8a-b0c0-d0487a31108d |
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: cd44a8d4-1bd4-4e89-a784-f295c8f441b4 |
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": "gray"
}, - "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: 32985d8f-01b5-44b4-a5f5-dc61ae41d8a9 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "Puce Steel",
- "canonical": "yellow"
}
}
}
{- "data": {
- "id": "4",
- "type": "color",
- "attributes": {
- "name": "Puce Steel",
- "canonical": "yellow"
}, - "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: 86bb3c47-c652-402b-a88a-ee9dea5d4e18 |
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": "red"
}, - "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: fe3e1f78-8243-4c92-aca5-931d4e2e5725 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "name": "King and Sons",
- "canonical": "bronze"
}
}
}
{- "data": {
- "id": "5",
- "type": "color",
- "attributes": {
- "name": "King and Sons",
- "canonical": "bronze"
}, - "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: fcb121b4-e6cd-433d-83a4-c1b52bead726 |
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: 95b72505-1dd0-42b1-b40b-80987c988c11 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": [
- {
- "id": "42",
- "type": "company",
- "attributes": {
- "uuid": "95b72505-1dd0-42b1-b40b-80987c988c11",
- "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": "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: 9ff1f487-895e-40f9-8cf1-2688c99f1b56 |
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": "en_IE",
- "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": "retailer",
- "operating_states": [
- "NSW",
- "VIC"
]
}
}
}
{- "data": {
- "id": "61",
- "type": "company",
- "attributes": {
- "uuid": "f5860b84-3a03-4923-8c75-e7604c1ba8bb",
- "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": "en_IE",
- "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: e81edad1-a0e1-43fc-bcaa-04b53c70cbb3 |
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: 648d83dc-6c01-4ab3-a15c-397e94689465 |
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: 9427574d-71d1-4fd7-904f-1b809c6f4341 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "id": "58",
- "type": "company",
- "attributes": {
- "uuid": "9427574d-71d1-4fd7-904f-1b809c6f4341",
- "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: f7f93738-b297-4fce-88a4-3fa1c2baddf3 |
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": "pl_PL",
- "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": "retailer",
- "operating_states": [
- "NSW",
- "VIC"
]
}
}
}
{- "data": {
- "id": "63",
- "type": "company",
- "attributes": {
- "uuid": "f7f93738-b297-4fce-88a4-3fa1c2baddf3",
- "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": "pl_PL",
- "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: f7a4b8a9-65ca-44d5-8149-f4359045374a |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "company_uuid": "f7a4b8a9-65ca-44d5-8149-f4359045374a"
}
{- "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: bHxaJdGG9y5ZYRjt |
Accept | any Example: application/json |
X-Company-UUID | any Example: 78257231-eb4e-4622-9966-c8673a9a58ef |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/json |
{- "job_uid": "bHxaJdGG9y5ZYRjt",
- "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: 67021c7c-045e-438f-b456-105fe70b5503 |
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: ed712440-f20e-4e3c-9249-bb0de304b192 |
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": "a04cecb5-7e38-4650-83c9-caa1d90c8343",
- "sort_order": "asc",
- "sort_attribute": "status_sort",
- "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": "0ebeb7a5-550a-4074-af4e-aba233ddc51d",
- "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": "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: dc14f034-ae66-4065-80ae-290d45241f81 |
Authorization | any Example: Bearer STUB_TOKEN_STRING |
Content-Type | any Example: application/vnd.api+json |
{- "data": {
- "attributes": {
- "title": "Arepas 8",
- "sort_order": "asc",
- "sort_attribute": "created_at",
- "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": "035f5d1c-d981-48e3-a4b7-2d0e8f70f4cb",
- "sort_order": "asc",
- "sort_attribute": "created_at",
- "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-11-05T13:42:55.183Z",
- "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: db7f7154-4191-4700-bcfd-9f73b4777f35 |
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": "66c7c221-76cf-4ffa-bef2-503c5a2cdbca",
- "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": "160",
- "type": "company"
}
}, - "button_set": {
- "data": {
- "id": "50",
- "type": "button_set"
}
}, - "vehicles": {
- "data": [ ]
}
}, - "links": {
- "self": "/listings/7",
- "all": "/listings"
}, - "meta": {
- "sort_order": [