Add customer information
POST https://{handle}.myshopline.com/admin/openapi/v20230301/customers.json
handle
: The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com
, the store handle is open001
.add customer
Request Headers
- Content-Type requiredThe value of this field is fixed to
application/json; charset=utf-8
- Authorization string requiredThe access token for the API. Please refer to App authorization to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
customerobject
Customer informationaccepts_marketing booleanSubscription to the mailbox , user mailbox required when modifying the subscription statusExample:true
addressesobject[]
Number of customer address lists limited to : 50address1 stringAddress 1 length limited to : 255 requiredExample:7720 Cherokee Road
address2 stringAddress 2 length limited to : 255Example:Apartment 2
city stringCity length limited to : 64Example:Hagerman
company stringCompany length limited to : 255Example:Joy
country stringCountry length limited to : 64Example:United States
country_code stringNational code length limited to : 50Example:US
country_name stringUser's standardized country nameExample:United States
default booleanDefault address or notExample:true
first_name stringFirst Name length limited to : 128Example:Bob
last_name stringLast Name length limited to : 128Example:Norman
name stringUser nicknameExample:NormanBob
phone stringPhone number length limited to : 16Example:008615834564475
province stringLength saving limited to : 64Example:Kentucky
province_code stringProvincial code length limited to : 50Example:KY
zip stringZip code length limited to : 10Example:40202
birthday stringUser birthday , format yyyyMMddExample:19970102
email stringMailbox length limited to : 50Example:123@qq.com
first_name stringFirst Name Length Limit: 128Example:Bob
gender integerGender , 0 : unknown / not set , 1 : male , 2 : female , 3 : confidential / not openlast_name stringLast Name length limited to : 128Example:Norman
note stringMemo length limited to : 1000Example:Placed an order that had a fraud warning
phone stringPhone number length limited to : 20Example:008615834564475
tags stringTag, Different tags are separated by commas. A single tag is limited to 100 characters, the number of tags is limited to 100, and the total length of this field is limited to 1000 charactersExample:loyal
Response
- 200
- 401
- 422
- 429
For more information about status codes, see Http status code.
Response Headers
traceId
traceId
Response Body
customerobject
Customer informationaccepts_marketing booleanMail subscription or notExample:true
accepts_marketing_updated_at stringEmail subscription time (see IOS8601 for the format)Example:2022-05-31T15:32:46+08:00
accepts_mobile_marketing booleanAccept telemarketing or notExample:true
accepts_mobile_marketing_updated_at stringTelephone subscription time (see IOS8601 for the format)Example:2022-05-31T15:32:46+08:00
addressesobject[]
Customer address listaddress1 stringAddress 1Example:7720 Cherokee Road
address2 stringAddress 2Example:Apartment 2
city stringCityExample:Hagerman
company stringCompanyExample:Joy
country stringCountryExample:United States
country_code stringCountry codeExample:US
customer_id stringcustomer idExample:4201825054
default booleanDefault address or notExample:true
first_name stringNameExample:Bob
id stringAddress IDExample:207119551
last_name stringLast nameExample:Norman
phone stringTelephone numberExample:008615834564475
province stringSaveExample:Kentucky
province_code stringProvincial encodingExample:KY
zip stringZip codeasid stringFB login IDbirthday stringCustomer birthday Format: YYYYMMDDcreated_at stringCreation time (see IOS8601 for the format)currency stringCurrencyExample:USD
default_addressobject
Default addressaddress1 stringAddress 1Example:7720 Cherokee Road
address2 stringAddress 2Example:Apartment 2
city stringCityExample:Hagerman
company stringCompanyExample:Joy
country stringCountryExample:United States
country_code stringCountry codeExample:US
customer_id stringcustomer idExample:4201825054
default booleanDefault address or notExample:true
first_name stringnameExample:Bob
id stringAddress IDExample:207119551
last_name stringLast nameExample:Norman
phone stringTelephone numberExample:008615834564475
province stringProvinceExample:Kentucky
province_code stringProvincial encodingExample:KY
zip stringZip codeExample:40202
email stringMailboxExample:123@qq.com
email_subscribe_flag integerMailbox subscription status 0 : cancelled subscription , 1 : already available , 2 : not availableExample:1
first_name stringNameExample:Bob
gender stringGender : male / female / others/secretExample:female
id stringExample:4201825054
language stringCustomer languageExample:en
last_name stringLast nameExample:Norman
last_order_id stringRecent order numberExample:2005473211984312275741
mobile_subscribe_flag integerMobile phone subscription status 0 : cancelled subscription , 1 : already available , 2 : not availablenote stringCustomer notesExample:Placed an order that had a fraud warning
orders_count longOrder quantityExample:12
phone stringPhone numberExample:008615834564475
social_customer arraySocial media user IDExample:[6612273988815231]
state integerCustomer status [ 0 : disabled account , 1 : to enable account , 2 : invited account , 3 : valid account ]Example:2
tags stringCustomer tagExample:loyal
total_spent stringTotal cost amountExample:100
updated_at stringUpdate time (see IOS8601 for the format)Example:2022-09-07T10:53:31+08:00
verified_email booleanVerify if e-mail or not
API Explorer
Debugger
Examples
Was this article helpful to you?
Error loading component.