# Agent & User Info

This is an API endpoint used to retrieve the balance information for a specific agent.

## **Endpoint**

```
POST https://api.nexusggr.com
```

## **Agent Info**

### **Request Body**
```json
{
  "method": "money_info",
  "agent_code": "testAgent",
  "agent_token": "41f5cc794aef2b138c715cf25f767cc1"
}
```
<table><thead><tr><th width="183">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>method</td><td>string</td><td>The method type (<code>money_info</code>)</td></tr><tr><td>agent_code</td><td>string</td><td>The agent's code</td></tr><tr><td>agent_token</td><td>string</td><td>The agent's authentication token</td></tr></tbody></table>

### **Success Response Example**

```json
{
    "status": 1,
    "code": 7777777,
    "msg": "SUCCESS",
    "agent": {
        "agent_code": "testAgent",
        "balance": 1000000
    }
}
```

### **Failure Response Example**

```json
{
  "status": 0,
  "code": 7770404,
  "msg": "Invalid Agent."
}
```

***

## **User Info**

### **Request Body**
```json
{
  "method": "money_info",
  "agent_code": "testAgent",
  "agent_token": "41f5cc794aef2b138c715cf25f767cc1",
  "user_code": "testUser"
}
```
<table><thead><tr><th width="183">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>method</td><td>string</td><td>The method type (<code>money_info</code>)</td></tr><tr><td>agent_code</td><td>string</td><td>The agent's code</td></tr><tr><td>agent_token</td><td>string</td><td>The agent's authentication token</td></tr><tr><td>user_code</td><td>string</td><td>The user's code</td></tr></tbody></table>

### **Success Response Example**

```json
{
    "status": 1,
    "code": 7777777,
    "msg": "SUCCESS",
    "agent": {
        "agent_code": "testAgent",
        "balance": 1000000
    },
    "user": {
        "user_code": "testUser",
        "balance": 100000
    }
}
```

### **Failure Response Example**

```json
{
  "status": 0,
  "code": 7770003,
  "msg": "Invalid User"
}
```

***

## **All Users Info**

### **Request Body**
```json
{
  "method": "money_info",
  "agent_code": "testAgent",
  "agent_token": "41f5cc794aef2b138c715cf25f767cc1",
  "all_users": true
}
```
<table><thead><tr><th width="183">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>method</td><td>string</td><td>The method type (<code>money_info</code>)</td></tr><tr><td>agent_code</td><td>string</td><td>The agent's code</td></tr><tr><td>agent_token</td><td>string</td><td>The agent's authentication token</td></tr><tr><td>all_users</td><td>boolean</td><td><code>true</code></td></tr></tbody></table>

### **Success Response Example**

```json
{
    "status": 1,
    "code": 7777777,
    "msg": "SUCCESS",
    "agent": {
        "agent_code": "testAgent",
        "balance": 99550000
    },
    "user_list": [
        {
            "user_code": "testUser1",
            "balance": 450000
        },
        {
            "user_code": "testUser2",
            "balance": 20000
        }
    ]
}
```

### **Failure Response Example**

```json
{
  "status": 0,
  "code": 7770400,
  "msg": "all_users must be a boolean"
}
```
