customerRewardsInfo
query
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
customer Access Token
Returns elements following the specified cursor. The
first argument must also be specified when using this argument.Returns elements preceding the specified cursor. The
last argument must also be specified when using this argument.Returns the first n elements in the list.
Returns the last n elements in the list.
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
Return
edges list
node list
Information to aid in pagination.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query the rewards information that a single customer has received
Code
query {
customerRewardsInfo(customerAccessToken: "#A01#SID0000107BFtXMBlyur1bUgz8HQ7Vi9lQOkT4kXELZOkxlc67dSOPxelgAPrqJh6ksFYHK2D59u9Rk87uTVEY06k4wsOtqd5qxpM8LQ8rcz9RkKQv3aSVwcBzDbhohwVN0sHHLP/3IhqZLhQEQ099BsUc/isnWOUFu9mufoeOIuJFADGqBLnqomPq6osfQsGev0VLZpD6Aw" first:20) {
edges{
cursor
node{
rewardScene
rewardType
couponUsageScope
redeemPointsValue
couponStatusDetail
rewardAcquireTime
rewardExpiryTime
usageLimits
autoStackLimit
benefitsUsageInstructionType
benefitsUsageInstructionValue
codeStackLimit
rewardSource
couponStatus
benefitsDetails
benefitsCode
}
}
pageInfo{
hasNextPage
hasPreviousPage
startCursor
endCursor
}
nodes{
rewardScene
rewardType
redeemPointsValue
couponUsageScope
rewardExpiryTime
rewardAcquireTime
couponStatusDetail
usageLimits
benefitsUsageInstructionType
benefitsUsageInstructionValue
autoStackLimit
codeStackLimit
couponStatus
rewardSource
benefitsDetails
benefitsCode
}
}
}
Response
{
"data": {
"customerRewardsInfo": {
"edges": [
{
"cursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"node": {
"benefitsCode": "D9D1BMWI88LP",
"benefitsUsageInstructionType": "NONE",
"benefitsUsageInstructionValue": null,
"couponUsageScope": "FOR_ALL",
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardScene": "LEVEL_UPGRADE",
"autoStackLimit": true,
"benefitsDetails": "1000",
"codeStackLimit": true,
"couponStatus": true,
"couponStatusDetail": "EXPIRED",
"rewardExpiryTime": null,
"usageLimits": 1,
"redeemPointsValue": 0,
"rewardSource": "MEMBERSHIP_BENEFITS",
"rewardType": "CASH_VOUCHER"
}
}
],
"nodes": [
{
"codeStackLimit": true,
"couponStatusDetail": "EXPIRED",
"rewardExpiryTime": null,
"usageLimits": 1,
"autoStackLimit": true,
"benefitsCode": "D9D1BMWI88LP",
"benefitsUsageInstructionValue": null,
"couponUsageScope": "FOR_ALL",
"redeemPointsValue": 0,
"rewardScene": "LEVEL_UPGRADE",
"rewardType": "CASH_VOUCHER",
"benefitsDetails": "1000",
"couponStatus": true,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardSource": "MEMBERSHIP_BENEFITS",
"benefitsUsageInstructionType": "NONE"
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
}
}
},
"extensions": {
"dataloader": {
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0
},
"individual-statistics": {
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"cacheHitRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0
}
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfStartTime": 1721890158000,
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/customerRewardsInfo",
"dfRt": 106,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@pageRewardRecord"
}
],
"graphQLMetrics": {
"loaderCount": 0,
"countryCode": null,
"parseRt": 4,
"ratelimitRemaining": 1,
"startParseTimeMillis": 1721890157993,
"languageCode": null,
"storeId": "1641993455937",
"successType": "SUCCESS",
"operation": "QUERY",
"saleChannel": null,
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"endParseTimeMillis": 1721890157997,
"executionId": "07ea0cbc-dc0b-4495-b563-603981158e56",
"merchantId": "4200114610",
"ratelimitPermits": 1,
"tenant": "ec20",
"clientIp": "218.253.130.212",
"deepLevel": 4,
"namespace": "storefront",
"startTimeMillis": 1721890157993,
"version": "v20241201",
"customizedClientIp": "218.253.130.212",
"errorFieldsCount": 0,
"includeDeprecatedField": false,
"traceId": "e171127ac7d204fae7eaf1ae4cec377b",
"appId": "265337",
"fieldCount": 137,
"includeQuery": false,
"rt": 115,
"storePlus": false
}
},
"tracing": {
"endTime": "2024-07-25T06:49:18.108Z",
"execution": {
"resolvers": [
{
"duration": 107154505,
"fieldName": "customerRewardsInfo",
"parentType": "Query",
"path": [
"customerRewardsInfo"
],
"returnType": "CustomerRewardsInfoConnection",
"startOffset": 6403822
},
{
"returnType": "[CustomerRewardsInfoEdge!]",
"startOffset": 113725229,
"duration": 7506,
"fieldName": "edges",
"parentType": "CustomerRewardsInfoConnection",
"path": [
"customerRewardsInfo",
"edges"
]
},
{
"duration": 2995,
"fieldName": "cursor",
"parentType": "CustomerRewardsInfoEdge",
"path": [
"customerRewardsInfo",
"edges",
0,
"cursor"
],
"returnType": "String!",
"startOffset": 113765465
},
{
"returnType": "RewardInfo",
"startOffset": 113816944,
"duration": 2408,
"fieldName": "node",
"parentType": "CustomerRewardsInfoEdge",
"path": [
"customerRewardsInfo",
"edges",
0,
"node"
]
},
{
"duration": 2408,
"fieldName": "rewardScene",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardScene"
],
"returnType": "RewardScene",
"startOffset": 113839318
},
{
"startOffset": 113856264,
"duration": 1927,
"fieldName": "rewardType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardType"
],
"returnType": "RewardType"
},
{
"duration": 1932,
"fieldName": "couponUsageScope",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 113869252
},
{
"fieldName": "redeemPointsValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 113881602,
"duration": 1992
},
{
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatusDetail"
],
"returnType": "couponStatusDetail",
"startOffset": 113894064,
"duration": 1827
},
{
"duration": 2358,
"fieldName": "rewardAcquireTime",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardAcquireTime"
],
"returnType": "Date",
"startOffset": 113906961
},
{
"duration": 2146,
"fieldName": "rewardExpiryTime",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardExpiryTime"
],
"returnType": "Date",
"startOffset": 113950130
},
{
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"usageLimits"
],
"returnType": "Int",
"startOffset": 113963118,
"duration": 1982,
"fieldName": "usageLimits",
"parentType": "RewardInfo"
},
{
"fieldName": "autoStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"autoStackLimit"
],
"returnType": "Boolean",
"startOffset": 113975452,
"duration": 1899
},
{
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType",
"startOffset": 113988871,
"duration": 2102,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo"
},
{
"duration": 1946,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114002917
},
{
"returnType": "Boolean",
"startOffset": 114016413,
"duration": 1921,
"fieldName": "codeStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"codeStackLimit"
]
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardSource"
],
"returnType": "RewardSource",
"startOffset": 114028527,
"duration": 2097,
"fieldName": "rewardSource"
},
{
"duration": 1869,
"fieldName": "couponStatus",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatus"
],
"returnType": "Boolean",
"startOffset": 114041223
},
{
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsDetails"
],
"returnType": "String",
"startOffset": 114053060,
"duration": 1886,
"fieldName": "benefitsDetails",
"parentType": "RewardInfo"
},
{
"duration": 2019,
"fieldName": "benefitsCode",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsCode"
],
"returnType": "String",
"startOffset": 114064840
},
{
"duration": 2480,
"fieldName": "pageInfo",
"parentType": "CustomerRewardsInfoConnection",
"path": [
"customerRewardsInfo",
"pageInfo"
],
"returnType": "PageInfo!",
"startOffset": 114121545
},
{
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasNextPage"
],
"returnType": "Boolean!",
"startOffset": 114140068,
"duration": 1994,
"fieldName": "hasNextPage"
},
{
"fieldName": "hasPreviousPage",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasPreviousPage"
],
"returnType": "Boolean!",
"startOffset": 114153060,
"duration": 1753
},
{
"duration": 1944,
"fieldName": "startCursor",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"startCursor"
],
"returnType": "String",
"startOffset": 114165175
},
{
"startOffset": 114177300,
"duration": 1739,
"fieldName": "endCursor",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"endCursor"
],
"returnType": "String"
},
{
"duration": 2161,
"fieldName": "nodes",
"parentType": "CustomerRewardsInfoConnection",
"path": [
"customerRewardsInfo",
"nodes"
],
"returnType": "[RewardInfo]",
"startOffset": 114227873
},
{
"duration": 2072,
"fieldName": "rewardScene",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardScene"
],
"returnType": "RewardScene",
"startOffset": 114253495
},
{
"duration": 2031,
"fieldName": "rewardType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardType"
],
"returnType": "RewardType",
"startOffset": 114266579
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 114279099,
"duration": 1906,
"fieldName": "redeemPointsValue"
},
{
"fieldName": "couponUsageScope",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 114291039,
"duration": 1832
},
{
"duration": 1940,
"fieldName": "rewardExpiryTime",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardExpiryTime"
],
"returnType": "Date",
"startOffset": 114302971
},
{
"duration": 2011,
"fieldName": "rewardAcquireTime",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardAcquireTime"
],
"returnType": "Date",
"startOffset": 114315078
},
{
"returnType": "couponStatusDetail",
"startOffset": 114334792,
"duration": 1954,
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatusDetail"
]
},
{
"returnType": "Int",
"startOffset": 114347031,
"duration": 1889,
"fieldName": "usageLimits",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"usageLimits"
]
},
{
"startOffset": 114359004,
"duration": 1973,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType"
},
{
"duration": 1928,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114371493
},
{
"startOffset": 114383353,
"duration": 2160,
"fieldName": "autoStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"autoStackLimit"
],
"returnType": "Boolean"
},
{
"fieldName": "codeStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"codeStackLimit"
],
"returnType": "Boolean",
"startOffset": 114395770,
"duration": 2806
},
{
"returnType": "Boolean",
"startOffset": 114408619,
"duration": 2105,
"fieldName": "couponStatus",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatus"
]
},
{
"startOffset": 114420613,
"duration": 1765,
"fieldName": "rewardSource",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardSource"
],
"returnType": "RewardSource"
},
{
"duration": 1979,
"fieldName": "benefitsDetails",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsDetails"
],
"returnType": "String",
"startOffset": 114432549
},
{
"duration": 1891,
"fieldName": "benefitsCode",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsCode"
],
"returnType": "String",
"startOffset": 114444443
}
]
},
"parsing": {
"duration": 3809165,
"startOffset": 3847367
},
"startTime": "2024-07-25T06:49:17.993Z",
"validation": {
"startOffset": 4708407,
"duration": 642230
},
"version": 1,
"duration": 114503748
}
}
}
Was this article helpful to you?