GET requests,
authenticated by an API key BeRocker issues to you, and the names you get back are exactly what the
Lead source API expects in vehicle_make and vehicle_model.
Getting a key. Vehicle API keys are issued by BeRocker — ask support for
one and tell us which website it will live on. You get a key that starts with
bvk_, shown once;
store it where your form can read it. We can suspend, replace or delete it at any time, and we
can see how much it is used, so tell us if you expect a lot of traffic.1. Authenticate
Every request needs the key. Send it in a header (preferred):Authorization: Bearer bvk_your_key_here works too, and so does an ?api_key=bvk_… query
parameter for the simplest forms — though a header keeps the key out of browser history and
server logs.
All endpoints live under:
GETs, answer JSON, and allow cross-origin requests, so a plain fetch() from
your page works.
2. The three pickers
A form fills its pickers in order: years first, makes once a year is chosen, models once a make is chosen. Each call returns the complete list — there is no paging.Years
Makes for a year
id is stable across years — the same make has the same id in 2021 and 1998 —
but you do not need it: the next call takes the make by name.
Models for a make and year
make accepts the name (case and spaces do not matter — honda and HON DA both work) or the
id from the makes call. type is the vehicle type BeRocker prices by; pass it along as
vehicle_type when you save the lead and the quote is exact.
An unknown make answers 422 with "code": "unknown_make". A real make that simply has no models
in that year answers 200 with an empty data.
3. Two helpers
Vehicle types
vehicle_type. Useful for the “Other — enter manually”
path of your form, where the visitor types a vehicle that is not in the catalogue and you still
want to ask what kind of thing it is.
Look up one vehicle
found: false (with data: null) means it is not in the catalogue — treat that vehicle as
custom when you save the lead ("is_custom": true), and it will be priced by an agent.
4. Put it in a form
A minimal cascading picker. Swap the key, wire the<select>s to your markup, and post the result
to your Lead save URL:
ETag and a Cache-Control: max-age, so the browser reuses them for
the next visitor without another request; you do not need to cache anything yourself.
5. Errors and limits
Every error is JSON with a humanmessage and a stable code:
Each key has a per-minute rate limit (300 by default — a form makes three requests per visitor,
so that is a busy site) and, if we agreed one, a daily cap. Successful responses carry
X-RateLimit-Limit and X-RateLimit-Remaining. If your traffic is genuinely bigger, ask — limits
are per key and we raise them; the point of the limit is to notice a runaway script, not to slow
a real form down.
Checklist
1
Get a key
Ask support for a Vehicle API key and tell us your form’s domain.
2
Cascade the three calls
years → makes?year= → models?year=&make=. Send the key in X-Api-Key.3
Save the lead with the names you got back
vehicle_model_year, vehicle_make, vehicle_model (and vehicle_type from the model) go
straight into the Lead source API payload.4
Handle 'Other'
Let the visitor type a vehicle that is not listed, send it with
is_custom: true, and an agent
prices it by hand.Related
Build your own quote form
Save the lead, wait for the price, hand off to the booking page.
Lead source API
Every field the save endpoint accepts, including each vehicle.