Create a vehicle
POST/dms/{connection_id}/vehicle
Creates a DmsVehicle. Provide the unified DmsVehicle fields in the request body; they are mapped to the provider's API. Returns the created DmsVehicle.
Parameters
fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection
Payload
A vehicle or other dealer unit: dealer stock or a customer-owned vehicle seen by service
idstring
created_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
is_inventoryboolean
True for a dealer stock unit, false for a customer-owned or service vehicle
vinstring
Vehicle identification number, or serial number / HIN for non-road units
stock_numberstring
Dealer stock number
fleet_numberstring
Customer or fleet unit number
license_platestring
yearnumber
Model year
makestring
modelstring
trimstring
Trim, variant or series
model_codestring
Manufacturer model code
descriptionstring
Free-text vehicle description
body_stylestring
condition enum
Valid values:
"NEW"
"USED"
"DEMO"
"OTHER"
is_certifiedboolean
Certified pre-owned
status enum
Stock status; only set for inventory units
odometernumber
Current odometer or meter reading
odometer_unit enum
Valid values:
"MILES"
"KILOMETERS"
"HOURS"
"OTHER"
exterior_colorstring
interior_colorstring
transmissionstring
Transmission description
currencystring
ISO 4217 currency code
price_amountnumber
Asking or selling price of a stock unit
msrp_amountnumber
Manufacturer's suggested retail price
internet_price_amountnumber
Advertised internet price
cost_amountnumber
Dealer total cost of the unit
received_atdate-time
When the unit arrived in stock (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
sold_atdate-time
When the unit was last sold (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
delivered_atdate-time
When the vehicle was delivered to its current owner (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
in_service_atdate-time
Warranty in-service date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
warranty_expires_atdate-time
Factory warranty expiry date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
last_service_atdate-time
Last service visit (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
contact_idstring
Owner, as a CRM Contact, when the owner is an individual
company_idstring
Owner, as a CRM Company, when the owner is a business or fleet
image_urlsstring array
Public photo URLs
is_publishedboolean
Unit is published to the dealer website
is_activeboolean
Returns
| Response field | Type | Required | Description |
|---|---|---|---|
id | string | No | |
created_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
updated_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
is_inventory | boolean | No | True for a dealer stock unit, false for a customer-owned or service vehicle |
vin | string | No | Vehicle identification number, or serial number / HIN for non-road units |
stock_number | string | No | Dealer stock number |
fleet_number | string | No | Customer or fleet unit number |
license_plate | string | No | |
year | number | No | Model year |
make | string | No | |
model | string | No | |
trim | string | No | Trim, variant or series |
model_code | string | No | Manufacturer model code |
description | string | No | Free-text vehicle description |
type | enum | No | Values: CAR, TRUCK, VAN, SUV, MOTORCYCLE, BUS, RV, BOAT, TRAILER, EQUIPMENT, OTHER |
body_style | string | No | |
condition | enum | No | Values: NEW, USED, DEMO, OTHER |
is_certified | boolean | No | Certified pre-owned |
status | enum | No | Stock status; only set for inventory units Values: AVAILABLE, ON_ORDER, IN_TRANSIT, RESERVED, SOLD, UNAVAILABLE, OTHER |
odometer | number | No | Current odometer or meter reading |
odometer_unit | enum | No | Values: MILES, KILOMETERS, HOURS, OTHER |
exterior_color | string | No | |
interior_color | string | No | |
fuel_type | enum | No | Values: GASOLINE, DIESEL, ELECTRIC, HYBRID, HYDROGEN, LPG, NATURAL_GAS, OTHER |
transmission | string | No | Transmission description |
currency | string | No | ISO 4217 currency code |
price_amount | number | No | Asking or selling price of a stock unit |
msrp_amount | number | No | Manufacturer's suggested retail price |
internet_price_amount | number | No | Advertised internet price |
cost_amount | number | No | Dealer total cost of the unit |
received_at | string (date-time) | No | When the unit arrived in stock (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
sold_at | string (date-time) | No | When the unit was last sold (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
delivered_at | string (date-time) | No | When the vehicle was delivered to its current owner (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
in_service_at | string (date-time) | No | Warranty in-service date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
warranty_expires_at | string (date-time) | No | Factory warranty expiry date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
last_service_at | string (date-time) | No | Last service visit (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
contact_id | string | No | Owner, as a CRM Contact, when the owner is an individual |
company_id | string | No | Owner, as a CRM Company, when the owner is a business or fleet |
options | DmsVehicleOption[] | No | Installed options and packages |
options[].code | string | No | Option or RPO code |
options[].description | string | No | |
options[].type | enum | No | Factory-fitted or dealer-added Values: FACTORY, DEALER, OTHER |
options[].price_amount | number | No | Retail price |
options[].cost_amount | number | No | Dealer cost |
image_urls | string[] | No | Public photo URLs |
is_published | boolean | No | Unit is published to the dealer website |
is_active | boolean | No | |
metadata | DmsMetadata[] | No | |
metadata[].id | string | No | The ID of the custom field definition (from the metadata/metadata endpoint). |
metadata[].slug | string | No | The integration's API name (key) of an existing custom field. |
metadata[].value | object | No | The field's value, typed by format. |
metadata[].namespace | string | No | |
metadata[].format | enum | No | The data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL |
metadata[].extra_data | object | No |
Errors
Errors return the HTTP status code and a JSON body with statusCode, error (the short label) and message (a human-readable detail).
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests to unified.to API; max requests per minute: N"
}| Status | Error | Meaning |
|---|---|---|
400 | Bad Request | The request was malformed or failed validation. |
401 | Unauthorized | The connection is likely broken; re-authorize it. |
403 | Forbidden | The connection is missing permissions or scopes. |
404 | Not Found | The requested resource does not exist. |
429 | Too Many Requests | Rate limit exceeded (see the two sources below). |
500 | Internal Server Error | An unexpected error occurred. |
501 | Not Implemented | Not supported by this integration. |
Errors from the underlying integration pass through: the integration's status comes back as ours (429, 401, 403, 404 or 5xx), usually with its message. When the integration's error body is unclear, Unified extracts what it can and returns a clearer message.
429 Too Many Requests
A 429 has two possible sources:
- The integration's own rate limit, passed through.
- Unified's workspace limit: a rolling 60 seconds, set by plan, with the message
Too many requests to unified.to API; max requests per minute: N.
const options = {
method: 'POST',
url: 'https://api.unified.to/dms/5de520f96e439b002043d8dc/vehicle',
headers: {
authorization: 'bearer .....'
},
data: undefined,
params: {
fields: '',
raw: '',
}
};
const results = await axios.request(options); Are we missing anything? Let us know
Was this page helpful?