Documentation
A101 API reference
Reference for the A101 API: what the campaign, product detail, search and suggest inputs do and what the returned rows and record fields mean.
See also: A101 API: Kapıda groceries and Ekstra products overview and prices · A101 API guide: search, campaigns and price tracking
On this page
A101 API campaign listing: a101-campaigns
a101-campaigns returns the products of one A101 campaign page. The campaign values stand for the promotions as the shop names them, and the shops that run them:
aldin_aldinis Aldın Aldın, the only value that exists in both shopshaftanin_yildizlariis Haftanın Yıldızları, in Kapıdaaldin_aldin_xis Aldın Aldın X, in Kapıdaaylik_firsatis Aylık Fırsat Ürünleri, in Kapıdasepette_10_tlis the offer for baskets of 10 TL and more, in Kapıdacok_al_az_odeis the Çok Al Az Öde multi-buy, in Kapıdaaldin_aldin_ekstrais Aldın Aldın Ekstra, in Ekstra
Pair a value with a shop that runs it. The rows in results have the same fields as search rows, 60 to a page. Next to them the answer carries count, total_results, total_pages, page, page_size and has_more for paging.
It also gives the channel that was read, campaign, campaign_code and campaign_page for the campaign that was listed, and store_code for the Kapıda delivery store. Raise page while has_more shows that another page follows; a page number above the range is rejected.
Fields in this section (4)
a101-campaigns, body.campaign, body.channel, body.page
Product record by id or address: a101-product-detail
a101-product-detail reads one product. product_id takes the product_id of a search or campaigns row, for example 12002661 from Kapıda or 26077738 from Ekstra. url is the alternative: an a101.com.tr product address that ends in _p- followed by the id, or that contains /kapida/product/ followed by the id.
With an id, auto looks in both shops, and naming kapida or ekstra restricts the look-up to one; with an address, the address decides the shop by itself. The names id and sku are also accepted in place of product_id, and product_url in place of url. Inside the returned product, several entries have fields of their own:
breadcrumbentries carryid,nameandurlcampaign_periodcarriesname,starts_onandends_oninstallmentsentries pair acardwith itsmax_interest_free_installmentsspecificationsentries pair anamewith avaluevariantsentries carryproduct_id,size,color,price,in_stockandurlother_channel_offerdescribes the same product in the other A101 shop, at that shop's own price, withchannel,product_id,price,price_before_discount,discount_percent,in_stock,urlandstore_code; it is null when the product is sold in one shop only
When the record could be built from the search index alone, product_page reads false.
Fields in this section (4)
a101-product-detail, body.product_id, body.url, body.channel
Keyword search: a101-search
a101-search looks up a Turkish keyword in one shop and returns 60 products per page. Groceries are sold only in Kapıda, while televisions, phones, furniture and clothes are in Ekstra. Brand names and product words both work, and A101's search tolerates typos.
The names q and keyword are also accepted in place of query. Sorting depends on the shop: Ekstra offers its own orders, while Kapıda's search has no working sort, so a Kapıda request accepts relevance alone and any other order is rejected. When A101 has nothing that matches, it fills the page with unrelated products:
- By default these rows are removed, and
fallback_results_droppedreports how many were removed. - With
include_fallback_resultsset to true they come back separately infallback_results, andfallback_totalaccompanies them.
keyword_matches_on_page and page_notice describe how the page relates to the keyword, and total_results can be null on a search. Next to the results rows, the answer carries count, total_pages, page, page_size and has_more. It also carries channel and, on Kapıda, store_code.
Fields in this section (4)
a101-search, body.query, body.sort, body.include_fallback_results
Type-ahead suggestions: a101-suggest
a101-suggest answers a partly typed keyword, the text a user has entered so far, which needs at least 2 characters; peyn on the way to peynir is one such input. Here too, q and keyword are accepted in place of query. The answer holds products, the top matching products with the same row fields as search, and categories, whose entries pair a category name with its count.
On Ekstra it also returns brands, whose entries pair a brand name with its count. total_results gives the number of matches, and channel and query repeat the shop and the text that were used, which helps a client discard an answer that belongs to an older keystroke.
Fields in this section (3)
a101-suggest, body.query, body.channel
Fields inside A101 API product rows
In the rows of results and products, price is the shelf price in Turkish lira and, on Kapıda, the delivery store's price; price_before_discount is the struck price and is null when there is none. Some blocks inside a row carry fields of their own:
campaignsentries carrycode,label,site_name,starts_onandends_on- on Kapıda rows,
basket_offer, a price that applies only inside a qualifying basket, carriesprice,regular_price,code,label,conditionandends_on - on Kapıda rows,
multi_buycarriesmin_quantity,unit_price,regular_unit_price,code,labelandends_on - on Kapıda rows,
unit_pricecarriesprice,perandlabel
Treat basket_offer as conditional: it is not the shelf price. Ekstra rows add barcode, which holds the GTIN, together with sales_channels, max_order_quantity and country_of_origin. In the product record, barcodes lists the codes of the item, and for Kapıda it holds every barcode A101 lists.
Fields in this section (4)
a101-search, a101-campaigns, a101-suggest, a101-product-detail
Attempts on difficult requests: max_rotations
Each of the four operations takes max_rotations, an advanced setting for how many attempts a call makes when a request proves difficult. A value outside the accepted range is ignored and the default of 4 applies, so a client that computes this number before sending it should hold it within the range shown in the input table of each operation.
Fields in this section (5)
body.max_rotations, a101-campaigns, a101-product-detail, a101-search, a101-suggest
{
"body": {
"product_id": "12002661",
"channel": "kapida"
}
}{
"body": {
"campaign": "haftanin_yildizlari",
"channel": "kapida",
"page": 1
}
}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.
Campaign products
POST /api/v1/a101/a101-campaigns
Lists the products on one A101 campaign page in Kapıda or Ekstra, one page of results at a time.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.campaign | string | Optional | "aldin_aldin" | "aldin_aldin""haftanin_yildizlari""aldin_aldin_x""aylik_firsat""sepette_10_tl""cok_al_az_ode""aldin_aldin_ekstra" | — |
body.channel | string | Optional | "kapida" | "kapida""ekstra" | — |
body.max_rotations | integer | Optional | 4 | — | 1–8 |
body.page | integer | Optional | 1 | — | 1–200 |
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/a101/a101-campaigns' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{}'Product detail
POST /api/v1/a101/a101-product-detail
Reads one A101 product by its product id or its page address, from either shop.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.channel | string | Optional | "auto" | "auto""kapida""ekstra" | — |
body.max_rotations | integer | Optional | 4 | — | 1–8 |
body.product_id | string | Optional | — | — | — |
body.url | 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/a101/a101-product-detail' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"12002661"}}'Keyword search
POST /api/v1/a101/a101-search
Searches the Kapıda or Ekstra shop for a Turkish keyword and returns a page of matching products.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | — | — |
body.channel | string | Optional | "kapida" | "kapida""ekstra" | — |
body.include_fallback_results | boolean | Optional | false | — | — |
body.max_rotations | integer | Optional | 4 | — | 1–8 |
body.page | integer | Optional | 1 | — | 1–200 |
body.sort | string | Optional | "relevance" | "relevance""price_asc""price_desc""newest""discount""best_selling" | — |
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/a101/a101-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"channel":"kapida","query":"peynir"}}'Type-ahead suggestions
POST /api/v1/a101/a101-suggest
Returns the top matching products and the category and brand suggestions for a partly typed keyword.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.query | string | Required | — | — | — |
body.channel | string | Optional | "kapida" | "kapida""ekstra" | — |
body.max_rotations | integer | Optional | 4 | — | 1–8 |
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/a101/a101-suggest' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"peynir"}}'How calls work
POST /api/v1/a101/<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: