An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query the rewards information that a single customer has received, including the number of remaining available rewards and reward applicability and restriction detail.
Arguments
after ● String
Returns elements following the specified cursor. The first argument must also be specified when using this argument.
before ● String
Returns elements preceding the specified cursor. The last argument must also be specified when using this argument.
first ● Int
Returns the first n elements in the list.
last ● Int
Returns the last n elements in the list.
reverse ● Boolean
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
customerId ● String!non-null
Gets the elements after the specified cursor.
Return
edges ● [CustomerRewardsInfoEdge!]non-null
edges list
More
pageInfo ● PageInfo!non-null
Information to aid in pagination.
More
nodes ● [Reward]
node list
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query the rewards information
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": {
"edges": [
{
"cursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"node": {
"benefitsUsageInstructionType": "NONE",
"codeStackLimit": true,
"couponStatus": true,
"couponUsageScope": "FOR_ALL",
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardScene": "LEVEL_UPGRADE",
"rewardSource": "MEMBERSHIP_BENEFITS",
"autoStackLimit": true,
"couponStatusDetail": "EXPIRED",
"redeemPointsValue": 0,
"rewardExpiryTime": null,
"rewardType": "CASH_VOUCHER",
"usageLimits": 1,
"benefitsDetails": "1000"
}
}
],
"nodes": [
{
"rewardType": "CASH_VOUCHER",
"benefitsDetails": "1000",
"codeStackLimit": true,
"couponStatusDetail": "EXPIRED",
"couponUsageScope": "FOR_ALL",
"rewardSource": "MEMBERSHIP_BENEFITS",
"usageLimits": 1,
"autoStackLimit": true,
"benefitsUsageInstructionType": "NONE",
"couponStatus": true,
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardExpiryTime": null,
"rewardScene": "LEVEL_UPGRADE"
}
],
"pageInfo": {
"endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 1401,
"throttleStatus": {
"currentlyAvailable": 48599,
"maximumAvailable": 50000,
"restoreRate": 50000
},
"actualQueryCost": 1401
}
}
}
Was this article helpful to you?