An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query the membership levels and paid membership types created in the membership mechanism currently used in the store, as well as the corresponding upgrade thresholds, validity periods, etc.
Returns
levelCode ● String
The code of level membership.
levelIcon ● String
The icon of the level.
levelName ● String
The name of level membership. Up to 25 characters.
levelOrder ● Int
Relevant only when membershipType = LEVEL. Higher the filed indicates a higher level.
levelThreshold ● UnsignedInt64
Threshold amount for the level when membershipType = LEVEL.
lockinRule ● UnsignedInt64
Lock-in amount for the level when membershipType = LEVEL.
lockinStandard ● LockinStandard
Lock-in type for the level when membershipType = LEVEL.
membershipType ● MembershipType
The current active membership mechanism of the store, and all levels below are in this type of mechanism.
paidExpiryDateType ● PaidExpiryDateType
Time unit of the paid membership validity.
paidExpiryDateValue ● Int
Time value of the paid membership validity.
paidPrice ● UnsignedInt64
Price for the paid membership when membershipType = PAID.
upgradeStandard ● UpgradeStandard
Threshold type for the level when membershipType = LEVEL.
Error Code
For more information about common error codes, refer to Status and error codes.
Example
query storeMembershipType
query {
storeMembershipType {
levelCode
levelName
membershipType
levelOrder
levelIcon
upgradeStandard
levelThreshold
lockinStandard
lockinRule
paidPrice
paidExpiryDateType
paidExpiryDateValue
}
}
Response
{
"data": {
"storeMembershipType": [
{
"levelCode": "gid://shopline/Membership/MLC6568224957444662294",
"levelIcon": "LEVEL_2",
"levelName": "membership_level_1",
"levelOrder": 1,
"levelThreshold": "10000",
"lockinRule": "0",
"lockinStandard": "ACCUMULATED",
"membershipType": "LEVEL",
"paidExpiryDateType": null,
"paidExpiryDateValue": null,
"paidPrice": null,
"upgradeStandard": "ACCUMULATED"
},
{
"levelCode": "gid://shopline/Membership/MLC6568226048886449178",
"levelIcon": "LEVEL_3",
"levelName": "membership_level_2",
"levelOrder": 2,
"levelThreshold": "20000",
"lockinRule": "0",
"lockinStandard": "ACCUMULATED",
"membershipType": "LEVEL",
"paidExpiryDateType": null,
"paidExpiryDateValue": null,
"paidPrice": null,
"upgradeStandard": "ACCUMULATED"
}
]
},
"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": "/storeMembershipType",
"dfRt": 34,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberStoreFrontApi@memberLevelDefQuery",
"dfStartTime": 1721885233743
}
],
"graphQLMetrics": {
"appId": "265337",
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"clientIp": "218.253.130.212",
"countryCode": null,
"customizedClientIp": "218.253.130.212",
"deepLevel": 2,
"endParseTimeMillis": 1721885233741,
"errorFieldsCount": 0,
"executionId": "aa99b53e-5078-4838-bf59-916c8cf60b3c",
"fieldCount": 37,
"includeDeprecatedField": false,
"includeQuery": false,
"languageCode": null,
"loaderCount": 0,
"merchantId": "4200114610",
"namespace": "storefront",
"operation": "QUERY",
"parseRt": 0,
"ratelimitPermits": 1,
"ratelimitRemaining": 1,
"rt": 37,
"saleChannel": null,
"startParseTimeMillis": 1721885233741,
"startTimeMillis": 1721885233741,
"storeId": "1641993455937",
"storePlus": false,
"successType": "SUCCESS",
"tenant": "ec20",
"traceId": "0c2541d20ca30dff5ebc5e73fce8fd03",
"version": "v20241201"
}
},
"tracing": {
"duration": 37315334,
"endTime": "2024-07-25T05:27:13.778Z",
"execution": {
"resolvers": [
{
"duration": 34645731,
"fieldName": "storeMembershipType",
"parentType": "Query",
"path": [
"storeMembershipType"
],
"returnType": "[MemberLevel]",
"startOffset": 2116095
},
{
"duration": 9165,
"fieldName": "levelCode",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelCode"
],
"returnType": "String",
"startOffset": 36882403
},
{
"duration": 2463,
"fieldName": "levelName",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelName"
],
"returnType": "String",
"startOffset": 36909048
},
{
"duration": 2056,
"fieldName": "membershipType",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"membershipType"
],
"returnType": "MembershipType",
"startOffset": 36923891
},
{
"duration": 2271,
"fieldName": "levelOrder",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelOrder"
],
"returnType": "Int",
"startOffset": 36942069
},
{
"duration": 1906,
"fieldName": "levelIcon",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelIcon"
],
"returnType": "String",
"startOffset": 36956386
},
{
"duration": 1978,
"fieldName": "upgradeStandard",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"upgradeStandard"
],
"returnType": "UpgradeStandard",
"startOffset": 36968786
},
{
"duration": 2157,
"fieldName": "levelThreshold",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"levelThreshold"
],
"returnType": "UnsignedInt64",
"startOffset": 36986598
},
{
"duration": 2146,
"fieldName": "lockinStandard",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"lockinStandard"
],
"returnType": "LockinStandard",
"startOffset": 37004638
},
{
"duration": 1963,
"fieldName": "lockinRule",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"lockinRule"
],
"returnType": "UnsignedInt64",
"startOffset": 37017901
},
{
"duration": 1981,
"fieldName": "paidPrice",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidPrice"
],
"returnType": "UnsignedInt64",
"startOffset": 37030029
},
{
"duration": 1832,
"fieldName": "paidExpiryDateType",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidExpiryDateType"
],
"returnType": "PaidExpiryDateType",
"startOffset": 37042503
},
{
"duration": 1934,
"fieldName": "paidExpiryDateValue",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
0,
"paidExpiryDateValue"
],
"returnType": "Int",
"startOffset": 37054349
},
{
"duration": 2418,
"fieldName": "levelCode",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelCode"
],
"returnType": "String",
"startOffset": 37099093
},
{
"duration": 1821,
"fieldName": "levelName",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelName"
],
"returnType": "String",
"startOffset": 37111633
},
{
"duration": 2079,
"fieldName": "membershipType",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"membershipType"
],
"returnType": "MembershipType",
"startOffset": 37123159
},
{
"duration": 2145,
"fieldName": "levelOrder",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelOrder"
],
"returnType": "Int",
"startOffset": 37135414
},
{
"duration": 1991,
"fieldName": "levelIcon",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelIcon"
],
"returnType": "String",
"startOffset": 37147213
},
{
"duration": 1904,
"fieldName": "upgradeStandard",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"upgradeStandard"
],
"returnType": "UpgradeStandard",
"startOffset": 37158676
},
{
"duration": 1985,
"fieldName": "levelThreshold",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"levelThreshold"
],
"returnType": "UnsignedInt64",
"startOffset": 37170147
},
{
"duration": 2580,
"fieldName": "lockinStandard",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"lockinStandard"
],
"returnType": "LockinStandard",
"startOffset": 37182430
},
{
"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
},
{
"duration": 1937,
"fieldName": "paidExpiryDateType",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"paidExpiryDateType"
],
"returnType": "PaidExpiryDateType",
"startOffset": 37218027
},
{
"duration": 1877,
"fieldName": "paidExpiryDateValue",
"parentType": "MemberLevel",
"path": [
"storeMembershipType",
1,
"paidExpiryDateValue"
],
"returnType": "Int",
"startOffset": 37229585
}
]
},
"parsing": {
"duration": 222110,
"startOffset": 259591
},
"startTime": "2024-07-25T05:27:13.741Z",
"validation": {
"duration": 337736,
"startOffset": 742958
},
"version": 1
}
}
}
Was this article helpful to you?