# User Information API

## User Registration

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/registration`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                       |
| ----------------------------------------- | ------ | --------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant unique identifier appKey |
| time                                      | String |                                   |
| data                                      | String |                                   |
| sign                                      | String |                                   |

{% tabs %}
{% tab title="200: OK " %}

```javascript

{
    "code": "0",
    "msg": "suc",
    "data": "",
    "sign": ""
}


data:
{
    "uid": 2000000,//user id
    "inviteCode": "AAAAAA"//Current user's invitation code
}
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

The phone number and email fields are optional, but if you choose to fill in either one of them, you can only provide either the phone number or the email. You cannot fill in both fields simultaneously.

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>mobileNumber</td><td>String</td><td>NO</td><td>09011223</td><td>Phone number and email can only be filled in one of them</td></tr><tr><td>email</td><td>String</td><td>NO</td><td>xxxxx@.com</td><td>Phone number and email can only be filled in one of them</td></tr><tr><td>countryCode</td><td>String</td><td>NO</td><td>93</td><td>Country dialing code for the phone number</td></tr><tr><td>password</td><td>String</td><td>YES</td><td>TtEest19121</td><td>Password</td></tr><tr><td>invitedCode</td><td>String</td><td>YES</td><td>QSKNOQQQ</td><td>Invitation code</td></tr></tbody></table>

## User Registration Information

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/reg_info_list`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Query Parameters

| Name                                           | Type   | Description                                                |
| ---------------------------------------------- | ------ | ---------------------------------------------------------- |
| page                                           | String | Page number for pagination, defaults to 1 if not specified |
| pageSize                                       | String | Number of items per page, defaults to 100 if not specified |
| regStartTime<mark style="color:red;">\*</mark> | String | Start registration time (13-digit timestamp)               |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                       |
| ----------------------------------------- | ------ | --------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant unique identifier appKey |
| time                                      | String |                                   |
| sign                                      | String |                                   |
| data                                      | String |                                   |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "code": "fugiat in reprehenderit",
  "msg": "sint Excepteur non in",
  "data": "",
  "sign":""
}

data:
{
    "userInfoList": [
      {
        "uid": 23000, // User UID
        "mobileNumber": "9989921", // Mobile number
        "email": "www@.com", // Email
        "inviteCode": "SDONOQWE", // Invitation code
        "pid": "3999009" // Parent UID
      }
    ],
    "count": 62869161.58626932
  }
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>page</td><td>String</td><td>NO</td><td>1</td><td>Page number for pagination, defaults to 1 if not specified</td></tr><tr><td>pageSize</td><td>String</td><td>NO</td><td>20</td><td>Number of items per page, defaults to 100 if not specified</td></tr><tr><td>regStartTime</td><td>String</td><td>YES</td><td>1232123421123</td><td>Start registration time (13-digit timestamp)</td></tr></tbody></table>

## Invitation Relationship Query - Superior

## Return all superior levels found in the current query, up to a maximum of five levels.

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/user_superior`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                       |
| ----------------------------------------- | ------ | --------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant unique identifier appKey |
| sign                                      | String | Signature                         |
| data                                      | String |                                   |
| time                                      | String |                                   |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "code": "fugiat",
  "msg": "sed occaecat nisi fugiat",
  "data": "",
  "sign":""
}

data:

{
        "user": {
            "uid": 230001, // User ID
            "inviteCode": "WEQSDA", // Invitation code
            "invitedCode": "OONSIAD", // Invited code
            "invitedUid": 2300002 // Inviter's UID
        },
        "level1": {
            "uid": 230003, // User ID
            "inviteCode": "SDKKCNASD", // Invitation code
            "invitedCode": "SDOMMQWE", // Invited code
            "invitedUid": 2399901 // Inviter's UID
        },
        "level2": {
            "uid": 230003, // User ID
            "inviteCode": "SDKKCNASD", // Invitation code
            "invitedCode": "SDOMMQWE", // Invited code
            "invitedUid": 2399901 // Inviter's UID
        }
    }
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>openId</td><td>String</td><td>NO</td><td></td><td>Choose either openid, emailOrPhone, with uid taking priority</td></tr><tr><td>uid</td><td>String</td><td>NO</td><td></td><td>user ID</td></tr><tr><td>emailOrPhone</td><td>String</td><td>NO</td><td></td><td>Mobile phone number</td></tr></tbody></table>

## Invitation Relationship Query - Subordinate

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/user_invite`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                       |
| ----------------------------------------- | ------ | --------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant unique identifier appKey |
| sign                                      | String | Signature                         |
| data                                      | String |                                   |
| time                                      | String |                                   |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "code": "0",
  "msg": "suc",
  "data": "",
  "sign":""
}

data:
{
    "levelOneCount": 4, // Level 1 count
    "levelTwoCount": 9, // Level 2 count
    "cuerrentUser": {
      "uid": 10002053, // Current user UID
      "nickname": "xuyang", // Current user nickname
      "inviteCode": "EAAAQATW", // Current user invite code
      "invitedUid": -1, // UID of the inviting user, returns -1 if not exist
      "invitedCode": "\"'", // Invited code of the current user, returns an empty string if not exist
      "ctime": "2019-09-02 12:24:36" // Registration time
    },
    "userExtInviteVoList": [ // List of invited users
      {
        "uid": 10002183, // UID
        "nickname": "小明", // Nickname
        "inviteCode": "XXXXXXXX", // Invite code
        "level": 1, // Level 1
        "invitedUid": 10002181, // Inviting user UID
        "invitedNickname": "小花", // Inviting user nickname
        "invitedCode": "XXXXXXXX", // Inviting user invite code
        "phone": "18310479052", // Phone number
        "email": "111@163.com", // Email
        "ctime": "2020-08-22 19:40:18", // Registration time
        "childLevel": [
          {
            "uid": 10002065,
            "nickname": "小明",
            "inviteCode": "XXXXXXXX",
            "level": 2, // Level 2
            "invitedUid": 10002183,
            "invitedNickname": "小花",
            "invitedCode": "XXXXXXXX",
            "phone": "18210479051",
            "email": "111@163.com",
            "ctime": "2020-04-09 20:52:26"
          },
          {
            "uid": 10002065,
            "nickname": "小明",
            "inviteCode": "XXXXXXXX",
            "level": 2,
            "invitedUid": 10002183,
            "invitedNickname": "小花",
            "invitedCode": "XXXXXXXX",
            "phone": "18210479051",
            "email": "111@163.com",
            "ctime": "2020-04-09 20:52:26"
          },
          {
            "uid": 10002065,
            "nickname": "小明",
            "inviteCode": "XXXXXXXX",
            "level": 2,
            "invitedUid": 10002183,
            "invitedNickname": "小花",
            "invitedCode": "XXXXXXXX",
            "phone": "18210479051",
            "email": "111@163.com",
            "ctime": "2020-04-09 20:52:26"
          },
          {
            "uid": 10002065,
            "nickname": "小明",
            "inviteCode": "XXXXXXXX",
            "level": 2,
            "invitedUid": 10002183,
            "invitedNickname": "小花",
            "invitedCode": "XXXXXXXX",
            "phone": "18210479051",
            "email": "111@163.com",
            "ctime": "2020-04-09 20:52
            }]
  ]
}
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>openId</td><td>String</td><td>NO</td><td></td><td>Choose either openid, emailOrPhone, with uid taking priority</td></tr><tr><td>uid</td><td>String</td><td>NO</td><td></td><td>user ID</td></tr><tr><td>emailOrPhone</td><td>String</td><td>NO</td><td></td><td>Mobile phone number</td></tr><tr><td>page</td><td>String</td><td>YES</td><td>1</td><td>Page number for pagination, defaults to 1 if not specified</td></tr><tr><td>pageSize</td><td>String</td><td>YES</td><td>20</td><td>Number of items per page, defaults to 100 if not specified</td></tr></tbody></table>

## User Identity Verification

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/verifyUserIdentity`

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description                         |
| ----------------------------------------- | ------ | ----------------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant Unique Identifier (appKey) |
| time                                      | String |                                     |
| sign                                      | String |                                     |
| data                                      | String |                                     |

{% tabs %}
{% tab title="200: OK " %}

```javascript

{
    "code": "0",
    "msg": "suc"
}
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>uid</td><td>String</td><td>YES</td><td>230000</td><td>User ID</td></tr><tr><td>countryCode</td><td>String</td><td>YES</td><td>93</td><td>Country code. You need to enter the correct "code", which can be obtained from the left-hand side country code list.</td></tr><tr><td>certificateNumber</td><td>String</td><td>YES</td><td>211111111111</td><td>ID number</td></tr><tr><td>familyName</td><td>String</td><td>YES</td><td>test</td><td>Last name</td></tr><tr><td>name</td><td>String</td><td>YES</td><td>test</td><td>First name</td></tr><tr><td>firstPhoto</td><td>String</td><td>YES</td><td></td><td>ID photo, only supports online image URLs, maximum of three inputs, separated by commas. Example:"https://oss.com.https://oss.com,https://oss.com"</td></tr></tbody></table>

## get user history login

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/user/getUserHistoryLogin`

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                     | Type   | Description                         |
| ---------------------------------------- | ------ | ----------------------------------- |
| appKey<mark style="color:red;">\*</mark> | String | Merchant Unique Identifier (appKey) |
| sign<mark style="color:red;">\*</mark>   | String |                                     |
| uid<mark style="color:red;">\*</mark>    | String | User ID                             |
| endDate                                  | String | end time 2024-00-00 00:00:00        |
| startDate                                | String | start time 2024-00-00 00:00:00      |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "code": "0",
    "msg": "suc",
    "data": {
        "count": 10,
        "HistoryLogin": [
           {
                "id": 2323332,
                "uid": 2324288,//UID
                "lgType": 1,// Login type，1：phone number，2：email，3：WeChat，4：QQ，5：APP QR code 
                "lgPlatform": 3,//Login platform，1：WEB，2：H5，3：APP ,4 : OAUTH
                "lgSystem": "web",//Login system，e.g.‘android’，‘ios
                "lgIp": "111.203.241.52",// Login IP address
                "lgStatus": 1,// Login status，1：success，2：failure
                "lgInTime": 1598352251000//User login time
            },
            {                
                "id": 2323332,
                "uid": 2324288,//UID
                "lgType": 1,// Login type，1：phone number，2：email，3：WeChat，4：QQ，5：APP QR code 
                "lgPlatform": 3,//Login platform，1：WEB，2：H5，3：APP ,4 : OAUTH
                "lgSystem": "web",//Login system，e.g.‘android’，‘ios
                "lgIp": "111.203.241.52",// Login IP address
                "lgStatus": 1,// Login status，1：success，2：failure
                "lgInTime": 1598352251000//User login time
            }
        ]
    }
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platformv2docs.chainup.com/english-3/user-information-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
