> ## Documentation Index
> Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Referral Users (KEYED)

`Query referral users (including KYC status) within the login agent's subtree.`

#### Request URL

`GET https://cloud-api.wooxpro.com/contract/affiliate/private/referralUsers`

#### Request Limit

See [Detailed Rate Limit](/english/rate-limit)

#### Request Parameter

> Request

```shell theme={null}
curl -H 'X-API-KEY:{{AccessKey}}'
'https://cloud-api.wooxpro.com/contract/affiliate/private/referralUsers?page=1&size=20'
```

| Field        | Type    | Required? | Description                                                                                                             |
| :----------- | :------ | :-------- | :---------------------------------------------------------------------------------------------------------------------- |
| page         | Integer | Yes       | Page number, must be > 0                                                                                                |
| size         | Integer | Yes       | Records per page, must be > 0                                                                                           |
| uid          | Long    | No        | Downstream uid (cid); returns 40053 if not found, 40054 if not in login subtree                                         |
| referralCode | String  | No        | Filter users invited via this referral code. Unknown codes return empty list; if owner is not in subtree, returns 40055 |
| startTime    | Long    | No        | Registration start time (Unix ms)                                                                                       |
| endTime      | Long    | No        | Registration end time (Unix ms)                                                                                         |

#### Response Data

> Response

```json theme={null}
{
  "code": 1000,
  "trace": "0cc6f4c48b8c42538e908d3195aa109c",
  "message": "Ok",
  "data": [
    {
      "uid": 123456,
      "registerTime": 1688992720000,
      "referralCode": "ABCDEF",
      "kycResult": true
    }
  ],
  "total": 1
}
```

| Field        | Type    | Description                 |
| :----------- | :------ | :-------------------------- |
| uid          | Long    | User ID (cid)               |
| registerTime | Long    | Registration timestamp (ms) |
| referralCode | String  | Referral code used          |
| kycResult    | Boolean | KYC verification result     |
| total        | Long    | Total number of records     |

#### Error Codes

| errMsg                                            |  code | http status |
| :------------------------------------------------ | :---: | :---------: |
| Invalid parameter!                                | 40012 |     400     |
| Trade cid not found                               | 40053 |     400     |
| Trade cid is not under your affiliate subtree     | 40054 |     403     |
| Referral code is not under your affiliate subtree | 40055 |     403     |
