接口访问需要令牌,具体如何获取令牌请参考:身份认证
查询店铺内当前使用的会员机制中,所有已创建的会员等级和付费类型,及对应的升级门槛、有效期等。
Return
levelCode ● String
等级会员编码
levelIcon ● String
等级 icon
levelName ● String
等级名称。最多25个字符
levelOrder ● Int
仅当 membershipType = LEVEL 时有意义,此时levelOrder越大,等级越高级
levelThreshold ● UnsignedInt64
当 membershipType = LEVEL 时,该等级会员的门槛金额
lockinRule ● UnsignedInt64
当 membershipType = LEVEL 时,该等级会员的保级金额
lockinStandard ● LockinStandard
当 membershipType = LEVEL 时,该等级会员的保级类型。
More
membershipType ● MembershipType
店铺当前使用的会员机制
More
paidExpiryDateType ● PaidExpiryDateType
付费会员有效时间单位类型
More
paidExpiryDateValue ● Int
付费会员有效时间值
paidPrice ● UnsignedInt64
当 membershipType = PAID 时,该付费会员的价格
upgradeStandard ● UpgradeStandard
当 membershipType = LEVEL 时,该等级会员的门槛类型。
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询店铺内会员等级
query {
storeMembershipType {
levelCode
levelName
membershipType
levelOrder
levelIcon
upgradeStandard
levelThreshold
lockinStandard
lockinRule
paidPrice
paidExpiryDateType
paidExpiryDateValue
}
}
Response
{
"extensions": {
"dataloader": {
"overall-statistics": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0
},
"individual-statistics": {
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0
},
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0
}
}
},
"metrics": {
"graphQLMetrics": {
"storeId": "1641993455937",
"countryCode": null,
"endParseTimeMillis": 1721885233741,
"includeQuery": false,
"ratelimitPermits": 1,
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"fieldCount": 37,
"includeDeprecatedField": false,
"rt": 37,
"clientIp": "218.253.130.212",
"merchantId": "4200114610",
"executionId": "aa99b53e-5078-4838-bf59-916c8cf60b3c",
"loaderCount": 0,
"namespace": "storefront",
"parseRt": 0,
"successType": "SUCCESS",
"traceId": "0c2541d20ca30dff5ebc5e73fce8fd03",
"languageCode": null,
"appId": "265337",
"operation": "QUERY",
"startParseTimeMillis": 1721885233741,
"ratelimitRemaining": 1,
"saleChannel": null,
"version": "v20241201",
"customizedClientIp": "218.253.130.212",
"deepLevel": 2,
"errorFieldsCount": 0,
"startTimeMillis": 1721885233741,
"storePlus": false,
"tenant": "ec20"
},
"dataFetcherMetrics": [
{
"dfRootCoordinate": "/storeMembershipType",
"dfRt": 34,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@memberLevelDefQuery",
"dfStartTime": 1721885233743,
"dfErrorCode": null,
"dfProtocol": "dubbo"
}
]
},
"tracing": {
"parsing": {
"duration": 222110,
"startOffset": 259591
},
"startTime": "2024-07-25T05:27:13.741Z",
"validation": {
"duration": 337736,
"startOffset": 742958
},
"version": 1,
"duration": 37315334,
"endTime": "2024-07-25T05:27:13.778Z",
"execution": {
"resolvers": [
{
"startOffset": 2116095,
"duration": 34645731,
"fieldName": "storeMembershipType",
"parentType": "Query",
"path": [
"storeMembershipType"
],
"returnType": "[MemberLevel]"
},
{
"path": [
"storeMembershipType",
0,
"levelCode"
],
"returnType": "String",
"startOffset": 36882403,
"duration": 9165,
"fieldName": "levelCode",
"parentType": "MemberLevel"
},
{
"fieldName": "levelName",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelName"
],
"returnType": "String",
"startOffset": 36909048,
"duration": 2463
},
{
"path": [
"storeMembershipType",
0,
"membershipType"
],
"returnType": "MembershipType",
"startOffset": 36923891,
"duration": 2056,
"fieldName": "membershipType",
"parentType": "MemberLevel"
},
{
"path": [
"storeMembershipType",
0,
"levelOrder"
],
"returnType": "Int",
"startOffset": 36942069,
"duration": 2271,
"fieldName": "levelOrder",
"parentType": "MemberLevel"
},
{
"path": [
"storeMembershipType",
0,
"levelIcon"
],
"returnType": "String",
"startOffset": 36956386,
"duration": 1906,
"fieldName": "levelIcon",
"parentType": "MemberLevel"
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"upgradeStandard"
],
"returnType": "UpgradeStandard",
"startOffset": 36968786,
"duration": 1978,
"fieldName": "upgradeStandard"
},
{
"duration": 2157,
"fieldName": "levelThreshold",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelThreshold"
],
"returnType": "UnsignedInt64",
"startOffset": 36986598
},
{
"fieldName": "lockinStandard",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"lockinStandard"
],
"returnType": "LockinStandard",
"startOffset": 37004638,
"duration": 2146
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"lockinRule"
],
"returnType": "UnsignedInt64",
"startOffset": 37017901,
"duration": 1963,
"fieldName": "lockinRule"
},
{
"fieldName": "paidPrice",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidPrice"
],
"returnType": "UnsignedInt64",
"startOffset": 37030029,
"duration": 1981
},
{
"duration": 1832,
"fieldName": "paidExpiryDateType",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidExpiryDateType"
],
"returnType": "PaidExpiryDateType",
"startOffset": 37042503
},
{
"returnType": "Int",
"startOffset": 37054349,
"duration": 1934,
"fieldName": "paidExpiryDateValue",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidExpiryDateValue"
]
},
{
"startOffset": 37099093,
"duration": 2418,
"fieldName": "levelCode",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelCode"
],
"returnType": "String"
},
{
"duration": 1821,
"fieldName": "levelName",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelName"
],
"returnType": "String",
"startOffset": 37111633
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"membershipType"
],
"returnType": "MembershipType",
"startOffset": 37123159,
"duration": 2079,
"fieldName": "membershipType"
},
{
"startOffset": 37135414,
"duration": 2145,
"fieldName": "levelOrder",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelOrder"
],
"returnType": "Int"
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelIcon"
],
"returnType": "String",
"startOffset": 37147213,
"duration": 1991,
"fieldName": "levelIcon"
},
{
"path": [
"storeMembershipType",
1,
"upgradeStandard"
],
"returnType": "UpgradeStandard",
"startOffset": 37158676,
"duration": 1904,
"fieldName": "upgradeStandard",
"parentType": "MemberLevel"
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelThreshold"
],
"returnType": "UnsignedInt64",
"startOffset": 37170147,
"duration": 1985,
"fieldName": "levelThreshold"
},
{
"path": [
"storeMembershipType",
1,
"lockinStandard"
],
"returnType": "LockinStandard",
"startOffset": 37182430,
"duration": 2580,
"fieldName": "lockinStandard",
"parentType": "MemberLevel"
},
{
"duration": 1935,
"fieldName": "lockinRule",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"lockinRule"
],
"returnType": "UnsignedInt64",
"startOffset": 37194861
},
{
"duration": 1822,
"fieldName": "paidPrice",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"paidPrice"
],
"returnType": "UnsignedInt64",
"startOffset": 37206672
},
{
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"paidExpiryDateType"
],
"returnType": "PaidExpiryDateType",
"startOffset": 37218027,
"duration": 1937,
"fieldName": "paidExpiryDateType"
},
{
"path": [
"storeMembershipType",
1,
"paidExpiryDateValue"
],
"returnType": "Int",
"startOffset": 37229585,
"duration": 1877,
"fieldName": "paidExpiryDateValue",
"parentType": "MemberLevel"
}
]
}
}
},
"data": {
"storeMembershipType": [
{
"levelName": "membership_level_1",
"levelOrder": 1,
"lockinRule": "0",
"lockinStandard": "ACCUMULATED",
"membershipType": "LEVEL",
"paidExpiryDateValue": null,
"upgradeStandard": "ACCUMULATED",
"levelCode": "gid://shopline/Membership/MLC6568224957444662294",
"levelIcon": "LEVEL_2",
"levelThreshold": "10000",
"paidExpiryDateType": null,
"paidPrice": null
},
{
"lockinRule": "0",
"membershipType": "LEVEL",
"paidPrice": null,
"upgradeStandard": "ACCUMULATED",
"levelCode": "gid://shopline/Membership/MLC6568226048886449178",
"levelIcon": "LEVEL_3",
"levelName": "membership_level_2",
"levelOrder": 2,
"levelThreshold": "20000",
"lockinStandard": "ACCUMULATED",
"paidExpiryDateType": null,
"paidExpiryDateValue": null
}
]
}
}
这篇文章对你有帮助吗?