接口访问需要令牌,具体如何获取令牌参考:身份认证
查询单个客户的积分信息,包括店铺内积分名称和该客户剩余可用积分数。
Arguments
customerId ● String
客户ID
Return
historyEarned ● UnsignedInt64
该客户历史累计获得积分总数
historyRedeemed ● UnsignedInt64
该客户历史累计使用积分总数
pointName ● String
积分名称
pointsBalance ● UnsignedInt64
剩余可用积分数
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询积分信息
query {
pointsInfo(customerId: "gid://shopline/Customer/4602226680") {
historyEarned
pointsBalance
pointName
historyRedeemed
}
}
Response
{
"data": {
"pointsInfo": {
"historyEarned": "234",
"historyRedeemed": "134",
"pointName": "Points",
"pointsBalance": "100"
}
}
}
这篇文章对你有帮助吗?