接口访问需要令牌,具体如何获取令牌请参考:身份认证
查询单个客户已获得的奖励信息,包括剩余可用奖励数和奖励适用和限制明细。
Arguments
reverse ● Boolean
是否反转列表的顺序。
● true:反转
● false:不反转
默认值:false
customerAccessToken ● String!non-null
客户访问令牌
after ● String
返回指定游标之后的元素。如果指定了该参数,也必须要指定 first 参数。
before ● String
返回指定游标之前的元素。如果指定了该参数,也必须要指定 last 参数。
first ● Int
返回列表中的前 n 个元素。
last ● Int
返回列表中的最后 n 个元素。
Return
edges ● [CustomerRewardsInfoEdge!]non-null
edges 列表
More
nodes ● [RewardInfo]
节点列表
More
pageInfo ● PageInfo!non-null
有助于分页的信息
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询客户已获得奖励信息
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": {
"couponStatus": true,
"benefitsUsageInstructionType": "NONE",
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardScene": "LEVEL_UPGRADE",
"usageLimits": 1,
"benefitsUsageInstructionValue": null,
"codeStackLimit": true,
"couponUsageScope": "FOR_ALL",
"rewardExpiryTime": null,
"rewardSource": "MEMBERSHIP_BENEFITS",
"autoStackLimit": true,
"benefitsCode": "D9D1BMWI88LP",
"benefitsDetails": "1000",
"couponStatusDetail": "EXPIRED",
"rewardType": "CASH_VOUCHER"
}
}
],
"nodes": [
{
"autoStackLimit": true,
"rewardSource": "MEMBERSHIP_BENEFITS",
"usageLimits": 1,
"couponStatusDetail": "EXPIRED",
"rewardType": "CASH_VOUCHER",
"benefitsCode": "D9D1BMWI88LP",
"benefitsUsageInstructionType": "NONE",
"codeStackLimit": true,
"redeemPointsValue": 0,
"rewardAcquireTime": "2024-07-25T05:17:32.578Z",
"rewardScene": "LEVEL_UPGRADE",
"benefitsDetails": "1000",
"benefitsUsageInstructionValue": null,
"couponStatus": true,
"couponUsageScope": "FOR_ALL",
"rewardExpiryTime": null
}
],
"pageInfo": {
"hasPreviousPage": false,
"startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
"hasNextPage": false
}
}
},
"extensions": {
"dataloader": {
"individual-statistics": {
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"cacheHitRatio": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"cacheHitCount": 0,
"loadCount": 0
},
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0
}
},
"overall-statistics": {
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/customerRewardsInfo",
"dfRt": 106,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@pageRewardRecord",
"dfStartTime": 1721890158000
}
],
"graphQLMetrics": {
"customizedClientIp": "218.253.130.212",
"loaderCount": 0,
"merchantId": "4200114610",
"executionId": "07ea0cbc-dc0b-4495-b563-603981158e56",
"deepLevel": 4,
"fieldCount": 137,
"namespace": "storefront",
"operation": "QUERY",
"startTimeMillis": 1721890157993,
"storePlus": false,
"errorFieldsCount": 0,
"languageCode": null,
"saleChannel": null,
"traceId": "e171127ac7d204fae7eaf1ae4cec377b",
"countryCode": null,
"includeQuery": false,
"ratelimitRemaining": 1,
"rt": 115,
"startParseTimeMillis": 1721890157993,
"storeId": "1641993455937",
"includeDeprecatedField": false,
"ratelimitPermits": 1,
"successType": "SUCCESS",
"tenant": "ec20",
"appId": "265337",
"parseRt": 4,
"version": "v20241201",
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"endParseTimeMillis": 1721890157997,
"clientIp": "218.253.130.212"
}
},
"tracing": {
"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
},
{
"fieldName": "node",
"parentType": "CustomerRewardsInfoEdge",
"path": [
"customerRewardsInfo",
"edges",
0,
"node"
],
"returnType": "RewardInfo",
"startOffset": 113816944,
"duration": 2408
},
{
"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
},
{
"fieldName": "couponUsageScope",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 113869252,
"duration": 1932
},
{
"fieldName": "redeemPointsValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 113881602,
"duration": 1992
},
{
"startOffset": 113894064,
"duration": 1827,
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatusDetail"
],
"returnType": "couponStatusDetail"
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardAcquireTime"
],
"returnType": "Date",
"startOffset": 113906961,
"duration": 2358,
"fieldName": "rewardAcquireTime"
},
{
"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
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"autoStackLimit"
],
"returnType": "Boolean",
"startOffset": 113975452,
"duration": 1899,
"fieldName": "autoStackLimit"
},
{
"returnType": "BenefitsUsageInstructionType",
"startOffset": 113988871,
"duration": 2102,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionType"
]
},
{
"duration": 1946,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114002917
},
{
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"codeStackLimit"
],
"returnType": "Boolean",
"startOffset": 114016413,
"duration": 1921,
"fieldName": "codeStackLimit",
"parentType": "RewardInfo"
},
{
"duration": 2097,
"fieldName": "rewardSource",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"rewardSource"
],
"returnType": "RewardSource",
"startOffset": 114028527
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"edges",
0,
"node",
"couponStatus"
],
"returnType": "Boolean",
"startOffset": 114041223,
"duration": 1869,
"fieldName": "couponStatus"
},
{
"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
},
{
"fieldName": "pageInfo",
"parentType": "CustomerRewardsInfoConnection",
"path": [
"customerRewardsInfo",
"pageInfo"
],
"returnType": "PageInfo!",
"startOffset": 114121545,
"duration": 2480
},
{
"duration": 1994,
"fieldName": "hasNextPage",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasNextPage"
],
"returnType": "Boolean!",
"startOffset": 114140068
},
{
"startOffset": 114153060,
"duration": 1753,
"fieldName": "hasPreviousPage",
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"hasPreviousPage"
],
"returnType": "Boolean!"
},
{
"parentType": "PageInfo",
"path": [
"customerRewardsInfo",
"pageInfo",
"startCursor"
],
"returnType": "String",
"startOffset": 114165175,
"duration": 1944,
"fieldName": "startCursor"
},
{
"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
},
{
"startOffset": 114266579,
"duration": 2031,
"fieldName": "rewardType",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardType"
],
"returnType": "RewardType"
},
{
"duration": 1906,
"fieldName": "redeemPointsValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"redeemPointsValue"
],
"returnType": "Int",
"startOffset": 114279099
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponUsageScope"
],
"returnType": "CouponUsageScope",
"startOffset": 114291039,
"duration": 1832,
"fieldName": "couponUsageScope"
},
{
"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
},
{
"startOffset": 114334792,
"duration": 1954,
"fieldName": "couponStatusDetail",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatusDetail"
],
"returnType": "couponStatusDetail"
},
{
"duration": 1889,
"fieldName": "usageLimits",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"usageLimits"
],
"returnType": "Int",
"startOffset": 114347031
},
{
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType",
"startOffset": 114359004,
"duration": 1973,
"fieldName": "benefitsUsageInstructionType",
"parentType": "RewardInfo"
},
{
"fieldName": "benefitsUsageInstructionValue",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 114371493,
"duration": 1928
},
{
"startOffset": 114383353,
"duration": 2160,
"fieldName": "autoStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"autoStackLimit"
],
"returnType": "Boolean"
},
{
"returnType": "Boolean",
"startOffset": 114395770,
"duration": 2806,
"fieldName": "codeStackLimit",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"codeStackLimit"
]
},
{
"duration": 2105,
"fieldName": "couponStatus",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"couponStatus"
],
"returnType": "Boolean",
"startOffset": 114408619
},
{
"startOffset": 114420613,
"duration": 1765,
"fieldName": "rewardSource",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"rewardSource"
],
"returnType": "RewardSource"
},
{
"fieldName": "benefitsDetails",
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsDetails"
],
"returnType": "String",
"startOffset": 114432549,
"duration": 1979
},
{
"parentType": "RewardInfo",
"path": [
"customerRewardsInfo",
"nodes",
0,
"benefitsCode"
],
"returnType": "String",
"startOffset": 114444443,
"duration": 1891,
"fieldName": "benefitsCode"
}
]
},
"parsing": {
"duration": 3809165,
"startOffset": 3847367
},
"startTime": "2024-07-25T06:49:17.993Z",
"validation": {
"duration": 642230,
"startOffset": 4708407
},
"version": 1,
"duration": 114503748
}
}
}
这篇文章对你有帮助吗?