Documentation
Agriaffaires API reference for 10 operations
Reference for the Agriaffaires API: what each input of its 10 operations does, how ids resolve, and what the returned fields mean.
See also: Agriaffaires API: machinery search, listings and dealers overview and prices · Agriaffaires API guide: search, pricing and dealer stock
On this page
Agriaffaires API category tree: agriaffaires-categories
agriaffaires-categories returns categories, a list of entries describing the tree:
name,slugandurlidentify each categorycategory_idis the id every other operation takescountgives that category's own figure
The id is read off the catalogue's own facet list for the current inventory, so a leaf category that list does not carry for the moment comes back with a null category_id rather than a guessed one; count still gives that category's own figure either way. body.site picks which of the two catalogues the tree describes, agricultural machinery under agriaffaires or construction, earthmoving and handling machinery under machineryzone; it defaults to agriaffaires. body.market only changes the language the name values come back in, not the tree itself or its ids, which stay the same across every host of one site; country_site and locale are accepted in its place, and it defaults to fr.
Fields in this section (3)
agriaffaires-categories, body.site, body.market
One dealer's profile: agriaffaires-dealer
agriaffaires-dealer requires body.dealer_id, the numeric id agriaffaires-dealers and agriaffaires-search rows carry; account_id is accepted in its place. The returned dealer object groups these fields:
| Field | What it tells you |
|---|---|
activity | the dealer's line of business, with its own language-proof slug |
registration_number, member_since_text | the dealer's registration number and how long it has been on the marketplace |
website, followers | the dealer's own site address and its follower count |
street, postcode, city, country | the dealer's main address |
branches | every further address the group has, each with its own address id, town and department |
brands | the manufacturer ranges the dealer carries, by name and slug |
categories | the dealer's stock broken down by category, with a count for each one |
body.site and body.market behave exactly as they do for agriaffaires-categories.
Fields in this section (4)
agriaffaires-dealer, body.dealer_id, body.site, body.market
Paging one dealer's stock: agriaffaires-dealer-listings
agriaffaires-dealer-listings requires body.dealer_id and returns listings, rows in exactly the shape agriaffaires-search returns, so the fields described for that operation apply here as well and are not repeated. body.page moves through that dealer's stock 50 rows at a time, from 1 up to 200; the 200-page ceiling is carried over from agriaffaires-search, and no dealer in the directory has ever come close to reaching it, since that would mean roughly ten thousand adverts online from one dealer at once. account_id is accepted in place of body.dealer_id, and body.site and body.market pick the catalogue and host exactly as they do for the other operations.
Fields in this section (4)
agriaffaires-dealer-listings, agriaffaires-search, body.dealer_id, body.page
Searching the dealer directory: agriaffaires-dealers
agriaffaires-dealers returns dealers, a list of directory entries:
dealer_id,nameandurlidentify the companyactivity,country,cityanddepartmentdescribe itother_addressescounts its further branchesbrandslists the manufacturer ranges it carrieslistings_onlineandlogocomplete the row
body.company filters the directory by company name, and name is accepted in its place; body.country filters by the seller's ISO-3166-1 country code, and location_country is accepted in its place. body.page moves through the directory 50 dealers at a time, from 1 up to 400. body.sort orders the directory, and defaults to name instead of the directory's own default order, so that a caller paging through the whole directory is not relying on an order that can shift underneath it:
name/name_desc: company name, A to Z or Z to Alistings_asc/listings_desc: fewest or most adverts online firstdefault: the directory's own built-in order, returned only when asked for by name
Fields in this section (5)
agriaffaires-dealers, body.company, body.country, body.page, body.sort
One listing in full: agriaffaires-detail
agriaffaires-detail requires body.listing_id, a numeric id taken from a search row or a listing address, and also takes id or ad_id for it. The returned listing groups these fields:
| Field | What it tells you |
|---|---|
listing_type, listing_type_slug | classified for an offer or auction for a lot, with the catalogue's own word for it |
manufacturer, manufacturer_id | the brand, with the id agriaffaires-price-index takes for it |
operating_hours, engine_power | the hour-meter reading and the engine power, each with its own unit |
price, currency, price_on_request, auction_start_price | the asking price, or, for an auction, its opening bid instead |
price_witness | schema_org_price and schema_org_currency from the listing page's own structured data, and agreed, whether the two prices match |
specs | every row of the seller's own spec table, each with its label, printed value, and, for a measurement, the raw number together with the real unit and the printed unit label |
seller | the business or private party, with contacts entries carrying a name, the languages they work in, a phone and a phone_display |
breadcrumb gives the category trail above the listing, and images its pictures.
Fields in this section (4)
agriaffaires-detail, body.listing_id, body.site, body.market
Filter values and counts: agriaffaires-facets
agriaffaires-facets answers which values are actually worth filtering on before committing to a search. body.query matches across a listing's title, model and description, exactly as the catalogue's own search box does it; q and search_word are accepted in its place. body.keyword matches more narrowly, weighted toward the title and model, and is not a category filter; one measured query returned under a quarter as many rows through body.keyword as through body.query.
body.category_id takes rubric_id or tree_id as alternative names, and sending it together with other filters in the same call costs one extra request, because the category is resolved on its own first. body.listing_type and body.country narrow the facets to one advert type or one seller country. The returned facets groups several lists:
categories,type,etatandotherdescribe advert-level filters, each with its owncountmakecarries themanufacturer_idthatagriaffaires-searchtakes, alongside a label and countcountrieslists the seller countries this query has stock innumeric_propertiesgives each measurable property's real floor and ceiling, with its unit label
Any further group a particular category publishes is included under its own name.
Fields in this section (6)
agriaffaires-facets, body.query, body.keyword, body.category_id, body.listing_type, body.country
Countries, regions and departments: agriaffaires-locations
agriaffaires-locations answers level and locations together: with no body.country it returns level countries, with locations in the ISO-2 code plus the catalogue's own area id; with body.country it returns that country's regions, each with an area_id and a name; with body.region_id as well it returns that region's departments in the same shape. body.region_id requires body.country, and the localized names of the countries this operation lists live in the countries entries agriaffaires-facets returns rather than here. The ids this operation hands back are the only safe values for body.region_id and body.department_id on agriaffaires-search, because an id this engine does not recognise still answers with a different, wrong result set rather than an error.
Fields in this section (3)
agriaffaires-locations, body.country, body.region_id
The price observatory's own id space: agriaffaires-price-index
agriaffaires-price-index answers level together with whichever list that level calls for:
rubrics,makesormodels, each entry anidand anameprices, withyear,price_min,price_maxandprice_averagenumber_classifiedandnumber_classified_onlinealongside each price row
Called with none of its inputs it returns the rubric list; body.rubric_id on its own returns that rubric's makes; body.rubric_id and body.make_id together return its models; and adding body.model and body.year, from 1900 to 2100, turns the call into the price band itself. body.rubric_id and body.make_id are not the category_id and manufacturer_id the same rubric and make carry on agriaffaires-search and agriaffaires-facets — a farm tractor and a given brand carry different ids in each id space — and giving this operation the wrong one answers an empty result rather than an error. price_min, price_max and price_average are in euros, VAT-excluded, the same figures regardless of body.site or body.market.
Fields in this section (5)
agriaffaires-price-index, body.rubric_id, body.make_id, body.model, body.year
Searching and filtering: agriaffaires-search
agriaffaires-search returns listings, each row holding the fields described on the product page, together with a promoted marker for sponsored placements. body.query matches across a listing's full text, while body.keyword matches more narrowly on the title and model; q and search_word are accepted in place of body.query. body.manufacturer resolves a brand by name against the facet list for your query, which costs one extra request to do safely; body.manufacturer_id, a global id from agriaffaires-facets, skips that resolution; make and brand are accepted in place of body.manufacturer.
body.year_min and body.year_max bound the year of construction from 1900 to 2100, and because that range also drops listings with no year published at all, body.year_known set to true isolates only the listings that do publish one. body.operating_hours_min and body.operating_hours_max, with hours_min and hours_max accepted in their place, bound the machine's own hour-meter reading. body.price_min and body.price_max bound the asking price in euros, VAT-excluded, the same figure on every host.
Location narrows two ways:
body.country, withlocation_countryaccepted in its place, together withbody.region_idandbody.department_idbeneath it, for an administrative areabody.postcodetogether withbody.radius_km, from 1 to 1,000 kilometres, andbody.country, for a radius around a point you supply
No sort by distance from the caller is offered, because the position an API call would sort from is the calling server's rather than the shopper's. body.sort otherwise orders by price, year, hour meter, model, manufacturer or rental price in either direction, and defaults to newest. body.page returns 50 rows at a time up to page 200; asking beyond that ceiling answers an error rather than a silent repeat of page 1.
Fields in this section (18)
agriaffaires-search, body.query, body.keyword, body.manufacturer, body.manufacturer_id, body.year_min, body.year_max, body.year_known, body.operating_hours_min, body.operating_hours_max, body.price_min, body.price_max, body.country, body.region_id, body.postcode, body.radius_km, body.sort, body.page
Autocomplete: agriaffaires-suggest
agriaffaires-suggest requires body.query, the text typed so far; q and prefix are accepted in its place. It returns suggestions: words, whole search phrases, and categories, each with a category_id, a label and a count. A search box can turn a partly typed word directly into values body.query and body.category_id accept.
body.site and body.market pick the catalogue and host exactly as they do for agriaffaires-categories. A short fragment such as tract on the way to a full word returns both buckets at once, which is what lets one call drive both a word list and a category list in the same dropdown.
Fields in this section (4)
agriaffaires-suggest, body.query, body.site, body.market
{
"body": {
"rubric_id": 510,
"make_id": 4039,
"model": "6R195",
"year": 2024
}
}{
"body": {
"dealer_id": "10405",
"market": "fr",
"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.
Category tree
POST /api/v1/agriaffaires/agriaffaires-categories
Returns the category tree for Agriaffaires or MachineryZone with the ids every other operation uses.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"fr"}}'Dealer profile
POST /api/v1/agriaffaires/agriaffaires-dealer
Reads one dealer's public business profile, stock breakdown and branch addresses by dealer id.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.dealer_id | string | Required | — | — | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-dealer' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"dealer_id":"10405","market":"fr"}}'Dealer stock
POST /api/v1/agriaffaires/agriaffaires-dealer-listings
Pages through one dealer's own stock of listings, in the same row shape as search.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.dealer_id | string | Required | — | — | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.page | integer | Optional | 1 | — | 1–200 |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-dealer-listings' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"dealer_id":"10405","market":"fr","page":1}}'Dealer directory
POST /api/v1/agriaffaires/agriaffaires-dealers
Searches the dealer directory by company name or country and orders it by name or stock size.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.company | string | Optional | — | — | — |
body.country | string | Optional | — | 49 values"AE""AL""AM""AT""BA""BE""BG""CA""CH""CL""CN""CZ""DE""DK""EE""ES""FR""GB""GR""HR""HU""ID""IE""IT""LT""LU""LV""MD""ME""MK""MU""MX""NL""NO""PA""PH""PL""PT""PY""RO""RS""RU""SE""SI""SK""TH""TW""UA""US" | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.page | integer | Optional | 1 | — | 1–400 |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
body.sort | string | Optional | "name" | "name""name_desc""listings_asc""listings_desc""default" | — |
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/agriaffaires/agriaffaires-dealers' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"fr","page":1}}'Listing detail
POST /api/v1/agriaffaires/agriaffaires-detail
Returns one listing in full, with every technical property, the price and the dealer behind it.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.listing_id | string | Required | — | — | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-detail' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"listing_id":"46952423","market":"fr"}}'Facet counts
POST /api/v1/agriaffaires/agriaffaires-facets
Returns the filter values and counts available for a given query, category or country.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.category_id | integer | Optional | — | — | 1–9007199254740991 |
body.country | string | Optional | — | 49 values"AE""AL""AM""AT""BA""BE""BG""CA""CH""CL""CN""CZ""DE""DK""EE""ES""FR""GB""GR""HR""HU""ID""IE""IT""LT""LU""LV""MD""ME""MK""MU""MX""NL""NO""PA""PH""PL""PT""PY""RO""RS""RU""SE""SI""SK""TH""TW""UA""US" | — |
body.keyword | string | Optional | — | — | — |
body.listing_type | string | Optional | — | "sale""wanted""auction""rental" | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.query | string | Optional | — | — | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-facets' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":702,"market":"fr"}}'Locations
POST /api/v1/agriaffaires/agriaffaires-locations
Returns the countries, regions and departments that the location filters accept.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.country | string | Optional | — | 49 values"AE""AL""AM""AT""BA""BE""BG""CA""CH""CL""CN""CZ""DE""DK""EE""ES""FR""GB""GR""HR""HU""ID""IE""IT""LT""LU""LV""MD""ME""MK""MU""MX""NL""NO""PA""PH""PL""PT""PY""RO""RS""RU""SE""SI""SK""TH""TW""UA""US" | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.region_id | integer | Optional | — | — | 1–9007199254740991 |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-locations' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"FR","market":"fr"}}'Price observatory
POST /api/v1/agriaffaires/agriaffaires-price-index
Benchmarks what a make, model and construction year is actually asking, through the marketplace's own price observatory.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.make_id | integer | Optional | — | — | 1–9007199254740991 |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.model | string | Optional | — | — | — |
body.rubric_id | integer | Optional | — | — | 1–9007199254740991 |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
body.year | integer | Optional | — | — | 1900–2100 |
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/agriaffaires/agriaffaires-price-index' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"fr"}}'Machinery search
POST /api/v1/agriaffaires/agriaffaires-search
Searches and filters listings across Agriaffaires or MachineryZone by machine, price and location.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.category_id | integer | Optional | — | — | 1–9007199254740991 |
body.country | string | Optional | — | 49 values"AE""AL""AM""AT""BA""BE""BG""CA""CH""CL""CN""CZ""DE""DK""EE""ES""FR""GB""GR""HR""HU""ID""IE""IT""LT""LU""LV""MD""ME""MK""MU""MX""NL""NO""PA""PH""PL""PT""PY""RO""RS""RU""SE""SI""SK""TH""TW""UA""US" | — |
body.department_id | integer | Optional | — | — | 1–9007199254740991 |
body.flash_deal | boolean | Optional | — | — | — |
body.has_photo | boolean | Optional | — | — | — |
body.has_video | boolean | Optional | — | — | — |
body.include_facets | boolean | Optional | — | — | — |
body.keyword | string | Optional | — | — | — |
body.listing_type | string | Optional | — | "sale""wanted""auction""rental" | — |
body.manufacturer | string | Optional | — | — | — |
body.manufacturer_id | integer | Optional | — | — | 1–9007199254740991 |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.model | string | Optional | — | — | — |
body.operating_hours_known | boolean | Optional | — | — | — |
body.operating_hours_max | integer | Optional | — | — | 0–9007199254740991 |
body.operating_hours_min | integer | Optional | — | — | 0–9007199254740991 |
body.page | integer | Optional | 1 | — | 1–200 |
body.postcode | string | Optional | — | — | — |
body.posted_within_week | boolean | Optional | — | — | — |
body.price_max | number | Optional | — | — | ≥ 0 |
body.price_min | number | Optional | — | — | ≥ 0 |
body.query | string | Optional | — | — | — |
body.radius_km | integer | Optional | — | — | 1–1000 |
body.region_id | integer | Optional | — | — | 1–9007199254740991 |
body.seller_type | string | Optional | — | "professional""private" | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
body.sort | string | Optional | "newest" | 13 values"newest""price_asc""price_desc""year_asc""year_desc""hours_asc""hours_desc""model_asc""model_desc""manufacturer_asc""manufacturer_desc""rental_price_asc""rental_price_desc" | — |
body.with_price_only | boolean | Optional | — | — | — |
body.year_known | boolean | Optional | — | — | — |
body.year_max | integer | Optional | — | — | 1900–2100 |
body.year_min | integer | Optional | — | — | 1900–2100 |
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/agriaffaires/agriaffaires-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"fr","page":1,"query":"tracteur"}}'Autocomplete
POST /api/v1/agriaffaires/agriaffaires-suggest
Turns a partly typed word into matching search phrases and categories with their counts.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | — | — |
body.market | string | Optional | "fr" | 26 values"ar""br""ca""ca_fr""cn""cz""de""es""eu""fi""fr""hu""in""it""lt""nl""no""pl""pt""ro""rs""se""tr""ua""uk""us" | — |
body.site | string | Optional | "agriaffaires" | "agriaffaires""machineryzone" | — |
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/agriaffaires/agriaffaires-suggest' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"fr","query":"tracteur"}}'How calls work
POST /api/v1/agriaffaires/<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: