接口访问需要令牌,具体如何获取令牌请参考:身份认证
查询单个会员的会员资产信息,包括会员等级和付费类型信息、可使用的奖励和推荐信息等。
Arguments
customerId ● String!non-null
客户ID
Return
invitedSuccess ● UnsignedInt64
店铺内由该客户邀请成功的用户数。即,收到邀请,并且成功完成商家设置的邀请任务的总成功次数
isReferred ● Boolean
该客户是否是被他人邀请到店铺
levelCode ● String
该客户所在的等级会员或付费会员编码
levelExpiryTime ● Date
该客户所在的等级会员或付费会员到期时间。当 membershipType = LEVEL 时,如果levelExpiryTime为空,代表永久有效
levelIcon ● String
该客户所在的等级会员或付费会员的icon
levelName ● String
该客户所在的等级会员或付费会员名称。最多25个字符
levelOrder ● Int
仅当membershipType = LEVEL时有意义,此时levelOrder越大,等级越高级
levelUpdatedTime ● Date
该客户所在的等级会员或付费会员开始生效时间
membershipType ● MembershipType
店铺当前使用的会员机制。
More
rewardAvailable ● Int
该客户当前可用的奖励个数。奖励的范围包括:下发的会员权益、已通过积分兑换优惠券等
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询会员信息
query {
memberInfo(customerId: "gid://shopline/Customer/4602226680") {
levelCode
membershipType
rewardAvailable
invitedSuccess
levelExpiryTime
levelUpdatedTime
levelName
levelIcon
levelOrder
isReferred
}
}
Response
{
"data": {
"memberInfo": {
"isReferred": false,
"levelIcon": "LEVEL_3",
"levelName": "membership_level_2",
"levelOrder": 2,
"levelUpdatedTime": "2024-07-25T05:06:52Z",
"invitedSuccess": "0",
"levelCode": "gid://shopline/Membership/MLC6568226048886449178",
"levelExpiryTime": null,
"membershipType": "LEVEL",
"rewardAvailable": 1
}
},
"extensions": {
"tracing": {
"duration": 132113222,
"endTime": "2024-07-25T07:26:52.093Z",
"execution": {
"resolvers": [
{
"duration": 126643855,
"fieldName": "memberInfo",
"parentType": "Query",
"path": [
"memberInfo"
],
"returnType": "MembershipInfo",
"startOffset": 4637415
},
{
"duration": 14925,
"fieldName": "levelCode",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelCode"
],
"returnType": "String",
"startOffset": 131465717
},
{
"startOffset": 131531658,
"duration": 7786,
"fieldName": "membershipType",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"membershipType"
],
"returnType": "MembershipType"
},
{
"returnType": "Int",
"startOffset": 131581236,
"duration": 6605,
"fieldName": "rewardAvailable",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"rewardAvailable"
]
},
{
"returnType": "UnsignedInt64",
"startOffset": 131633989,
"duration": 7511,
"fieldName": "invitedSuccess",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"invitedSuccess"
]
},
{
"startOffset": 131685621,
"duration": 6544,
"fieldName": "levelExpiryTime",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelExpiryTime"
],
"returnType": "Date"
},
{
"startOffset": 131730821,
"duration": 16211,
"fieldName": "levelUpdatedTime",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelUpdatedTime"
],
"returnType": "Date"
},
{
"duration": 6930,
"fieldName": "levelName",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelName"
],
"returnType": "String",
"startOffset": 131815215
},
{
"duration": 19266,
"fieldName": "levelIcon",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelIcon"
],
"returnType": "String",
"startOffset": 131858265
},
{
"startOffset": 131919268,
"duration": 6670,
"fieldName": "levelOrder",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"levelOrder"
],
"returnType": "Int"
},
{
"fieldName": "isReferred",
"parentType": "MembershipInfo",
"path": [
"memberInfo",
"isReferred"
],
"returnType": "Boolean",
"startOffset": 131969605,
"duration": 6983
}
]
},
"parsing": {
"duration": 595175,
"startOffset": 653573
},
"startTime": "2024-07-25T07:26:51.961Z",
"validation": {
"duration": 582381,
"startOffset": 1483379
},
"version": 1
},
"dataloader": {
"individual-statistics": {
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkInCollectionForLoader": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.DescriptionQueryGqlService-get": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listItemForLoader": {
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ProductQueryGqlService-inMarketForLoader": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-seoLoader": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listLevelByVariantForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ProductQueryGqlService-onlineStoreUrlForLoader": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ProductQueryGqlService-optionsForLoader": {
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductOptions": {
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductVariants": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0
},
"LD-com.joyy.shopline.soul.appstore.api.service.publication.PublicationQueryGQLService-publicationsForLoader": {
"batchLoadExceptionCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.benefitrights.giftcard.graphql.api.service.ShopQueryGqlService-canCreateGiftCards": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0
},
"LD-com.shopline.ec.merchant.ugc.i18n.api.interfaces.UgcI18nGraphqlApi-getUgcLocaleResources": {
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkHasProductForLoader": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
}
},
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfRt": 125,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.MemberGqlApi@getMember",
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/memberInfo"
}
],
"graphQLMetrics": {
"operation": "QUERY",
"endParseTimeMillis": 1721892411962,
"errorFieldsCount": 0,
"loaderCount": 0,
"namespace": "admin",
"saleChannel": null,
"storePlus": false,
"tenant": "ec20",
"appKey": "936eda168305ed82cee702c6822354ee6de2e802",
"merchantId": "4200114610",
"startTimeMillis": 1721892411960,
"appId": "265337",
"countryCode": null,
"customizedClientIp": "218.253.130.212",
"successType": "SUCCESS",
"includeQuery": false,
"languageCode": null,
"version": "v20241201",
"clientIp": "218.253.130.212",
"deepLevel": 2,
"ratelimitPermits": 0,
"rt": 133,
"storeId": "1641993455937",
"fieldCount": 21,
"startParseTimeMillis": 1721892411961,
"executionId": "a53d8687-38ed-4494-9cb2-9b279faf7b28",
"includeDeprecatedField": false,
"parseRt": 1,
"ratelimitRemaining": 0,
"traceId": "2cf0e6562703292862f0b5ab752af40a"
}
}
}
}
这篇文章对你有帮助吗?