Documentation
Alcampo groceries API reference for every operation
Reference for the Alcampo groceries API: inputs, defaults, limits and reply fields for the category tree, category browsing, product detail and search.
See also: Alcampo Groceries Data overview and prices · Alcampo groceries API guide: workflows across operations
On this page
`alcampo-categories`: category tree fields
alcampo-categories returns the grocery category tree as id, name, retailer_category_id and children for each node. id is the value alcampo-category expects in body.category_id; retailer_category_id is a separate code the chain uses for its own purposes and is not a valid body.category_id value. The tree holds two levels: each top-level node's children carries its own subcategory nodes, and those nodes repeat the same four fields without any further nesting beneath them, so following one branch down means reading at most two levels of id values.
Fields in this section (1)
alcampo-categories
`alcampo-category`: browsing one category
alcampo-category takes a category's id from the tree in body.category_id and returns the same row fields as alcampo-search, together with a count of how many products that category holds in total. Because the category and its products are looked up by that single identifier, a category id taken from deep inside the tree's child level works exactly the same way as one taken from the top level.
Fields in this section (2)
alcampo-category, body.category_id
`alcampo-product`: the full product record
alcampo-product accepts a product's id from a search or category row, or the aliases product_id and url — a www.compraonline.alcampo.es product page address — in its place; the operation reads whichever of the three is sent. description holds the product's write-up, while fields and ingredients hold the structured label attributes and the ingredient text.
allergens holds the label's declared allergens, the nutrition table holds its per-unit nutrition figures, and breadcrumbs names the category path shown above the product, next to its images. gtin, the barcode printed on the label, is present only for a product whose label actually carries an EAN.
Fields in this section (2)
alcampo-product, body.id
`alcampo-search`: keyword search and its reply
alcampo-search matches body.query, up to 100 characters, or its alias q, against the catalogue and returns one row per matching product carrying its EUR shelf price, unit price, any promotion, availability, brand, pack size, image and url. Alongside the rows, the reply also carries a facets list of filter groups, a next_cursor value for requesting a further page, and a location block. Its region member names the delivery region used for the row prices, and its store_defaulted member is true when that region was the chain's own default rather than one set from body.latitude and body.longitude.
Fields in this section (2)
alcampo-search, body.query
Alcampo groceries API: paging, sorting, filtering and the delivery point
alcampo-category and alcampo-search share the same paging, sorting and filtering inputs. body.limit requests 1 to 48 rows, 24 by default, and a value outside that range is rejected rather than rounded into it; the source itself can still hand back fewer rows than requested because it drops duplicate rows across its own internal groups before the page is built. The next page is requested by sending the previous answer's next_cursor back in body.cursor, matched to the same query or category, the same filters and the same location.
body.sort defaults to favorite and otherwise only accepts priceAscending, priceDescending, pricePerAscending or pricePerDescending; any other value is rejected. body.brand narrows either call to one exact value taken from the brands group of a previous answer's facets[id=brands] list, and body.on_offer (true or false, false by default) keeps only rows carrying a source promotion.
alcampo-category, alcampo-product and alcampo-search each accept body.latitude and body.longitude as a single pair: sending both sets the delivery point that the prices, promotions and availability in their replies follow, while sending only one of the two, or neither, leaves every one of the three to answer for the chain's own default region instead. body.postal_code is sent alongside the coordinates and has no effect on its own.
Fields in this section (11)
alcampo-category, alcampo-search, alcampo-product, body.limit, body.cursor, body.sort, body.brand, body.on_offer, body.latitude, body.longitude, body.postal_code
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/alcampo/alcampo-categories
Returns the grocery category tree, with the id each node needs for browsing that category directly.
Input fields
This operation takes no input fields. Send the JSON request body shown below.
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/alcampo/alcampo-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{}}'Browse Category
POST /api/v1/alcampo/alcampo-category
Lists the products inside one category by its id, with the same paging, sorting and filtering options as keyword search.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.category_id | string | Required | — | — | — |
body.brand | string | Optional | — | — | — |
body.cursor | string | Optional | — | — | — |
body.latitude | number | Optional | — | — | — |
body.limit | integer | Optional | 24 | — | 1–48 |
body.longitude | number | Optional | — | — | — |
body.on_offer | boolean | Optional | false | — | — |
body.postal_code | string | Optional | — | — | — |
body.sort | string | Optional | "favorite" | "favorite""priceAscending""priceDescending""pricePerAscending""pricePerDescending" | — |
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/alcampo/alcampo-category' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":"48c34870-c5a3-46c9-870b-590c66fe8848"}}'Product Detail
POST /api/v1/alcampo/alcampo-product
Returns one product's full record, including ingredients, allergens, nutrition and images.
Input fields
| Field | Type | Required | Allowed values | Limits |
|---|---|---|---|---|
body.id | string | Required | — | — |
body.latitude | number | Optional | — | — |
body.longitude | number | Optional | — | — |
body.postal_code | string | Optional | — | — |
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/alcampo/alcampo-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"id":"473577"}}'Search Products
POST /api/v1/alcampo/alcampo-search
Searches the catalogue by keyword and returns pricing, promotions, availability and images for matching products.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | — | — |
body.brand | string | Optional | — | — | — |
body.cursor | string | Optional | — | — | — |
body.latitude | number | Optional | — | — | — |
body.limit | integer | Optional | 24 | — | 1–48 |
body.longitude | number | Optional | — | — | — |
body.on_offer | boolean | Optional | false | — | — |
body.postal_code | string | Optional | — | — | — |
body.sort | string | Optional | "favorite" | "favorite""priceAscending""priceDescending""pricePerAscending""pricePerDescending" | — |
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/alcampo/alcampo-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"limit":24,"query":"leche"}}'How calls work
POST /api/v1/alcampo/<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: