开放 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
City
City
省份下的城市对象,通过API只可读,不可修改。
City 相关API
City 属性
- code
String 类型,城市编码。{ "code" : "230606" }
- name
String 类型,城市名称。{ "name" : "大庆" }
- full_name
String 类型,城市名称全称。{ "full_name" : "大庆市" }
GET /countries/#{country_id}/provinces/#{province_code}/cities
获取指定省份中的城市列表
- limit
- 可选,返回结果条数
默认10,最大50
- page
- 可选,显示的页码
默认1
- code
- 可选,指定城市编码
- name
- 可选,指定城市名称
- 获取黑龙江省所有城市
- GET /countries/1/provinces/230000/cities
{ "cities": [ { "code": "230600", "districts": [ ], "full_name": "大庆市", "name": "大庆" }, ] }
GET /countries/#{country_id}/provinces/#{province_code}/cities/count
获取指定省份中的城市总数
- 获取黑龙江省城市总数
- GET /countries/1/provinces/230000/cities/count
{ "count": 13 }
GET /countries/#{country_id}/provinces/#{province_code}/cities/#{code}
获取指定 Code 的城市内容
- 获取黑龙江省大庆市内容
- GET countries/1/provinces/230000/cities/230600
{ "city": { "code": "230600", "districts": [ ], "full_name": "大庆市", "name": "大庆" } }