An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Get successful referral relationships of the specified customer within the store.
Arguments
after ● String
Returns elements following the specified cursor. The first argument must also be specified when using this argument.
before ● String
Returns elements preceding the specified cursor. The last argument must also be specified when using this argument.
first ● Int
Returns the first n elements in the list.
last ● Int
Returns the last n elements in the list.
reverse ● Boolean
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
customerAccessToken ● String!non-null
The customer access token.
Return
edges ● [UserInviteRelationEdge!]!non-null
A list of edges, containing the nodes and their corresponding cursors.
More
pageInfo ● MemberSystemPageInfo!non-null
Pagination information for the current page.
More
nodes ● [InviteRelation]
A flattened list of nodes.
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Get successful referral relationships of the specified customer within the store
query {
userInviteRelations(first:10,customerAccessToken:"tokenxx"){
nodes{
senderCustomer{
customerId
email
phone
firstName
lastName
levelName
levelCode
referralUrl
referralCode
},
receiverCustomer{
customerId
email
phone
firstName
lastName
levelName
levelCode
referralUrl
referralCode
}
}
edges{
cursor,node{
senderCustomer{
customerId
},
receiverCustomer{
customerId
}
}
}
pageInfo{
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
Response
{
"data": {
"userInviteRelations": {
"nodes": [
{
"receiverCustomer": {
"customerId": "gid://shopline/Customer/4603700****",
"email": "**222@qq.com",
"lastName": null,
"levelCode": "",
"referralCode": "RW**",
"referralUrl": "https://****.myshopline.com/user/signUp?referral_code=RWL**&source_type=member_plugin_referral&slt=member_plugin_referral",
"firstName": null,
"levelName": null,
"phone": null
},
"senderCustomer": {
"levelName": "middle",
"referralCode": "UL**",
"customerId": "gid://shopline/Customer/460352****",
"email": "***666@qq.com",
"firstName": "zhang",
"phone": null,
"referralUrl": "https://*.myshopline.com/user/signUp?referral_code=UL**C&source_type=member_plugin_referral&slt=member_plugin_referral",
"lastName": "eeeevv",
"levelCode": "gid://shopline/Membership/MLC644317091657103****"
}
}
],
"pageInfo": {
"endCursor": "EED61853938C27E6CA1623B1FE2****",
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "EED61853938C27E6CA1623B1FE****"
},
"edges": [
{
"cursor": "EED61853938C27E6CA1623B1FE2****",
"node": {
"receiverCustomer": {
"customerId": "gid://shopline/Customer/4603700***"
},
"senderCustomer": {
"customerId": "gid://shopline/Customer/460352***"
}
}
}
]
}
}
}
Was this article helpful to you?