---
title: "referralCodeInfo"
description: "Get the corresponding referrer based on the referral code."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/member-system/queries/referral-code-info'
  md: 'https://developer.shopline.com/docs/storefront-api/member-system/queries/referral-code-info.md'
---
# referralCodeInfo

Get the corresponding referrer based on the referral code.

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

## Arguments

* `customerAccessToken`

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

  The customer access token of an invitee.

* `referralCode`

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

  The referral code.

## Returns

* `senderCustomer`

  [ReferralSenderCustomer](https://developer.shopline.com/docs/storefront-api/member-system/objects/referral-sender-customer.md)

  The referrer information.

## Examples

### Get the corresponding referrer based on the referral code

Get the corresponding referrer based on the referral code.

**Request:**

```json
query {
  referralCodeInfo(customerAccessToken: "tokenxxx",
   referralCode:"7M2***") {
    senderCustomer{
        customerId
        email
        phone
        firstName
        lastName
        levelName
        levelCode
        referralUrl
        referralCode
    }
  }
}
```

**Response:**

```json
{
  "data": {
    "data": {
      "referralCodeInfo": {
        "senderCustomer": {
          "email": "****@qq.com",
          "firstName": "zha**",
          "levelCode": "gid://shopline/Membership/MLC64431709****",
          "levelName": "middle",
          "phone": "0086135604****",
          "referralCode": "7M2****",
          "referralUrl": "https://****.myshopline.com/user/signUp?referral_code=7M2****&source_type=member_plugin_referral&slt=member_plugin_referral",
          "customerId": "gid://shopline/Customer/42001****",
          "lastName": "mian***"
        }
      }
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

