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
Gets the elements after the specified cursor.
Gets the elements before the specified cursor.
Return first N elements from the list
Return last N elements from the list
Reverse the sequence of the base list.
Returns
edges list
node list
Information to aid in pagination.
Error Code
For more information about common error codes, refer to 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": {
"autoStackLimit": true,
"benefitsCode": "D9D1BMWI88LP",
"benefitsDetails": "1000",
"benefitsUsageInstructionType": "NONE",
"benefitsUsageInstructionValue": null,
"codeStackLimit": true,
"couponStatus": true,
"couponStatusDetail": "EXPIRED",
"couponUsageScope": "FOR_ALL",
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardExpiryTime": null,
"rewardScene": "LEVEL_UPGRADE",
"rewardSource": "MEMBERSHIP_BENEFITS",
"rewardType": "CASH_VOUCHER",
"usageLimits": 1
}
}
],
"nodes": [
{
"autoStackLimit": true,
"benefitsCode": "D9D1BMWI88LP",
"benefitsDetails": "1000",
"benefitsUsageInstructionType": "NONE",
"benefitsUsageInstructionValue": null,
"codeStackLimit": true,
"couponStatus": true,
"couponStatusDetail": "EXPIRED",
"couponUsageScope": "FOR_ALL",
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardExpiryTime": null,
"rewardScene": "LEVEL_UPGRADE",
"rewardSource": "MEMBERSHIP_BENEFITS",
"rewardType": "CASH_VOUCHER",
"usageLimits": 1
}
],
"pageInfo": {
"endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
}
}
},
"extensions": {
"dataloader": {
"individual-statistics": {
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/customerRewardsInfo",
"dfRt": 106,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@pageRewardRecord",
"dfStartTime": 1721890158000
}
],
"graphQLMetrics": {
"appId": "265337",
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"clientIp": "218.253.130.212",
"countryCode": null,
"customizedClientIp": "218.253.130.212",
"deepLevel": 4,
"endParseTimeMillis": 1721890157997,
"errorFieldsCount": 0,
"executionId": "07ea0cbc-dc0b-4495-b563-603981158e56",
"fieldCount": 137,
"includeDeprecatedField": false,
"includeQuery": false,
"languageCode": null,
"loaderCount": 0,
"merchantId": "4200114610",
"namespace": "storefront",
"operation": "QUERY",
"parseRt": 4,
"ratelimitPermits": 1,
"ratelimitRemaining": 1,
"rt": 115,
"saleChannel": null,
"startParseTimeMillis": 1721890157993,
"startTimeMillis": 1721890157993,
"storeId": "1641993455937",
"storePlus": false,
"successType": "SUCCESS",
"tenant": "ec20",
"traceId": "e171127ac7d204fae7eaf1ae4cec377b",
"version": "v20241201"
}
},
"tracing": {
"duration": 114503748,
"endTime": "2024-07-25T06:49:18.108Z",
"execution": {
"resolvers": [
{
"duration": 107154505,
"fieldName": "customerRewardsInfo",
"parentType": "Query",
"path": [
"customerRewardsInfo"
],
"returnType": "CustomerRewardsInfoConnection",
"startOffset": 6403822
},
{
"duration": 7506,
"fieldName": "edges",
"parentType": "CustomerRewardsInfoConnection",
"path": [
"customerRewardsInfo",
"edges"
],
"returnType": "[CustomerRewardsInfoEdge!]",
"startOffset": 113725229
},
{
"duration": 2995,
"fieldName": "cursor",
"parentType": "CustomerRewardsInfoEdge",
"path": [
"customerRewardsInfo",
"edges",
0,
"cursor"
],
"returnType": "String!",
"startOffset": 113765465
},
{
"duration": 2408,
"fieldName": "node",
"parentType": "CustomerRewardsInfoEdge",
"path": [
"customerRewardsInfo",
"edges",
0,
"node"
],
"returnType": "RewardInfo",
"startOffset": 113816944
},
{
"duration": 2408,
"fieldName": "rewardScene",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardScene"
],
"returnType": "RewardScene",
"startOffset": 113839318
},
{
"duration": 1927,
"fieldName": "rewardType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardType"
],
"returnType": "RewardType",
"startOffset": 113856264
},
{
"duration": 1932,
"fieldName": "couponUsageScope",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 113869252
},
{
"duration": 1992,
"fieldName": "redeemPointsValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 113881602
},
{
"duration": 1827,
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatusDetail"
],
"returnType": "couponStatusDetail",
"startOffset": 113894064
},
{
"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
},
{
"duration": 1982,
"fieldName": "usageLimits",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"usageLimits"
],
"returnType": "Int",
"startOffset": 113963118
},
{
"duration": 1899,
"fieldName": "autoStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"autoStackLimit"
],
"returnType": "Boolean",
"startOffset": 113975452
},
{
"duration": 2102,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType",
"startOffset": 113988871
},
{
"duration": 1946,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114002917
},
{
"duration": 1921,
"fieldName": "codeStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"codeStackLimit"
],
"returnType": "Boolean",
"startOffset": 114016413
},
{
"duration": 2097,
"fieldName": "rewardSource",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardSource"
],
"returnType": "RewardSource",
"startOffset": 114028527
},
{
"duration": 1869,
"fieldName": "couponStatus",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatus"
],
"returnType": "Boolean",
"startOffset": 114041223
},
{
"duration": 1886,
"fieldName": "benefitsDetails",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsDetails"
],
"returnType": "String",
"startOffset": 114053060
},
{
"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
},
{
"duration": 1994,
"fieldName": "hasNextPage",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasNextPage"
],
"returnType": "Boolean!",
"startOffset": 114140068
},
{
"duration": 1753,
"fieldName": "hasPreviousPage",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasPreviousPage"
],
"returnType": "Boolean!",
"startOffset": 114153060
},
{
"duration": 1944,
"fieldName": "startCursor",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"startCursor"
],
"returnType": "String",
"startOffset": 114165175
},
{
"duration": 1739,
"fieldName": "endCursor",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"endCursor"
],
"returnType": "String",
"startOffset": 114177300
},
{
"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
},
{
"duration": 1906,
"fieldName": "redeemPointsValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 114279099
},
{
"duration": 1832,
"fieldName": "couponUsageScope",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 114291039
},
{
"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
},
{
"duration": 1954,
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatusDetail"
],
"returnType": "couponStatusDetail",
"startOffset": 114334792
},
{
"duration": 1889,
"fieldName": "usageLimits",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"usageLimits"
],
"returnType": "Int",
"startOffset": 114347031
},
{
"duration": 1973,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType",
"startOffset": 114359004
},
{
"duration": 1928,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114371493
},
{
"duration": 2160,
"fieldName": "autoStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"autoStackLimit"
],
"returnType": "Boolean",
"startOffset": 114383353
},
{
"duration": 2806,
"fieldName": "codeStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"codeStackLimit"
],
"returnType": "Boolean",
"startOffset": 114395770
},
{
"duration": 2105,
"fieldName": "couponStatus",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatus"
],
"returnType": "Boolean",
"startOffset": 114408619
},
{
"duration": 1765,
"fieldName": "rewardSource",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardSource"
],
"returnType": "RewardSource",
"startOffset": 114420613
},
{
"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": {
"duration": 642230,
"startOffset": 4708407
},
"version": 1
}
}
}
Was this article helpful to you?