---
title: "userInviteRelations"
description: "查询指定客户在店铺内的成功邀请关系。"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/member-system/queries/user-invite-relations'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/member-system/queries/user-invite-relations.md'
---
# userInviteRelations

查询指定客户在店铺内的成功邀请关系。

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Arguments

* `after`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  返回指定游标之后的元素。如果指定了该参数，也必须要指定 `first` 参数。

* `before`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  返回指定游标之前的元素。如果指定了该参数，也必须要指定 `last` 参数。

* `first`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  返回列表中的前 n 个元素。

* `last`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  返回列表中的最后 n 个元素。

* `reverse`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/boolean.md)

  是否反转列表的顺序。
  
  ● true：反转
  
  ● false：不反转
  
  默认值：false

* `customerAccessToken`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户访问令牌。

## Returns

* `edges`

  [[UserInviteRelationEdge!]!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/member-system/objects/user-invite-relation-edge.md)

  边对象列表，包含节点及其对应的游标。

* `pageInfo`

  [MemberSystemPageInfo!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/member-system/objects/member-system-page-info.md)

  当前页的分页信息。

* `nodes`

  [[InviteRelation]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/member-system/queries/invite-relation.md)

  节点的扁平化列表。

## Examples

### 查询指定客户在店铺内的成功邀请关系

查询指定客户在店铺内的成功邀请关系

**Request:**

```json
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:**

```json
{
  "data": {
    "data": {
      "userInviteRelations": {
        "edges": [
          {
            "cursor": "EED61853938C27E6CA1623B1FE2****",
            "node": {
              "receiverCustomer": {
                "customerId": "gid://shopline/Customer/4603700***"
              },
              "senderCustomer": {
                "customerId": "gid://shopline/Customer/460352***"
              }
            }
          }
        ],
        "nodes": [
          {
            "receiverCustomer": {
              "levelCode": "",
              "levelName": null,
              "referralCode": "RW**",
              "phone": null,
              "referralUrl": "https://****.myshopline.com/user/signUp?referral_code=RWL**&source_type=member_plugin_referral&slt=member_plugin_referral",
              "customerId": "gid://shopline/Customer/4603700****",
              "email": "**222@qq.com",
              "firstName": null,
              "lastName": null
            },
            "senderCustomer": {
              "customerId": "gid://shopline/Customer/460352****",
              "email": "***666@qq.com",
              "lastName": "eeeevv",
              "levelCode": "gid://shopline/Membership/MLC644317091657103****",
              "levelName": "middle",
              "phone": null,
              "referralCode": "UL**",
              "firstName": "zhang",
              "referralUrl": "https://*.myshopline.com/user/signUp?referral_code=UL**C&source_type=member_plugin_referral&slt=member_plugin_referral"
            }
          }
        ],
        "pageInfo": {
          "endCursor": "EED61853938C27E6CA1623B1FE2****",
          "hasNextPage": false,
          "hasPreviousPage": false,
          "startCursor": "EED61853938C27E6CA1623B1FE****"
        }
      }
    }
  }
}
```

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

