Update a vehiclesale

Updated:

PUT/dms/{connection_id}/vehiclesale/{id}

Updates the DmsVehiclesale identified by id. Provide the unified DmsVehiclesale fields to change in the request body.

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
idstring required
ID of the Vehiclesale

Payload

A vehicle sale or deal (retail, wholesale, fleet or dealer trade)

idstring
created_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
numberstring
Dealer-visible deal number
status enum
Valid values:
"QUOTE"
"PENDING"
"SOLD"
"DELIVERED"
"FINALIZED"
type enum
Valid values:
"RETAIL"
"WHOLESALE"
"FLEET"
"DEALER_TRADE"
"OTHER"
Sale channel
finance_type enum
Valid values:
"CASH"
"FINANCE"
"LEASE"
"BALLOON"
"OTHER"
contact_idsstring array
Buyers as CRM Contacts, primary buyer first
company_idsstring array
Business buyers as CRM Companies
lead_idstring
The CRM Lead this sale came from (reference to CrmLead)
salesperson_user_idsstring array
Salespeople, as HR Employees
sales_manager_user_idstring
Sales manager, as an HR Employee (reference to HrisEmployee)
finance_manager_user_idsstring array
Finance (F&I) managers, as HR Employees
vehicles array
Vehicles sold
trade_ins array
fees array
products array
Finance and insurance (F&I) products
taxes array
financeobject
Finance or lease terms
currencystring
ISO 4217 currency code
rebate_amountnumber
Manufacturer and dealer rebates and incentives
down_payment_amountnumber
Cash down payment and deposits
tax_amountnumber
Total tax
total_amountnumber
Total cash price including fees, products and taxes, before trade-ins
front_gross_amountnumber
Front-end (vehicle) gross profit
back_gross_amountnumber
Back-end (F&I) gross profit
sold_atdate-time
Sale or contract date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
delivered_atdate-time
When the vehicle was handed over (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
posted_atdate-time
When the sale was finalized or posted to accounting (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
sourcestring
Lead or advertising source
notesstring
metadata array

Returns

Response fieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
numberstringNoDealer-visible deal number
statusenumNoValues: QUOTE, PENDING, SOLD, DELIVERED, FINALIZED, CANCELLED, OTHER
typeenumNoSale channel Values: RETAIL, WHOLESALE, FLEET, DEALER_TRADE, OTHER
finance_typeenumNoValues: CASH, FINANCE, LEASE, BALLOON, OTHER
contact_idsstring[]NoBuyers as CRM Contacts, primary buyer first
company_idsstring[]NoBusiness buyers as CRM Companies
lead_idstringNoThe CRM Lead this sale came from (reference to CrmLead)
salesperson_user_idsstring[]NoSalespeople, as HR Employees
sales_manager_user_idstringNoSales manager, as an HR Employee (reference to HrisEmployee)
finance_manager_user_idsstring[]NoFinance (F&I) managers, as HR Employees
vehiclesDmsVehiclesaleVehicle[]NoVehicles sold
vehicles[].vehicle_idstringNoThe DmsVehicle ID
vehicles[].vinstringNoVIN as sold
vehicles[].stock_numberstringNoStock number as sold
vehicles[].odometernumberNoOdometer at sale
vehicles[].price_amountnumberNoAgreed selling price of the vehicle
vehicles[].msrp_amountnumberNo
vehicles[].cost_amountnumberNoDealer cost of the vehicle
trade_insDmsVehiclesaleTradein[]No
trade_ins[].vehicle_idstringNoThe DmsVehicle ID of the trade-in, when recorded
trade_ins[].vinstringNo
trade_ins[].yearnumberNo
trade_ins[].makestringNo
trade_ins[].modelstringNo
trade_ins[].odometernumberNo
trade_ins[].allowance_amountnumberNoTrade allowance given to the buyer
trade_ins[].actual_cash_value_amountnumberNoActual cash value (dealer valuation)
trade_ins[].payoff_amountnumberNoOutstanding loan payoff
trade_ins[].lienholder_namestringNoLender owed the payoff
feesDmsVehiclesaleFee[]No
fees[].namestringNo
fees[].price_amountnumberNoAmount charged to the buyer
fees[].cost_amountnumberNoDealer cost
fees[].is_capitalizedbooleanNoRolled into the financed or leased amount
productsDmsVehiclesaleProduct[]NoFinance and insurance (F&I) products
products[].typeenumNoValues: SERVICE_CONTRACT, GAP, CREDIT_LIFE, ACCIDENT_HEALTH, MAINTENANCE, PROTECTION, INSURANCE, OTHER
products[].namestringNoProduct or plan name
products[].providerstringNoProvider or carrier name
products[].price_amountnumberNoPrice charged to the buyer
products[].cost_amountnumberNoDealer cost
products[].term_monthsnumberNoCoverage term in months
products[].term_mileagenumberNoCoverage distance limit
products[].deductible_amountnumberNo
products[].contract_numberstringNoPolicy or contract number
taxesDmsVehiclesaleTax[]No
taxes[].namestringNo
taxes[].ratenumberNoTax rate, as a percentage
taxes[].total_amountnumberNoTax amount
financeobjectNoFinance or lease terms
finance.lender_namestringNoBank or finance company
finance.term_monthsnumberNo
finance.interest_ratenumberNoAPR, as a percentage
finance.payment_amountnumberNoRegular payment amount
finance.payment_frequencyenumNoValues: MONTHLY, SEMI_MONTHLY, BIWEEKLY, WEEKLY, YEARLY, OTHER
finance.financed_amountnumberNoAmount financed
finance.residual_amountnumberNoLease residual or guaranteed future value
finance.money_factornumberNoLease money factor
finance.first_payment_atstring (date-time)NoFirst payment due date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
currencystringNoISO 4217 currency code
rebate_amountnumberNoManufacturer and dealer rebates and incentives
down_payment_amountnumberNoCash down payment and deposits
tax_amountnumberNoTotal tax
total_amountnumberNoTotal cash price including fees, products and taxes, before trade-ins
front_gross_amountnumberNoFront-end (vehicle) gross profit
back_gross_amountnumberNoBack-end (F&I) gross profit
sold_atstring (date-time)NoSale or contract date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
delivered_atstring (date-time)NoWhen the vehicle was handed over (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
posted_atstring (date-time)NoWhen the sale was finalized or posted to accounting (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
sourcestringNoLead or advertising source
notesstringNo
metadataDmsMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].slugstringNoThe integration's API name (key) of an existing custom field.
metadata[].valueobjectNoThe field's value, typed by format.
metadata[].namespacestringNo
metadata[].formatenumNoThe 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_dataobjectNo

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"
}
StatusErrorMeaning
400Bad RequestThe request was malformed or failed validation.
401UnauthorizedThe connection is likely broken; re-authorize it.
403ForbiddenThe connection is missing permissions or scopes.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded (see the two sources below).
500Internal Server ErrorAn unexpected error occurred.
501Not ImplementedNot 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: 'PUT',
  url: 'https://api.unified.to/dms/5de520f96e439b002043d8dc/vehiclesale/5de520f96e439b002043d8d8',
  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?