开放 API
使用说明
获取授权
全部 API
- Shop
- Metafields
- Customer
- CustomerAddress
- Account
- Product
- ProductVariant
- ProductImage
- Theme
- Asset
- Country
- Province
- City
- District
- ScriptTag
- Order
- Shipment
- ShipmentSupplier
- Payment
- PaymentMethod
- Redirect
- Page
- Webhook
- Blog
- BlogAuthor
- CustomerLevel
- StoreFile
- Promotion
- Coupon
- Post
- AfterSale
Theme
Theme 属性
- id
Number 类型,Theme 的唯一整型标识。{ "id" : 1480 }
- created_at
Datetime 类型,Theme 的创建时间。{ "created_at" : "2014-02-15T15:12:21+08:00" }
- updated_at
Datetime 类型,Theme 的上一次更新时间。{ "updated_at" : "2014-02-15T15:12:21+08:00" }
- expired_at
Datetime 类型,Theme 的过期时间。{ "expired_at" : "2014-02-15T15:12:21+08:00" }
- mobile_support
Bool 类型, Theme 是否为移动端主题标志,true 移动端主题,false 非移动端主题{ "mobile_support" : false }
- role
String 类型,Theme 当前使用状态{ "role" : unpublish}
- unpublish :未使用
- public :通用展示主题
- mobile :移动端展示主题
- name
String 类型,Theme的名称。{ "name" : "海松" }
- type
String 类型,Theme 的类型{ "type" : "free"}
- free :免费主题
- monthly :按月付费主题
- forever :永久使用付费主题
- try :试用付费主题
- private :定制的主题
- processing
Bool 类型,Theme 的处理状态,false 当前未在处理,true 当前主题正在安装,重置,升级,定制其中一种。{ "processing" : false }
Theme 相关API
GET /themes
获取店铺所有 Theme
- fields
- 需要查询的字段
- 获取店铺所有 Theme
- GET /themes
{ "themes": [ { "id": 1479, "name": "萱草", "created_at": "2015-03-27T14:56:44.198+08:00", "updated_at": "2015-03-27T14:56:45.903+08:00", "expired_at": null, "mobile_support": false, "role": "public", "type": "private", "processing": false }, { "id": 1482, "name": "123", "created_at": "2015-03-30T11:51:57.771+08:00", "updated_at": "2015-03-31T16:52:53.133+08:00", "expired_at": null, "mobile_support": false, "role": "unpublish", "type": "free", "processing": false }, { "id": 1481, "name": "莺茶", "created_at": "2015-03-30T11:51:48.526+08:00", "updated_at": "2015-03-31T16:49:24.287+08:00", "expired_at": null, "mobile_support": false, "role": "unpublish", "type": "free", "processing": false }, { "id": 1441, "name": "小豆", "created_at": "2015-03-03T10:48:18.319+08:00", "updated_at": "2015-03-03T10:48:18.319+08:00", "expired_at": null, "mobile_support": true, "role": "unpublish", "type": "free", "processing": false } ] }
GET /themes/#{id}
获取店铺单个 Theme
- fields
- 需要查询的字段
- 获取店铺单个 Theme
- GET /themes/1482
{ "theme": { "id": 1482, "name": "123", "created_at": "2015-03-30T11:51:57.771+08:00", "updated_at": "2015-03-31T16:52:53.133+08:00", "expired_at": null, "mobile_support": false, "role": "unpublish", "type": "free", "processing": false } }
PUT /themes/#{id}
更新店铺单个 Theme
- name
- 新的主题名
- role
- public - 将主题设置为店铺使用的通用主题
- mobile - 将主题设置为店铺使用的手机主题
- unpublish - 取消店铺应用中的手机主题,当前主题必须为正在使用的手机主题
- 更新 Theme 名称
- PUT /themes/1482
{ "theme": { "name": "修改主题名" } }
{ "theme": { "id": 1482, "name": "修改主题名", "created_at": "2015-03-30T11:51:57.771+08:00", "updated_at": "2015-03-31T18:24:16.643+08:00", "expired_at": null, "mobile_support": false, "role": "unpublish", "type": "free", "processing": false } }
DELETE /themes/#{id}
删除店铺 Theme
- 删除 Theme
- DELETE /themes/1427
{}