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