批量查询商品
GET https://{handle}.myshopline.com/admin/openapi/v20220901/products/products.json
handle
:店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com
的店铺,其 handle
是 open001
。批量查询商品基本信息
查询参数
- brand string商品品牌Example:
Shopline
- collection_id string商品分类IDExample:
12248721639068681442230282
- created_at_max string创建时间在XXX前(格式见IOS8601)Example:
2021-09-02T14:11:54+00:00
- created_at_min string创建时间从XXX起(格式见IOS8601)Example:
2021-09-02T14:11:54+00:00
- fields string一级属性,逗号分隔Example:
title,id,created_at
- handle string全局唯一的商品handle, 在使用批量查询商品接口时,准确传入此参数等同于查询单个商品Example:
product-handle
- ids string指定的Id对象,多个用","分隔Example:
16057850264845250791280282,16057850264845250333280282
- limit integer查询数量限制,默认50,不能超过250Example:
100
- order_by string排序方式,created_at_asc:创建时间从远到近,created_at_desc:创建时间从近到远Example:
created_at_desc
- page_info string分页信息Example:
eyJzaW5jZUlkIjoiMTYwNTc4NTY3NjcxMTc3MDcyNTEwNjAyODIiLCJkaXJlY3Rpb24iOiJuZXh0Iiwic29ydFR5cGUiOiJjcmVh
- product_category string产品类型Example:
电子产品
- since_id string返回某个ID“之后”的对象Example:
16057850264845250791280282
- status string商品状态;active-上架,draft-下架,archived-归档Example:
active
- title string商品标题,不分词、不模糊查询Example:
这是商品标题
- updated_at_max string更新时间在XXX前(格式见IOS8601)Example:
2021-09-02T14:11:54+00:00
- updated_at_min string更新时间从XXX起(格式见IOS8601)Example:
2021-09-02T14:11:54+00:00
请求头
- Content-Type required字段值固定为
application/json; charset=utf-8
- Authorization string required资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
- 200
- 401
- 429
更多状态码信息请参考 HTTP 状态码
响应头
link
查询跳转页traceId
traceId
响应体
productsobject[]
商品body_html string商品描述Example:这是商品描述
brand string品牌Example:Shopline
created_at string创建时间(格式见IOS8601)Example:2021-09-03T14:11:54+00:00
handle string商品handleExample:product-handle
id string商品idExample:16057850264845250791280282
imageobject
第一张主图alt stringaltExample:这是图片ALT
src stringsrcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
imagesobject[]
主图列表alt stringaltExample:这是图片ALT
src stringsrcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
optionsobject[]
属性列表id string商品属性的IDExample:16158068291703878544960282
name string属性名称Example:Color
product_id string对应的商品IDExample:16057850264845250791280282
values array属性值列表Example:[Red]
values_images map属性值图Example:[object Object]
product_behavior string商品的行为Example:RISK,HIDDEN
product_category string产品类型Example:电子产品
product_type string商品类型:NORMAL-正常商品,POD_TEMPORARY-POD临时商品,TEMPORARY-临时商品Example:NORMAL
published_at string发布时间Example:2021-09-02T14:11:54+00:00
published_scope string设置发布范围,值为「web」时表示在线商店Example:web
status string商品状态;active-上架,draft-下架,archived-归档Example:active
subtitle string摘要Example:这是商品副标题
tags string标签,逗号分隔Example:tag1,tag2
template_path string主题模板Example:templates/products/detail.json
title string标题Example:这是商品标题
updated_at string更新时间(格式见IOS8601)Example:2021-09-02T14:11:54+00:00
variantsobject[]
款式列表barcode string条形码Example:T0000001
compare_at_price string原价Example:99
id string款式IDExample:18057850264851626133510282
imageobject
图片alt stringaltExample:这是图片ALT
src stringsrcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
inventory_item_id string库存对象IDExample:5785060242375689228
inventory_policy string超卖策略,continue:允许,deny:不允许Example:deny
inventory_quantity integer库存数Example:99
inventory_tracker boolean是否追踪库存Example:true
option1 string属性值1Example:Red
option2 string属性值2Example:L
option3 string属性值3option4 string属性值4option5 string属性值5position integer款式的位置权重Example:1
price string销售价Example:90
product_id string对应的商品IDExample:16057850264845250791280282
required_shipping boolean是否需要发货Example:true
sku stringSKU码Example:S000000001
taxable boolean是否需要收税Example:true
title string款式标题Example:Red/L
weight string重量Example:0.2
weight_unit string重量单位, g:克,kg:千克,lb:磅,oz:盎司,zh_kg:公斤Example:kg
API Explorer
调试台
这篇文章对你有帮助吗?
Error loading component.