customerRewardsInfo
query
接口访问需要令牌,具体如何获取令牌参考:身份认证。
查询单个客户已获得的奖励信息,包括剩余可用奖励数和奖励适用和限制明细。
Example
查询客户已获得奖励信息
Code
query {
customerRewardsInfo(customerId: "gid://shopline/Customer/4602226680",first:200) {
edges{
cursor
node{
rewardScene
rewardType
redeemPointsValue
couponUsageScope
rewardExpiryTime
rewardAcquireTime
couponStatusDetail
usageLimits
benefitsUsageInstructionType
autoStackLimit
codeStackLimit
couponStatus
rewardSource
benefitsDetails
}
}
pageInfo{
hasNextPage
hasPreviousPage
endCursor
startCursor
}
nodes{
rewardScene
rewardType
redeemPointsValue
couponUsageScope
rewardExpiryTime
rewardAcquireTime
couponStatusDetail
usageLimits
benefitsUsageInstructionType
autoStackLimit
codeStackLimit
couponStatus
rewardSource
benefitsDetails
}
}
}
Response
{
"data": {
"customerRewardsInfo": {
"pageInfo": {
"endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
},
"edges": [
{
"node": {
"rewardSource": "MEMBERSHIP_BENEFITS",
"usageLimits": 1,
"benefitsDetails": "1000",
"benefitsUsageInstructionType": "NONE",
"couponStatus": true,
"rewardExpiryTime": null,
"rewardScene": "LEVEL_UPGRADE",
"rewardType": "CASH_VOUCHER",
"autoStackLimit": true,
"codeStackLimit": true,
"couponStatusDetail": "EXPIRED",
"couponUsageScope": "FOR_ALL",
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z"
},
"cursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
}
],
"nodes": [
{
"rewardExpiryTime": null,
"rewardType": "CASH_VOUCHER",
"benefitsUsageInstructionType": "NONE",
"couponStatusDetail": "EXPIRED",
"redeemPointsValue": 0,
"rewardScene": "LEVEL_UPGRADE",
"rewardSource": "MEMBERSHIP_BENEFITS",
"usageLimits": 1,
"autoStackLimit": true,
"benefitsDetails": "1000",
"codeStackLimit": true,
"couponStatus": true,
"couponUsageScope": "FOR_ALL",
"rewardAcquireTime": "2024-07-25T05:17:32.578Z"
}
]
}
},
"extensions": {
"cost": {
"actualQueryCost": 1401,
"requestedQueryCost": 1401,
"throttleStatus": {
"restoreRate": 50000,
"currentlyAvailable": 48599,
"maximumAvailable": 50000
}
}
}
}
这篇文章对你有帮助吗?