Documentation
Autocasion API reference for 2 operations
Reference for the Autocasion API: what autocasion-listing's body.id and autocasion-search's body.query and body.page do, and what each operation returns.
See also: Autocasion Vehicle Listings API overview and prices · Autocasion API Guide: Listing Lookup and Search
On this page
Autocasion API: the autocasion-listing id
body.id is the vehicle's own canonical URL rather than a separate numeric identifier the same listing might otherwise carry; the input table lists it as required, but what qualifies as a valid value is this: the full address a listing carries on the Autocasion site, not a shortened form of it and not a bare number pulled from that address. Sending that canonical URL is the only path autocasion-listing is built to read; there is no alternate input name or secondary field that stands in for it.
The response itself holds a cash price, a financing figure kept separate from that cash price, a free-text description, a block of vehicle detail, a separate equipment list, and a public seller that is present only when one is on record for that vehicle. None of these six pieces of information is folded into another: the cash price and financing figure stay apart from each other, and the vehicle detail and equipment stay apart from each other as well, so a caller reading the response can treat each as its own value rather than parsing one block of text for all of them.
Fields in this section (2)
autocasion-listing, body.id
autocasion-search: query and page together
body.query takes exactly one brand slug, bmw or audi, naming the brand to search; there is no third slug and no way to search both brands in one call. body.page is a whole number from 1 to 100 and starts at 1 when the input is left out, moving through that one brand's results rather than switching brands on its own.
These two inputs are read this way together:
body.queryalone chooses which brand's listings the call searchesbody.pagealone chooses how far into that brand's results the call reads- changing brands means sending a different
body.queryvalue, not a differentbody.pagevalue
A call that leaves body.page out searches the first page of whichever brand body.query names.
Fields in this section (3)
autocasion-search, body.query, body.page
autocasion-search: reading next_page and the clamp status
Besides its page items, autocasion-search answers a matching total for the brand named by body.query, a next_page marker and a clamp status. next_page marks whether a further page follows the page just read, which is what tells a caller whether raising body.page again would reach more results or none.
The clamp status marks a different case: a body.page value that is a valid number on its own, from 1 to 100, but runs past the actual matching results for that brand once the search reaches them. A clamped page and a page that simply has no matches for that brand are not the same outcome, and the clamp status together with the matching total is how a caller distinguishes one from the other.
Fields in this section (1)
autocasion-search
{
"body": {
"id": "https://www.autocasion.com/coches-segunda-mano/bmw-serie-1-ocasion/116d-8-ref20399160"
}
}{
"body": {
"query": "bmw",
"page": 2
}
}Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
Vehicle listing lookup
POST /api/v1/autocasion/autocasion-listing
Looks up one Autocasion vehicle listing by its canonical URL and returns its cash price, financing figure, description, vehicle detail, equipment and seller.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.id | string | Required | — | — |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autocasion/autocasion-listing' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"id":"https://www.autocasion.com/coches-segunda-mano/bmw-serie-1-ocasion/116d-8-ref20399160"}}'Vehicle listing search
POST /api/v1/autocasion/autocasion-search
Searches current Autocasion listings for one brand at a time and pages through the matching BMW or Audi results.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | "bmw""audi" | — |
body.page | integer | Optional | 1 | — | 1–100 |
Request examples
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autocasion/autocasion-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"page":1,"query":"bmw"}}'How calls work
POST /api/v1/autocasion/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: