接口访问需要令牌,具体如何获取令牌请参考:身份认证
查询单个等级或付费类型下的权益信息,包括剩余可用奖励数和奖励适用和限制明细。
Arguments
levelCode ● String!non-null
等级会员或付费会员编码
Return
benefitsInfo ● [BenefitsInfo]
会员等级下权益的基本信息
More
customPrivileges ● [CustomPrivilege]
会员等级下特殊权益的基本信息
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询单个会员等级下的权益
query {
benefitsOfMembership(levelCode:"gid://shopline/Membership/MLC6568224957444662294") {
benefitsInfo{
benefitsIssuranceType
benefitsDescription
benefitsUsageInstructionValue
specificDate
benefitsExpiryDateValue
fixedDate
birthBenefitsReleaseType
rewardType
benefitsExpiryDateType
periodicallyMonths
benefitsIcon
usageLimitsType
daysBefore
specificProductIds
periodicallyDays
benefitsUsageInstructionType
autoStackLimit
codeStackLimit
productsApplicableType
usageLimitsTimes
benefitsName
benefitsDetails
specificCategoryList
}
customPrivileges{
privilegeDescription
benefitsIcon
privilegeName
}
}
}
Response
{
"data": {
"benefitsOfMembership": {
"benefitsInfo": [
{
"benefitsExpiryDateType": null,
"benefitsIssuranceType": null,
"productsApplicableType": "ALL",
"specificCategoryList": null,
"benefitsName": null,
"benefitsUsageInstructionValue": "10000",
"fixedDate": null,
"specificProductIds": null,
"usageLimitsTimes": null,
"autoStackLimit": true,
"benefitsDetails": "1000",
"benefitsExpiryDateValue": null,
"benefitsIcon": null,
"birthBenefitsReleaseType": null,
"codeStackLimit": true,
"periodicallyDays": null,
"rewardType": "CASH_VOUCHER",
"benefitsUsageInstructionType": "MIN_PURCHASE_AMOUNT",
"daysBefore": null,
"periodicallyMonths": null,
"specificDate": null,
"usageLimitsType": "UNLIMITED",
"benefitsDescription": null
},
{
"usageLimitsTimes": null,
"benefitsDescription": null,
"benefitsExpiryDateType": null,
"benefitsIssuranceType": null,
"benefitsUsageInstructionType": null,
"periodicallyDays": null,
"specificCategoryList": null,
"specificDate": null,
"specificProductIds": null,
"autoStackLimit": false,
"daysBefore": null,
"fixedDate": null,
"usageLimitsType": "UNLIMITED",
"benefitsUsageInstructionValue": null,
"birthBenefitsReleaseType": null,
"periodicallyMonths": null,
"productsApplicableType": "ALL",
"rewardType": "POINTS",
"benefitsDetails": "10",
"benefitsExpiryDateValue": null,
"benefitsIcon": "BENEFIT_2",
"benefitsName": null,
"codeStackLimit": false
}
],
"customPrivileges": []
}
},
"extensions": {
"dataloader": {
"individual-statistics": {
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0
},
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchLoadRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"batchLoadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"overall-statistics": {
"batchLoadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfStartTime": 1721889875072,
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/benefitsOfMembership",
"dfRt": 262,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@memberLevelBenefitQuery"
}
],
"graphQLMetrics": {
"namespace": "storefront",
"rt": 266,
"traceId": "2bb5b97f7e800c984835b443cd18c91f",
"includeDeprecatedField": false,
"clientIp": "218.253.130.212",
"countryCode": null,
"deepLevel": 3,
"operation": "QUERY",
"tenant": "ec20",
"appId": "265337",
"endParseTimeMillis": 1721889875070,
"executionId": "71a04ad1-131a-4e98-84e4-4b06ddf2a1f0",
"includeQuery": false,
"loaderCount": 0,
"merchantId": "4200114610",
"storeId": "1641993455937",
"errorFieldsCount": 0,
"languageCode": null,
"ratelimitRemaining": 1,
"startParseTimeMillis": 1721889875069,
"startTimeMillis": 1721889875069,
"customizedClientIp": "218.253.130.212",
"ratelimitPermits": 1,
"storePlus": false,
"version": "v20241201",
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"parseRt": 1,
"successType": "SUCCESS",
"fieldCount": 103,
"saleChannel": null
}
},
"tracing": {
"execution": {
"resolvers": [
{
"startOffset": 2920412,
"duration": 262455674,
"fieldName": "benefitsOfMembership",
"parentType": "Query",
"path": [
"benefitsOfMembership"
],
"returnType": "Benefits"
},
{
"returnType": "[BenefitsInfo]",
"startOffset": 265541709,
"duration": 7495,
"fieldName": "benefitsInfo",
"parentType": "Benefits",
"path": [
"benefitsOfMembership",
"benefitsInfo"
]
},
{
"startOffset": 265586736,
"duration": 3336,
"fieldName": "benefitsIssuranceType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsIssuranceType"
],
"returnType": "BenefitsIssuranceType"
},
{
"duration": 2440,
"fieldName": "benefitsDescription",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsDescription"
],
"returnType": "String",
"startOffset": 265605946
},
{
"duration": 5274,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 265619641
},
{
"returnType": "String",
"startOffset": 265636304,
"duration": 2118,
"fieldName": "specificDate",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"specificDate"
]
},
{
"duration": 1831,
"fieldName": "benefitsExpiryDateValue",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsExpiryDateValue"
],
"returnType": "Int",
"startOffset": 265648955
},
{
"duration": 1976,
"fieldName": "fixedDate",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"fixedDate"
],
"returnType": "Int",
"startOffset": 265660888
},
{
"duration": 1884,
"fieldName": "birthBenefitsReleaseType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"birthBenefitsReleaseType"
],
"returnType": "BirthBenefitsReleaseType",
"startOffset": 265673314
},
{
"returnType": "RewardType",
"startOffset": 265686294,
"duration": 2016,
"fieldName": "rewardType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"rewardType"
]
},
{
"returnType": "BenefitsExpiryDateType",
"startOffset": 265700980,
"duration": 2284,
"fieldName": "benefitsExpiryDateType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsExpiryDateType"
]
},
{
"duration": 1807,
"fieldName": "periodicallyMonths",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"periodicallyMonths"
],
"returnType": "Int",
"startOffset": 265713123
},
{
"duration": 1896,
"fieldName": "benefitsIcon",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsIcon"
],
"returnType": "String",
"startOffset": 265724861
},
{
"duration": 1946,
"fieldName": "usageLimitsType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"usageLimitsType"
],
"returnType": "UsageLimitsType",
"startOffset": 265736681
},
{
"startOffset": 265749674,
"duration": 1977,
"fieldName": "daysBefore",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"daysBefore"
],
"returnType": "Int"
},
{
"duration": 1852,
"fieldName": "specificProductIds",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"specificProductIds"
],
"returnType": "String",
"startOffset": 265761353
},
{
"duration": 1819,
"fieldName": "periodicallyDays",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"periodicallyDays"
],
"returnType": "Int",
"startOffset": 265773064
},
{
"startOffset": 265784972,
"duration": 2191,
"fieldName": "benefitsUsageInstructionType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType"
},
{
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"autoStackLimit"
],
"returnType": "Boolean",
"startOffset": 265799375,
"duration": 2882,
"fieldName": "autoStackLimit"
},
{
"returnType": "Boolean",
"startOffset": 265817110,
"duration": 2818,
"fieldName": "codeStackLimit",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"codeStackLimit"
]
},
{
"fieldName": "productsApplicableType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"productsApplicableType"
],
"returnType": "ProductsApplicableType",
"startOffset": 265832390,
"duration": 2002
},
{
"fieldName": "usageLimitsTimes",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"usageLimitsTimes"
],
"returnType": "Int",
"startOffset": 265844998,
"duration": 1866
},
{
"duration": 2102,
"fieldName": "benefitsName",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsName"
],
"returnType": "String",
"startOffset": 265856761
},
{
"duration": 1949,
"fieldName": "benefitsDetails",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"benefitsDetails"
],
"returnType": "String",
"startOffset": 265868548
},
{
"duration": 1957,
"fieldName": "specificCategoryList",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
0,
"specificCategoryList"
],
"returnType": "[String]",
"startOffset": 265880674
},
{
"duration": 2025,
"fieldName": "benefitsIssuranceType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsIssuranceType"
],
"returnType": "BenefitsIssuranceType",
"startOffset": 265924227
},
{
"startOffset": 265936592,
"duration": 1972,
"fieldName": "benefitsDescription",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsDescription"
],
"returnType": "String"
},
{
"duration": 1806,
"fieldName": "benefitsUsageInstructionValue",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsUsageInstructionValue"
],
"returnType": "String",
"startOffset": 265948532
},
{
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"specificDate"
],
"returnType": "String",
"startOffset": 265965810,
"duration": 1953,
"fieldName": "specificDate"
},
{
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsExpiryDateValue"
],
"returnType": "Int",
"startOffset": 265977731,
"duration": 1837,
"fieldName": "benefitsExpiryDateValue",
"parentType": "BenefitsInfo"
},
{
"startOffset": 265989470,
"duration": 1776,
"fieldName": "fixedDate",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"fixedDate"
],
"returnType": "Int"
},
{
"returnType": "BirthBenefitsReleaseType",
"startOffset": 266001290,
"duration": 1806,
"fieldName": "birthBenefitsReleaseType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"birthBenefitsReleaseType"
]
},
{
"fieldName": "rewardType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"rewardType"
],
"returnType": "RewardType",
"startOffset": 266013018,
"duration": 1980
},
{
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsExpiryDateType"
],
"returnType": "BenefitsExpiryDateType",
"startOffset": 266030420,
"duration": 1828,
"fieldName": "benefitsExpiryDateType"
},
{
"startOffset": 266043360,
"duration": 1793,
"fieldName": "periodicallyMonths",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"periodicallyMonths"
],
"returnType": "Int"
},
{
"returnType": "String",
"startOffset": 266054948,
"duration": 2093,
"fieldName": "benefitsIcon",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsIcon"
]
},
{
"startOffset": 266067163,
"duration": 1934,
"fieldName": "usageLimitsType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"usageLimitsType"
],
"returnType": "UsageLimitsType"
},
{
"startOffset": 266079435,
"duration": 1800,
"fieldName": "daysBefore",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"daysBefore"
],
"returnType": "Int"
},
{
"startOffset": 266090847,
"duration": 1840,
"fieldName": "specificProductIds",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"specificProductIds"
],
"returnType": "String"
},
{
"duration": 1886,
"fieldName": "periodicallyDays",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"periodicallyDays"
],
"returnType": "Int",
"startOffset": 266102420
},
{
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsUsageInstructionType"
],
"returnType": "BenefitsUsageInstructionType",
"startOffset": 266118001,
"duration": 1970,
"fieldName": "benefitsUsageInstructionType",
"parentType": "BenefitsInfo"
},
{
"returnType": "Boolean",
"startOffset": 266129700,
"duration": 1839,
"fieldName": "autoStackLimit",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"autoStackLimit"
]
},
{
"startOffset": 266141609,
"duration": 2040,
"fieldName": "codeStackLimit",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"codeStackLimit"
],
"returnType": "Boolean"
},
{
"duration": 1924,
"fieldName": "productsApplicableType",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"productsApplicableType"
],
"returnType": "ProductsApplicableType",
"startOffset": 266153516
},
{
"duration": 1834,
"fieldName": "usageLimitsTimes",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"usageLimitsTimes"
],
"returnType": "Int",
"startOffset": 266165532
},
{
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsName"
],
"returnType": "String",
"startOffset": 266177159,
"duration": 1903,
"fieldName": "benefitsName"
},
{
"startOffset": 266188732,
"duration": 1991,
"fieldName": "benefitsDetails",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"benefitsDetails"
],
"returnType": "String"
},
{
"startOffset": 266200774,
"duration": 1845,
"fieldName": "specificCategoryList",
"parentType": "BenefitsInfo",
"path": [
"benefitsOfMembership",
"benefitsInfo",
1,
"specificCategoryList"
],
"returnType": "[String]"
},
{
"fieldName": "customPrivileges",
"parentType": "Benefits",
"path": [
"benefitsOfMembership",
"customPrivileges"
],
"returnType": "[CustomPrivilege]",
"startOffset": 266244282,
"duration": 2309
}
]
},
"parsing": {
"duration": 349229,
"startOffset": 383857
},
"startTime": "2024-07-25T06:44:35.069Z",
"validation": {
"startOffset": 1114339,
"duration": 486738
},
"version": 1,
"duration": 266325440,
"endTime": "2024-07-25T06:44:35.335Z"
}
}
}
这篇文章对你有帮助吗?