需要 write_customers 权限点。
更多权限点使用信息,请参考:
POST https://{handle}.myshopline.com/admin/openapi/v20250601/customers/:id/addresses.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
新增地址2.0
路径参数
  • id string required
    客户id
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • customer_addressobject required
    客户地址信息
  • address1 string
    详细地址 长度限制:255
    Example: 7720 Cherokee Road
  • address2 string
    详细地址2 长度限制:255
    Example: Apartment
  • address_type integer
    地址类型
  • city string
    城市名称 长度限制:64
    Example: Hagerman
  • city_code string
    城市编码 长度限制:50
    Example: NM
  • company string
    公司
    Example: Joyy
  • country string
    国家名称 长度限制:64
    Example: United States
  • country_code string
    国家编码 长度限制:50
    Example: US
  • def boolean
    默认地址
    Example: true
  • district string
    区/县 长度限制:64
    Example: dazhou
  • district_code string
    区/县编码 长度限制:50
    Example: DZ
  • first_name string
    联系人姓 长度限制:128
    Example: maybe
  • last_name string
    联系人名 长度限制:128
    Example: joho
  • phone string
    手机号
    Example: 001467326483
  • province string
    省/州名称 长度限制:64
    Example: Kentucky
  • province_code string
    省/州编码 长度限制:50
    Example: KY
  • town string
    街镇 长度限制:64
    Example: luosiji
  • zip string
    邮政编码 长度限制:10
    Example: 90091
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • customer_addressobject
    客户地址信息
  • address1 string
    详情地址1
    Example: 7720 Cherokee Road
  • address2 string
    详细地址2
    Example: Apartment
  • address_type integer
    地址类型
  • city string
    城市
    Example: Hagerman
  • city_code string
    城市code
    Example: NM
  • company string
    公司
    Example: Joyy
  • country string
    国家
    Example: United States
  • country_code string
    国家code
    Example: US
  • customer_id string
    用户id
    Example: 2277270272
  • def boolean
    默认地址
    Example: true
  • district string
    区/县
    Example: dazhou
  • district_code string
    区/县 code
    Example: DZ
  • first_name string
    Example: maybe
  • id string
    地址id
    Example: SL201UA5006511321220969539
  • last_name string
    Example: joho
  • phone string
    电话号码
    Example: 001467326483
  • province string
    省份
    Example: Kentucky
  • province_code string
    省份code
    Example: KY
  • town string
    街镇
    Example: luosiji
  • zip string
    邮编
    Example: 90091
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required

Body

required
{
  "customer_address": {
    "address1": "7720 Cherokee Road",
    "address2": "Apartment",
    "address_type": 0,
    "city": "Hagerman",
    "city_code": "NM",
    "company": "Joyy",
    "country": "United States",
    "country_code": "US",
    "def": true,
    "district": "dazhou",
    "district_code": "DZ",
    "first_name": "maybe",
    "last_name": "joho",
    "phone": "001467326483",
    "province": "Kentucky",
    "province_code": "KY",
    "town": "luosiji",
    "zip": "90091"
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/customers/id/addresses.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json' \
--data '
{
"customer_address": {
"address1": "7720 Cherokee Road",
"address2": "Apartment",
"address_type": 0,
"city": "Hagerman",
"city_code": "NM",
"company": "Joyy",
"country": "United States",
"country_code": "US",
"def": true,
"district": "dazhou",
"district_code": "DZ",
"first_name": "maybe",
"last_name": "joho",
"phone": "001467326483",
"province": "Kentucky",
"province_code": "KY",
"town": "luosiji",
"zip": "90091"
}
}
'
这篇文章对你有帮助吗?