根据id查询智能分类属性
GET https://{handle}.myshopline.com/admin/openapi/v20260301/products/smart_collections/:smart_collection_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。根据分类ID查询智能分类
路径参数
- smart_collection_id string required智能分类IDExample:
12257170618007271602093384
查询参数
- fields string返回的字段,逗号分隔Example:
title,handle
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
smart_collectionobject
智能分类信息rulesobject[]
智能添加条件condition string条件Example:truecondition_object_id long元字段对象的IDExample:459302847relation string判断语句Example:equalscolumn string条件变量Example:product_metafield_definitionupdated_at string更新时间Example:2021-09-03T14:11:54+00:00title string分类的标题Example:This is a titlepath string在线商店中商品URL的相对路径,最多512个字符。Example:/collections/springtemplate_path string主题模板Example:templates/sortation/detail.jsonsort_order string排序方式,热销:best-selling,产品名称从A-Z:alpha-asc,产品名称从Z- A:alpha-desc,更新时间新→旧:updated-desc,更新时间旧→新:updated-asc,自定义:manualExample:updated-asccreated_at string创建时间Example:2021-09-03T14:11:54+00:00id string分类IDExample:12257170618007271602093384bannerobject
分类bannersrc stringsrc信息Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngalt stringalt信息Example:This is a image altbody_html string分类描述Example:This is a descriptiondisjunctive boolean智能分类框定商品的条件之间的关系,true:商品符合任意一个条件,即可被纳入该智能分类中;false:商品必须满足所有条件必须全符合,才可被纳入该智能分类中Example:truehandle string分类handleExample:collection-handlepublished_scope string设置发布范围,值为「web」时表示在线商店Example:webimageobject
分类图片alt string图片altExample:This is a image altsrc string图片srcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngpublished_at string发布到在线商店的时间Example:2021-09-03T14:11:54+00:00
API Explorer
调试台
示例代码
这篇文章对你有帮助吗?