开发文档
Andele Mandele API 参考(共 5 个操作)
Andele Mandele API 参考:其 5 个操作各自的输入作用、id 与筛选条件如何交互,以及返回数据的具体内容。
另见: Andele Mandele API:搜索、商品、分类、筛选与品牌概览与价格 · Andele Mandele API 指南:从搜索到商品详情
本页内容
Andele Mandele API 中的 andele-mandele-brands 与 andele-mandele-categories
andele-mandele-brands 返回 query(回显搜索文本)以及一个 brands 匹配列表,其中每一项只带有 id 与 name——足以把品牌 id 传给其它调用,而不是完整的品牌资料。andele-mandele-categories 返回 count(categories 中顶层条目的数量)与 total_listings(这些条目下的商品总数),以及 categories 列表本身。
categories 中任意层级的条目都带有 id、name、level(该节点在树中的深度)、parent_id(其父节点的 id)、url(该分类在站内的页面地址)与 listing_count(该节点自身当前的商品数量);children 在下一层嵌套同样的六个字段,如此重复,直到某个末级分类返回空的 children 列表。两个操作都接受 body.include_pii,但不会改变任何结果:无论其取值如何,各自返回的字段都保持一致。
本节涉及的字段(4)
andele-mandele-brands, andele-mandele-categories, body.query, body.include_pii
andele-mandele-filters:属性、属性值 id 与尺码表
andele-mandele-filters 返回 category_id(回显搜索的分类 id)以及限定在该分类下的 attributes 列表。每个属性带有 id、name、表示该属性一个商品最多能带几个值的 max_per_listing,以及一个 values 列表,其中每个值都有自己的 id 与 name。
尺码属性的 values 就是该分类自己的尺码表:同一个实际尺码在不同分类下对应不同的 value id,因此针对某个 category_id 查到的 value id 不应重用于另一个 category_id。成色、颜色、材质等其它属性同理,都在各自分类下拥有独立的一套属性值 id。
本节涉及的字段(2)
andele-mandele-filters, body.category_id
andele-mandele-product:完整记录中各组字段的含义
andele-mandele-product 需要 body.id(也可通过别名 product_id 传入的数字 id)或 body.url(商品的页面地址)之一,返回单条记录。title 与 description 是商品当前的文字;当 is_machine_translated 为真时,title_original 与 description_original 保留卖家翻译前的原始文字。price_eur 是当前价格,price_before_sale_eur 是促销开始前的价格,original_retail_price_eur 是卖家自己填写的原始零售价;on_sale 与带有 percent、price_eur、expires_at 的 sale 描述正在进行的促销;ld_price_eur 是另一个以欧元计的价格数值,price_mismatch 说明该商品的价格字段之间是否存在冲突。
status、is_sold、sold_at、is_reserved 与 availability 说明该商品是否、何时售出或被保留,以及当前是否仍可购买。category(含 id、name、parent_id)是该商品自己所属的分类节点,是 andele-mandele-categories 针对同一 id 所带字段的一个精简版本;breadcrumb 列出从分类树顶层到该商品所属分类的每一级 name 与 url。brand 带有该商品品牌的 id、name、slug,以及该品牌自己的 follower_count 与 product_count。
attributes 列出该商品自身的属性取值,每项带有 id、name、标明属性类别的 type,以及一个 values 列表,其中颜色类属性还带有 hex 色值;condition、size、colors、material 则把同样的信息以简单的顶层字段形式重复提供,便于不遍历 attributes 直接读取。views、favorites_count、applications_count 分别统计浏览次数、收藏该商品的买家数与申请购买该商品的买家数;created_at 与 listed_at 分别标记记录创建与正式上架的时间;is_promoted 说明卖家是否推广了该商品。image 是封面图,images 是完整图集,images_original 是卖家上传的未经处理的原始图片,image_count 是图片数量。
related_listings_count 只是一个数量,并不包含相关商品本身。seller 带有标识该账户的 id、username、first_name、last_name、profile_url、avatar 与 country;joined_at 与 last_seen_at 标记其活跃时间;rating、rating_count、rating_stars 给出其评分与评分分布;active_listings 与 follower_count 统计其在售商品数与关注者数;verification_level 标明其验证等级;is_business 说明是否为企业账户;flags 列出该账户上的标记;about 是卖家自己填写的介绍文字;status 是账户自身的状态。body.include_pii 不会改变以上任何内容:无论其取值如何,卖家字段返回的内容都保持一致。
本节涉及的字段(4)
andele-mandele-product, body.id, body.url, body.include_pii
andele-mandele-search:结果行内的字段与分页汇总信息
andele-mandele-search 返回 query(回显搜索文本),以及各自统计匹配商品数量的 total 与 total_display,还有用于定位当前页在该结果集中的位置的 page、page_size、last_page 与 has_more;sort 回显所用的排序,filters_applied 回显该结果所采用的筛选条件。products 中的每一项都带有标识该商品的 id、url、slug;price_eur、old_price_eur、old_price_kind、on_sale、sale_percent 与 currency 描述其价格,其中 old_price_kind 说明 old_price_eur 对应两种基准价格中的哪一种:before_sale(促销前的价格)或 original_retail(卖家自己填写的原始零售价)。brand 带有 id、name、slug,标明该商品的品牌,但不包含 andele-mandele-product 为同一品牌额外给出的 follower_count 与 product_count。
shown_attributes 列出该行展示的属性取值。favorites_count 与 applications_count 分别统计收藏该行的买家数与申请购买的买家数。is_inactive、is_sold、is_reserved 与 status_label 说明该商品是否仍处于活跃状态、是否售出、是否被保留,并给出该状态对应的可读标签。
image 与 images 是该行自己的封面图与图集。结果行完全不包含标题或卖家信息;只有 andele-mandele-product 通过该行自身的 id 或 url 才能返回这两者。body.category_id 使用 andele-mandele-categories 所给出的 id;站点不认识的 id 会返回零条匹配结果,而不会使调用失败。
在 body.attribute_ids 中,同一属性的 id 之间是「或」的关系,不同属性的 id 之间是「且」的关系,其属性值 id 来自同一分类下的 andele-mandele-filters;body.brand_ids 的取值来自 andele-mandele-brands 或某一行自身的 brand.id。body.on_sale 用于限定为卖家正在限时促销的商品,body.sold_only 用于限定为近期一小段时间内售出的商品,而不是完整的成交历史。
本节涉及的字段(8)
andele-mandele-search, body.query, body.category_id, body.attribute_ids, body.brand_ids, body.sort, body.page, body.page_size
{
"body": {
"id": 16184947
}
}{
"body": {
"category_id": 16
}
}操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
品牌查询
POST /api/v1/andele-mandele/andele-mandele-brands
按品牌名称或其开头字母查询 Andele Mandele 的品牌 id 与名称。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.query | string | 必填 | — | — | — |
body.include_pii | boolean | 可选 | false | — | — |
请求示例
# 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/andele-mandele/andele-mandele-brands' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"zara"}}'分类树
POST /api/v1/andele-mandele/andele-mandele-categories
返回 Andele Mandele 完整的分类树,并给出每个分类的当前商品数量。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.include_pii | boolean | 可选 | false | — | — |
请求示例
# 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/andele-mandele/andele-mandele-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{}'分类筛选项
POST /api/v1/andele-mandele/andele-mandele-filters
返回 Andele Mandele 某个分类下可用的筛选属性及其属性值 id。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.category_id | integer | 必填 | — | — | 1–9007199254740991 |
body.include_pii | boolean | 可选 | false | — | — |
请求示例
# 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/andele-mandele/andele-mandele-filters' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":16}}'商品详情
POST /api/v1/andele-mandele/andele-mandele-product
按 id 或链接返回 Andele Mandele 某个商品的完整价格、成色、图片与卖家信息。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.id | integer | 可选 | — | — | -9007199254740991–9007199254740991 |
body.include_pii | boolean | 可选 | false | — | — |
body.url | string | 可选 | — | — | — |
请求示例
# 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/andele-mandele/andele-mandele-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"url":"https://www.andelemandele.lv/perle/16184947/ziemas-kombinezons-reima/"}}'搜索
POST /api/v1/andele-mandele/andele-mandele-search
按关键词、分类、品牌、属性、价格与促销条件搜索 Andele Mandele 的商品,支持排序与分页。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.attribute_ids | string[] | 可选 | — | — | — |
body.brand_ids | string[] | 可选 | — | — | — |
body.category_id | integer | 可选 | — | — | 1–9007199254740991 |
body.hide_reserved | boolean | 可选 | false | — | — |
body.include_pii | boolean | 可选 | false | — | — |
body.max_price | number | 可选 | — | — | ≥ 0 |
body.min_price | number | 可选 | — | — | ≥ 0 |
body.on_sale | boolean | 可选 | false | — | — |
body.page | integer | 可选 | 1 | — | 1–10000 |
body.page_size | number | 可选 | 48 | 4896 | — |
body.query | string | 可选 | — | — | — |
body.sold_only | boolean | 可选 | false | — | — |
body.sort | string | 可选 | "relevance" | "relevance""newest""popular""price_asc""price_desc""biggest_discount" | — |
请求示例
# 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/andele-mandele/andele-mandele-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"attribute_ids":["example"],"brand_ids":["example"],"category_id":1,"hide_reserved":false,"include_pii":false,"max_price":0,"min_price":0,"on_sale":false,"page":1,"page_size":48,"query":"example","sold_only":false,"sort":"relevance"}}'调用方式
- 使用
POST /api/v1/andele-mandele/<action>,并携带x-api-key、Content-Type: application/json和必需的Idempotency-Key。 - 调用成功时返回
ok: true:data是操作的结果,meta.requestId标识已记录的请求,meta.chargedCreditUnits是实际扣费金额。否则ok为false,error.code说明原因;请读取ok和error.code,不要只依赖 HTTP 状态码。每个网关响应都带有供支持使用的请求 ID:meta.requestId;没有meta的响应(如受理前被拒绝)则为顶层requestId。 - 只有调用成功才按标价扣费。失败不扣费;结果无法确认时,最多 900 秒后释放,不扣费。
- 请求完成后,以同一个 Idempotency-Key 重复发送相同请求,24 小时内返回已保存的响应,不会再次扣费。
网关调用参考: