Alcampo groceries API workflow: from the category tree to a category id
To browse into a single category rather than search by keyword, read the tree first and reuse the id it hands you:
- Call
alcampo-categoriesand read its tree ofid,name,retailer_category_idandchildrenvalues. - Pick the node for the section you want, from the top level or from inside its
children. - Send that node's own
idasbody.category_idtoalcampo-category.
The call in step 3 returns the same row fields as a search, together with a count of how many products sit inside that one category, so a category browser can show that count before the shopper opens the list. Because the tree only nests one level deep, a node you find inside children needs nothing more than its own id either: there is no deeper level to open first.
Searching, then opening one product's full record
A workflow that starts from a shopper's own words rather than a category looks like this: call alcampo-search with body.query set to what they typed, then take the id of the row they pick and send it straight to alcampo-product as body.id. alcampo-product also accepts the aliases product_id and the product's own url in place of id, so a link copied from a result page works as the input just as well as the row's own identifier, and the full record it returns adds the description, ingredients, allergens, nutrition table, breadcrumbs and images that the search row does not carry. Fetching that full record only once a shopper opens one product keeps the first search call itself lighter, since those extra label fields live outside the row.
Paging through more than one page of results
body.limit requests at most 48 rows at a time from alcampo-search or alcampo-category, so a catalogue walk is paged rather than a single call: send the first request with body.limit set as high as 48, then take the next_cursor the answer carries and send it back as body.cursor on the next request, keeping the same query or category, the same filters and the same location each time. Because the source drops duplicate rows across its own internal groups before handing back a page, a request can come back with fewer rows than body.limit asked for even while next_cursor still points to more; stop paging only once an answer carries no further cursor to send.
A full walk of a category or a search is therefore paged rather than completed in one call, and the upper bound on how much a single request can return is 48 rows. A UI that walks an entire category should treat a page without a next_cursor as the ordinary end of a short result set rather than as a failure, since how many pages one query produces can vary between calls.
Filtering to on-offer items in one brand, cheapest first
To compare only the deals inside one brand, run a first alcampo-search or alcampo-category call and read the brands listed in its facets[id=brands] group. Repeat the call with body.brand set to the exact value you want, body.on_offer set to true, and body.sort set to priceAscending, so the cheapest matching row comes first.
Leaving body.sort out instead returns the source's own favorite order, and leaving body.on_offer out returns items whether or not they currently carry a source promotion. The same facets[id=brands] list that supplies body.brand also shows every brand name the current query or category actually has to offer, so a brand picker built from it never offers a value alcampo-search or alcampo-category would reject.
Pricing a session consistently for one delivery point
alcampo-search, alcampo-category and alcampo-product each read body.latitude and body.longitude as a pair, so a session that searches, browses a category and then opens a product should send the same two coordinates, and the same body.postal_code alongside them, on every one of those calls; mixing a request that carries the pair with one that leaves it out can show different prices or availability for the same product within one session. Leaving the coordinates out of every call instead prices and stocks the whole session for the chain's own default region, consistently, just not for the shopper's own address. body.postal_code never substitutes for the coordinates on any of the three operations: on its own it changes nothing about which region prices the reply.
Alcampo groceries explained
A private label, or own-brand, product is sold under a retailer's own brand name even though a separate manufacturer often makes it, and such store brands are usually priced below national-brand versions of the same item.
Comparing grocery prices across Spanish supermarket chains, Alcampo among them, is a recurring exercise for Spanish consumer groups, who use such comparisons to show households how much a basket of groceries can cost depending on which chain fills it.
[
{
"body": {
"category_id": "48c34870-c5a3-46c9-870b-590c66fe8848",
"limit": 24,
"sort": "priceAscending"
}
},
{
"body": {
"id": "473577"
}
}
]{
"body": {
"query": "leche",
"on_offer": true,
"sort": "priceAscending",
"limit": 24
}
}Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
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.
# 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":{}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
Alcampo Groceries Data overview and prices · Read the API reference · Try it in the playground