Product
从店铺获取单个 Shopify 商品:价格、所有变体、选项、图片和描述。
GET | POST /v1/shopify/product参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。
请求
curl "https://gateway.apinoa.com/v1/shopify/product?id=thedoodlebot.com%2Fdoodle-bot" \
-H "x-api-key: $APINOA_API_KEY"参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | A Shopify id rather than a global identifier: the composite shop/handle, e.g. us.giesswein.com/wool-sneaker-women. A search item's id is already in this form, and a full product URL is accepted too. |
currency | string | Presentment currency, ISO 4217. | |
region | string | Buyer country as ISO 3166-1 alpha-2; sets availability, shipping and price. |
这些参数及所有响应类型也写在OpenAPI 文档中。
响应
在 data 中返回 Product。 真实响应的节选:数组只保留前几项,长文本已截断。
{
"success": true,
"data": {
"marketplace": "shopify",
"id": "thedoodlebot.com/doodle-bot",
"url": "https://thedoodlebot.com/products/doodle-bot",
"title": "Doodle Bot Limited Edition",
"price": {
"currency": "USD",
"amount": 80
},
"listPrice": {
"currency": "USD",
"amount": 140
},
"brand": "Doodle Bot",
"listedAt": "2025-10-06T02:01:18.000Z",
"inStock": true,
"description": "<p data-start=\"247\" data-end=\"513\"><strong data-start=\"302\" data-end=\"392\">Doodle Bot is the fun, interactive robot tha…",
"badges": [],
"promotions": [],
"features": [],
"media": {
"images": [
"https://cdn.shopify.com/s/files/1/0785/4070/1921/files/IMG_2729.jpg?v=1759715594",
"https://cdn.shopify.com/s/files/1/0785/4070/1921/files/IMG_2728.jpg?v=1759715764"
],
"videos": []
},
"category": [],
"attributes": [],
"options": [
{
"id": "1",
"name": "Color",
"values": [
{
"id": "PINK",
"name": "PINK"
},
{
"id": "GREEN",
"name": "GREEN"
}
]
}
],
"variants": [
{
"id": "47235322806497",
"price": {
"currency": "USD",
"amount": 80
},
"listPrice": {
"currency": "USD",
"amount": 140
},
"inStock": true,
"selections": [
{
"optionId": "1",
"valueId": "PINK",
"optionName": "Color",
"valueName": "PINK"
}
]
},
{
"id": "47235322839265",
"price": {
"currency": "USD",
"amount": 80
},
"listPrice": {
"currency": "USD",
"amount": 140
},
"inStock": false,
"selections": [
{
"optionId": "1",
"valueId": "GREEN",
"optionName": "Color",
"valueName": "GREEN"
}
]
}
],
"offers": [],
"reviewAspects": [],
"boxContents": [],
"reviews": [],
"seller": {
"id": "thedoodlebot.com",
"url": "https://thedoodlebot.com"
}
}
}错误
| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | INVALID_PARAMS | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 400 | INVALID_PRODUCT_ID | 该 id 既不是 shop/handle,也不是商品 URL。 |
| 401 | UNAUTHORIZED | 缺少 x-api-key 请求头,或密钥已吊销或未知。 |
| 402 | INSUFFICIENT_BALANCE | 余额不足以支付本次调用。请在控制台充值。 |
| 404 | PRODUCT_NOT_FOUND | 该平台没有这个商品。 |
| 429 | MARKETPLACE_SATURATED | 并发调用过多。请等待 Retry-After 秒后重试。 |
| 502 | UPSTREAM_ERROR | 平台返回了无法使用的内容。请退避后重试。 |
全部错误代码见 Errors。失败的调用不计费。
价格
价格 每次调用 $0.001。标价;单日调用超过 1,000 次后单价下调。
说明
id为shop/handle(thedoodlebot.com/doodle-bot),与搜索或 catalog 条目中携带的完全一致。完整的商品 URL 也可以。currency指定店铺的货币(默认 USD)。响应会针对每个价格写明店铺实际收取的货币。