From the Auchan Portugal API's category tree to a paged product list
Walking Auchan Portugal's catalogue by category rather than by keyword takes two calls:
- Call
auchan-pt-categorieswith no input for the top of the tree, or withbody.categoryset to acategory_idalready seen underchildrento open one branch. - Take any
category_idfrom that tree'scategoriesor nestedchildrenentries and send it asbody.categorytoauchan-pt-category, raisingbody.pagefrom 1 whilehas_morestays true to work through the category's own pages.
body.per_page on the second call goes up to 100 per page, well below the 2000-page ceiling body.page itself allows, so a large category still takes many calls even at the largest page size. cgid and category_id are accepted in place of body.category on both calls, and parent works as a further alternative on auchan-pt-categories alone.
Searching by keyword and filtering by price, Nutri-Score or origin
Narrowing a keyword search to exactly the rows worth showing combines several filters on one call:
- Send the keyword as
body.querytoauchan-pt-search;q,keyword,searchandtermwork in its place. - Add
body.min_priceandbody.max_price, both whole euros, to bound the price range; a value with cents is rejected rather than rounded. - Add
body.nutriscorefor one letter fromAtoE, andbody.organicorbody.national_productset totruefor Auchan's own 'Biológico' or 'Produto Nacional' facets. - Set
body.sorttoprice_ascorprice_desconce the filtered set is small enough that price order matters more thanpopular, the default.
All of these combine on the identical auchan-pt-category and auchan-pt-promotions inputs too, so the same filter set built for a search can be reused unchanged to narrow a category browse or the current promotion list.
Tracking a promotion's price and window over time
Watching one promotion's price and window rather than reading it once:
- Call
auchan-pt-promotionswithbody.queryorbody.categoryset to the product line being watched. - Store each row's
product_idtogether with itsregular_price,on_offerandpromotion_window. - Repeat the same call later and compare
promotion_window's owntodate perproduct_idto see which offers are about to end rather than only which are running right now.
recommended_retail_price_text and discount_vs_recommended_text on the same row state the discount against Auchan's own recommended retail price, PVPR, a separate comparison from whatever regular_price alone implies, so the two are worth recording side by side rather than treated as the same figure.
From a search result to a product's full detail
Reading everything about one product, including its label, after it has been found:
- Take a
product_idfrom anyauchan-pt-category,auchan-pt-promotionsorauchan-pt-searchrow. - Send it as
body.product_idtoauchan-pt-product;id,pid,urlandproduct_urlwork in its place, the last two accepting the product's own page address directly. - Read
label.ingredientsandlabel.nutrition_textfor the label text itself, andlabel.attributesfor any further label values beyond those two. - Check
min_order_quantity,max_order_quantityandstep_quantitybefore building an order for more than one unit, since these bound what a single order can contain beyond what any row already showed.
promotions on the same response lists each running offer with its own start and end, separate from the plainer promotion_badges list of badge text for the same offers.
Pricing a product at the nearest store
Pricing a product at the Auchan Portugal store closest to a shopper, rather than at the online price:
- Send the shopper's point as
body.latitudeandbody.longitudetoauchan-pt-stores, withbody.radius_kmset to15to keep the search tight. - Take the
store_idof the nearest entry instores. - Send that
store_idasbody.store_idonauchan-pt-product, alongside theproduct_idalready found through search or category browse.
The price, regular_price and unit_price figures that come back then follow that store's own price book rather than the online store's, and the response's own store object names which store they belong to. Raising body.radius_km to 30, 50, 100 or 300 only widens which stores auchan-pt-stores can return; it has no effect on auchan-pt-product's own price once a store_id is already chosen.
Narrowing a category browse to only its current promotions
- Take a
category_idfromauchan-pt-categories. - Send it as
body.categorytoauchan-pt-promotionsinstead ofauchan-pt-category, keeping only the rows currently discounted within that category. - Compare
returnedagainsttotalon the same response to see how large a share of that category's current page is on promotion.
auchan-pt-promotions accepts the identical body.category, body.sort, body.page and body.per_page inputs auchan-pt-category does, so a workflow built for paging through a category can be pointed at its promotions instead by calling a different operation with the same inputs. This works the other direction too: a category_id that already appears on an auchan-pt-promotions row can be sent back to auchan-pt-category to page through that same category's promotion and non-promotion rows together.
Auchan Portugal in brief
Auchan completed the acquisition of Dia's Portuguese retail operations, including stores that had traded under the Minipreço brand, expanding the Auchan network in Portugal. Nutri-Score, a nutrition labelling system that originated in France, is one of the voluntary schemes food and retail companies across Europe, Auchan in Portugal among them, have adopted for their own products.
[
{
"body": {
"category": "alimentacao-"
}
},
{
"body": {
"category": "produtos-lacteos",
"page": 1,
"per_page": 48
}
}
]{
"body": {
"latitude": 38.75,
"longitude": -9.15,
"radius_km": "15"
}
}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/auchan-pt/auchan-pt-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category":"alimentacao-"}}'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.
Auchan Portugal API: categories, search, product and store data overview and prices · Read the API reference · Try it in the playground