customer
query
需要 read_customers 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证。
按ID返回客户信息
Arguments
要返回的客户的ID
Return
地址信息
总花费金额
能否被删除
创建时间
默认地址
全名
邮箱
邮箱订阅信息
名字
客户id
姓氏
客户加入店铺的时间,举例,例如 一天、一周、一年
语言
备注
订单数
手机号
短信订阅状态
客户状态
标签
客户的订单能免税标识,true:能免税,false:不能免税
客户免税列表
更新时间
邮箱地址校验,不保证邮箱地址真实性
邮箱是否验证
错误码
关于更多通用错误码说明,参考:状态码和错误码。
Example
查看客户详情
Code
query {
customer(id: "gid://shopline/Customer/4600419107") {
locale
id
state
firstName
lastName
email
phone
createdAt
updatedAt
note
verifiedEmail
tags
lifetimeDuration
validEmailAddress
amountSpent{
amount
currencyCode
}
taxExempt
taxExemptions{
countryCode
provinceGCodeList
}
numberOfOrders
lifetimeDuration
validEmailAddress
defaultAddress {
address1
address2
city
company
country
countryCodeV2
firstName
lastName
id
phone
province
provinceCode
zip
district
town
}
addresses {
address1
address2
city
company
country
countryCodeV2
firstName
lastName
id
phone
province
provinceCode
zip
district
town
}
canDelete
}
}
Response
{
"data": {
"customer": {
"canDelete": true,
"id": "gid://shopline/Customer/4600419107",
"lifetimeDuration": "14 days ago",
"state": "NOT_INVITED",
"tags": [
"test1"
],
"taxExemptions": [
{
"countryCode": "US",
"provinceGCodeList": [
"AK",
"AL"
]
}
],
"addresses": [
{
"address1": "Chestnut Street 92",
"district": "district",
"firstName": "S*****",
"lastName": "T*****",
"city": "Louisville",
"country": "United States",
"phone": "0086138****1234",
"province": "Kentucky",
"zip": "40202",
"address2": "Apartment 2",
"provinceCode": null,
"town": "Street",
"company": "C*****",
"countryCodeV2": "US",
"id": "gid://shopline/MailingAddress/SL201UA6266776363820652562"
}
],
"createdAt": "2023-12-29T13:38:06.534Z",
"defaultAddress": {
"district": "district",
"id": "gid://shopline/MailingAddress/SL201UA6266776363820652562",
"lastName": "T*****",
"phone": "0086138****1234",
"provinceCode": null,
"address1": "Chestnut Street 92",
"address2": "Apartment 2",
"province": "Kentucky",
"zip": "40202",
"country": "United States",
"town": "Street",
"city": "Louisville",
"company": "C*****",
"countryCodeV2": "US",
"firstName": "S*****"
},
"email": "*****@example.com",
"lastName": "T*****",
"numberOfOrders": 0,
"taxExempt": true,
"updatedAt": "2023-12-29T13:38:08.470Z",
"firstName": "S*****",
"locale": null,
"validEmailAddress": true,
"verifiedEmail": true,
"note": "Placed an order that had a fraud warning",
"phone": "0086138****1234",
"amountSpent": {
"amount": "0",
"currencyCode": "CLP"
}
}
}
}
这篇文章对你有帮助吗?