开发文档
Argos API 参考:6 个操作
Argos API 参考文档:6 个操作各自的输入作用、分类、特惠与搜索共用的行结构,以及返回数据的具体内容。
另见: Argos API:分类、特惠、搜索与商品数据概览与价格 · Argos API 指南:搜索、分类与特惠流程
本页内容
Argos API:分类、特惠与搜索共用同一行结构
argos-category、argos-deals 与 argos-search 在 results 中返回相同的行结构。argos-category 与 argos-search 在 body.page、body.page_size 与 body.sort 上的默认值与取值范围完全一致。两者同样接受 body.brands 与 body.min_rating,默认值与取值范围相同。
argos-deals 同样接受 body.page、body.page_size、body.sort 与 body.brands,但没有 body.min_rating 这一输入。body.category_id 在 argos-category 上为必填,可用 category 别名或完整的浏览 url 代替;同一输入在 argos-deals 与 argos-search 上为可选,且只接受 category 别名。argos-deals 没有任何必填输入:body.query、body.category_id 与 body.brands 全部省略时仍会返回当前 Argos 特惠列表,而不会报错。
body.query 在 argos-search 上为必填,在 argos-deals 上为可选,两者都接受 q 与 keyword。argos-search 还额外接受 searchTerm。price_is_from 标记某一行在含多个款式时的起始价,与单一款式商品的固定 price 不同;clearance 则表示该行被进一步降价清仓,幅度超出普通的 discount_percent。
search_index_rating、rating_scale 与 search_index_review_count 来自 Argos 自己的搜索索引,而不是对同一商品重新读取 argos-product-reviews 的结果,因此二者在不同时间读取时可能出现差异。filters_available 列出某次查询或分类下所有可用的筛选项;filters_applied 则只列出该次调用实际使用的筛选项。
本节涉及的字段(6)
argos-category, argos-deals, argos-search, body.query, body.category_id, body.brands
argos-product-detail:价格、优惠与 Nectar 积分
argos-product-detail 返回的 product 对象围绕价格与优惠细节展开,这些字段在行结构中都不存在。was_price、savings 与 discount_percent 描述与行结构相同类型的降价,而 multibuy_offers 列出另外的优惠,例如买多件更优惠;其中每条记录自带的 offer_type 与 mechanic 说明需要购买什么,min_quantity 与 eligible_product_count 限定达标条件。starts_at/ends_at 则给出有效期,这些金额从不从 price 中扣除。
nectar_points 与 nectar_multiplier 只在这一操作中返回,倍数字段用于标记该商品的积分倍率高于平常。delivery_cost_varies 区分出配送费用随地址变化的商品,这是在行结构已有的 delivery_cost 之外的信息。end_of_line、made_to_order、age_restricted 与 max_quantity 分别标记商品本身而非配送上的某种限制。
本节涉及的字段(2)
argos-product-detail, body.product_id
argos-product-detail:款式、分类路径与规格数据
variants 列出商品自身的尺码或颜色等款式;每个款式都有自己的 product_id、attributes 与 price,因此某个款式的价格可能高于或低于由此进入的商品本身,而不是共用同一固定价格。breadcrumb 从顶层分类开始还原商品所在的分类路径,其中每一条的 category_id 都可以直接发送给 argos-category 来浏览该层级。
specifications 保存卖家自己填写的名称与数值规格行,features 则是另一份单独的卖点列表。energy、dimensions、safety_text 与 exclusion_text 各自带有一种只有这一操作才返回的尺寸或标签文字。
本节涉及的字段(2)
argos-product-detail, body.product_id
argos-product-questions:谁回答了,一共多少个
argos-product-questions 上的 body.page_size 默认为 10,最高为 50,远低于 argos-category 的 200 行上限。body.sort 默认为 newest,也可取 oldest。
每个问题的 answer_count 在查看 answers 列表之前就能说明它收到了多少回复,因此没有回复的问题可以直接跳过进一步请求。在 answers 内部,best_answer 说明 Argos 挑选出的最有用回答,brand_answer 与 staff_answer 分别单独说明来自该商品品牌方或 Argos 员工的回答,helpful_votes/unhelpful_votes 则携带其他顾客给该回答的投票数。
本节涉及的字段(5)
argos-product-questions, body.product_id, body.page, body.page_size, body.sort
argos-product-reviews:评分、分布与评论者信息
argos-product-reviews 返回 reviews 以及描述整体情况的汇总字段。reviews 中每条记录带有 1 到 5 的 rating、自己的 title 与 text。还带有评论者的 author 与 author_location、submitted_at 日期,以及 recommended。
syndicated 说明该评论是否来自其他零售商自己的评论集合。secondary_ratings 给出各维度的评分,reviewer_context 记录与评论者本人相关的信息,badges 是该评论本身附带的标签,photos 与 responses 携带附带的图片或回复;helpful_votes 与 unhelpful_votes 则是该评论自己的投票数。汇总字段 total_reviews、rating 与 rating_scale 描述的是整个商品而不是单条评论。
rating_distribution 把 total_reviews 按五个星级拆分,recommended_percent 给出 recommended 一项为正面的评论者比例。secondary_rating_averages 则对 secondary_ratings 中的每个维度在全部评论上取平均,而不只是某一条。
rating_filter 原样回显调用本身发送的 body.rating 取值,未发送时则为空。body.rating 只保留恰好等于该星级(1 到 5)的评论,也可用 stars 作为别名——这比阈值式筛选更严格,因为星级更低的评论无论 body.rating 设得多高都不会被选中。
本节涉及的字段(6)
argos-product-reviews, body.product_id, body.rating, body.page, body.page_size, body.sort
在三个操作间用同一方式标识 Argos 商品
argos-product-detail、argos-product-questions 与 argos-product-reviews 都接受相同的 body.product_id。三者也都接受完全相同的一组别名:id、catalogue_number、catalog_number 与 url。一个 7 位的目录编号(例如 3102039)、以字母 tuc 开头的 Tu 服饰编号、某个市场编号,以及完整的 argos.co.uk/product/ 链接,都可以作为这一输入用在三个操作中的任意一个上,因此从其中一个操作取得的 id 可以直接用在另外两个操作上,不需要重新格式化。
本节涉及的字段(4)
argos-product-detail, argos-product-questions, argos-product-reviews, body.product_id
argos-search:拼写校正与解析出的分类
argos-search 在 argos-category 与 argos-deals 共用的行结构之外,还额外返回 matched_query 与 category_applied。matched_query 只在 Argos 自己的拼写校正替换了一个没有匹配结果的拼错关键词时才会与发送的 query 不同;否则它只是原样回显 query。category_applied 给出 Argos 自己解析出的分类的 category_id 与 name,这不一定与调用通过 body.category_id 传入的分类相同,因为当关键词本身明显指向另一个品类时,二者可能出现分歧。
本节涉及的字段(3)
argos-search, body.query, body.category_id
{
"body": {
"product_id": "3102039"
}
}{
"body": {
"product_id": "3102039",
"rating": 5,
"page_size": 50
}
}操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
分类浏览
POST /api/v1/argos/argos-category
按页列出某个 Argos 分类下的商品,排序与筛选方式与搜索相同。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.category_id | string | 必填 | — | — | — |
body.brands | string[] | 可选 | — | — | — |
body.min_rating | string | 可选 | — | "1""2""3""4" | — |
body.new_only | boolean | 可选 | false | — | — |
body.offers_only | boolean | 可选 | false | — | — |
body.page | integer | 可选 | 1 | — | 1–200 |
body.page_size | integer | 可选 | 24 | — | 1–60 |
body.sort | string | 可选 | "relevance" | "relevance""price_asc""price_desc""rating" | — |
请求示例
# 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/argos/argos-category' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"category_id":"29560"}}'响应字段
results[]product_idtitlebrandurlimagepricecurrencyprice_is_fromwas_pricesavingsdiscount_percentoffer_textclearancesearch_index_ratingrating_scalesearch_index_review_counthas_variationsvariant_optionsdeliverableclick_and_collectfree_deliverydelivery_costseller_typefulfilment_agentbadges[]
counttotal_resultspagepage_sizehas_moresort_appliedfilters_applied[]filters_available[]facetlabelvalues[]idlabelcount
sponsored_droppedcategory_id
特惠商品
POST /api/v1/argos/argos-deals
返回正在降价或参与多件特惠的 Argos 商品,可按关键词、分类或品牌进一步筛选。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.brands | string[] | 可选 | — | — | — |
body.category_id | string | 可选 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–200 |
body.page_size | integer | 可选 | 24 | — | 1–60 |
body.query | string | 可选 | — | — | — |
body.sort | string | 可选 | "relevance" | "relevance""price_asc""price_desc""rating" | — |
请求示例
# 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/argos/argos-deals' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"toys"}}'响应字段
results[]product_idtitlebrandurlimagepricecurrencyprice_is_fromwas_pricesavingsdiscount_percentoffer_textclearancesearch_index_ratingrating_scalesearch_index_review_counthas_variationsvariant_optionsdeliverableclick_and_collectfree_deliverydelivery_costseller_typefulfilment_agentbadges[]
counttotal_resultspagepage_sizehas_moresort_appliedfilters_applied[]filters_available[]facetlabelvalues[]idlabelcount
sponsored_droppedquerycategory_id
商品详情
POST /api/v1/argos/argos-product-detail
返回单个 Argos 商品的价格、多件特惠、Nectar 积分、评分、配送方式、规格参数、款式与保修信息。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.product_id | 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/argos/argos-product-detail' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3102039"}}'响应字段
productproduct_idtitlebrandurleanpricecurrencywas_pricesavingsdiscount_percentoffer_textmultibuy_offers[]offer_idtitledescriptionoffer_typemechanicstarts_atends_atmin_quantityeligible_product_count
nectar_pointsnectar_multiplierratingrating_scalereview_countavailabilitydeliverableclick_and_collectfree_deliverydelivery_costdelivery_cost_variesend_of_linemade_to_ordermax_quantityage_restrictedseller_typefulfilment_agentimages[]videos[]documents[]descriptionfeatures[]specificationsbreadcrumb[]category_idnameurl
category_idvariants[]product_idattributespriceurl
badges[]warranties[]energydimensionssafety_textexclusion_text
商品问答
POST /api/v1/argos/argos-product-questions
返回某个 Argos 商品的顾客提问及对应回答。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.product_id | string | 必填 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–500 |
body.page_size | integer | 可选 | 10 | — | 1–50 |
body.sort | string | 可选 | "newest" | "newest""oldest" | — |
请求示例
# 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/argos/argos-product-questions' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3102039"}}'响应字段
product_idquestions[]question_idquestiondetailsauthorsubmitted_atanswer_countanswers[]answer_idtextauthorsubmitted_atbest_answerbrand_answerstaff_answerhelpful_votesunhelpful_votes
counttotal_resultspagepage_sizehas_more
商品评论
POST /api/v1/argos/argos-product-reviews
返回某个 Argos 商品的顾客评论,并给出评分分布与推荐比例。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.product_id | string | 必填 | — | — | — |
body.page | integer | 可选 | 1 | — | 1–500 |
body.page_size | integer | 可选 | 10 | — | 1–50 |
body.rating | integer | 可选 | — | — | 1–5 |
body.sort | string | 可选 | "newest" | "newest""oldest""highest_rating""lowest_rating""most_helpful" | — |
请求示例
# 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/argos/argos-product-reviews' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"product_id":"3102039"}}'搜索
POST /api/v1/argos/argos-search
按关键词搜索 Argos 商品,排序与筛选方式与分类浏览相同。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.query | string | 必填 | — | — | — |
body.brands | string[] | 可选 | — | — | — |
body.category_id | string | 可选 | — | — | — |
body.min_rating | string | 可选 | — | "1""2""3""4" | — |
body.new_only | boolean | 可选 | false | — | — |
body.offers_only | boolean | 可选 | false | — | — |
body.page | integer | 可选 | 1 | — | 1–200 |
body.page_size | integer | 可选 | 24 | — | 1–60 |
body.sort | string | 可选 | "relevance" | "relevance""price_asc""price_desc""rating" | — |
请求示例
# 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/argos/argos-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"kettle"}}'响应字段
results[]product_idtitlebrandurlimagepricecurrencyprice_is_fromwas_pricesavingsdiscount_percentoffer_textclearancesearch_index_ratingrating_scalesearch_index_review_counthas_variationsvariant_optionsdeliverableclick_and_collectfree_deliverydelivery_costseller_typefulfilment_agentbadges[]
counttotal_resultspagepage_sizehas_moresort_appliedfilters_applied[]filters_available[]facetlabelvalues[]idlabelcount
sponsored_droppedquerymatched_querycategory_appliedcategory_idname
调用方式
- 使用
POST /api/v1/argos/<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 小时内返回已保存的响应,不会再次扣费。
网关调用参考: