# API For Account

## Get account information

> Returns basic account information.

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseAccountInfo":{"type":"object","description":"Account information response.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"result":{"$ref":"#/components/schemas/AccountInfo","description":"Account information."}}},"AccountInfo":{"type":"object","description":"Account information.","properties":{"id":{"type":"integer","description":"User ID."},"email":{"type":"string","description":"User email address."},"username":{"type":"string","description":"Account username."},"email_verified":{"type":"boolean","description":"Whether the email address is verified."},"_2fa_enabled":{"type":"boolean","description":"Two-factor authentication status (enabled/disabled)."},"wallet_balance":{"type":"number","description":"Current wallet balance."}}},"ResponseBadRequestError":{"type":"object","description":"Returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Returned when the request is forbidden.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/account/get-info":{"get":{"summary":"Get account information","description":"Returns basic account information.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseAccountInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## Get balance information

> Returns IP and traffic balance information.

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseBalanceInfo":{"type":"object","description":"Balance information response.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"result":{"type":"object","properties":{"ip_data":{"type":"array","items":{"$ref":"#/components/schemas/IpPlanData"}},"traffic_data":{"type":"array","items":{"$ref":"#/components/schemas/TrafficPlanData"}}},"description":"Balance data."}}},"IpPlanData":{"type":"object","description":"IP plan balance data.","properties":{"plan_id":{"type":"integer","description":"IP plan ID (e.g., 1 = IP plan)."},"amount":{"type":"integer","description":"Remaining IP amount."}}},"TrafficPlanData":{"type":"object","description":"Traffic plan balance data.","properties":{"id":{"type":"integer","description":"Traffic plan ID."},"amount":{"type":"integer","description":"Remaining traffic amount (bytes)."},"active_at":{"type":"integer","description":"Package activation time."},"expires_in":{"type":"integer","description":"Time until expiration (seconds)."},"expires_at":{"type":"integer","description":"Package expiration time."},"status":{"type":"integer","description":"Package status: 1 = available, 2 = expired, 3 = used up, 4 = locked, 5 = revoked."},"plan_name":{"type":"string","description":"Traffic plan name."},"original_amount":{"type":"string","description":"Original traffic amount (bytes)."},"receive_method":{"type":"integer","description":"Method used to receive the package."},"traffic_type":{"type":"integer","description":"Traffic type: 1 = regular, 2 = enterprise."},"created_at":{"type":"integer","description":"Creation time."},"updated_at":{"type":"integer","description":"Last update time."}}},"ResponseBadRequestError":{"type":"object","description":"Returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Returned when the request is forbidden.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/account/get-balance-data":{"get":{"summary":"Get balance information","description":"Returns IP and traffic balance information.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBalanceInfo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## The AccountInfo object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"AccountInfo":{"type":"object","description":"Account information.","properties":{"id":{"type":"integer","description":"User ID."},"email":{"type":"string","description":"User email address."},"username":{"type":"string","description":"Account username."},"email_verified":{"type":"boolean","description":"Whether the email address is verified."},"_2fa_enabled":{"type":"boolean","description":"Two-factor authentication status (enabled/disabled)."},"wallet_balance":{"type":"number","description":"Current wallet balance."}}}}}}
```

## The IpPlanData object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"IpPlanData":{"type":"object","description":"IP plan balance data.","properties":{"plan_id":{"type":"integer","description":"IP plan ID (e.g., 1 = IP plan)."},"amount":{"type":"integer","description":"Remaining IP amount."}}}}}}
```

## The TrafficPlanData object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"TrafficPlanData":{"type":"object","description":"Traffic plan balance data.","properties":{"id":{"type":"integer","description":"Traffic plan ID."},"amount":{"type":"integer","description":"Remaining traffic amount (bytes)."},"active_at":{"type":"integer","description":"Package activation time."},"expires_in":{"type":"integer","description":"Time until expiration (seconds)."},"expires_at":{"type":"integer","description":"Package expiration time."},"status":{"type":"integer","description":"Package status: 1 = available, 2 = expired, 3 = used up, 4 = locked, 5 = revoked."},"plan_name":{"type":"string","description":"Traffic plan name."},"original_amount":{"type":"string","description":"Original traffic amount (bytes)."},"receive_method":{"type":"integer","description":"Method used to receive the package."},"traffic_type":{"type":"integer","description":"Traffic type: 1 = regular, 2 = enterprise."},"created_at":{"type":"integer","description":"Creation time."},"updated_at":{"type":"integer","description":"Last update time."}}}}}}
```

## The ResponseAccountInfo object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"ResponseAccountInfo":{"type":"object","description":"Account information response.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"result":{"$ref":"#/components/schemas/AccountInfo","description":"Account information."}}},"AccountInfo":{"type":"object","description":"Account information.","properties":{"id":{"type":"integer","description":"User ID."},"email":{"type":"string","description":"User email address."},"username":{"type":"string","description":"Account username."},"email_verified":{"type":"boolean","description":"Whether the email address is verified."},"_2fa_enabled":{"type":"boolean","description":"Two-factor authentication status (enabled/disabled)."},"wallet_balance":{"type":"number","description":"Current wallet balance."}}}}}}
```

## The ResponseBalanceInfo object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"ResponseBalanceInfo":{"type":"object","description":"Balance information response.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"result":{"type":"object","properties":{"ip_data":{"type":"array","items":{"$ref":"#/components/schemas/IpPlanData"}},"traffic_data":{"type":"array","items":{"$ref":"#/components/schemas/TrafficPlanData"}}},"description":"Balance data."}}},"IpPlanData":{"type":"object","description":"IP plan balance data.","properties":{"plan_id":{"type":"integer","description":"IP plan ID (e.g., 1 = IP plan)."},"amount":{"type":"integer","description":"Remaining IP amount."}}},"TrafficPlanData":{"type":"object","description":"Traffic plan balance data.","properties":{"id":{"type":"integer","description":"Traffic plan ID."},"amount":{"type":"integer","description":"Remaining traffic amount (bytes)."},"active_at":{"type":"integer","description":"Package activation time."},"expires_in":{"type":"integer","description":"Time until expiration (seconds)."},"expires_at":{"type":"integer","description":"Package expiration time."},"status":{"type":"integer","description":"Package status: 1 = available, 2 = expired, 3 = used up, 4 = locked, 5 = revoked."},"plan_name":{"type":"string","description":"Traffic plan name."},"original_amount":{"type":"string","description":"Original traffic amount (bytes)."},"receive_method":{"type":"integer","description":"Method used to receive the package."},"traffic_type":{"type":"integer","description":"Traffic type: 1 = regular, 2 = enterprise."},"created_at":{"type":"integer","description":"Creation time."},"updated_at":{"type":"integer","description":"Last update time."}}}}}}
```

## The ResponseForbiddenError object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"ResponseForbiddenError":{"type":"object","description":"Returned when the request is forbidden.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```

## The ResponseBadRequestError object

```json
{"openapi":"3.1.1","info":{"title":"Account","version":"1.0"},"components":{"schemas":{"ResponseBadRequestError":{"type":"object","description":"Returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Success status (true if successful, false if an error occurred)."},"message":{"type":"string","description":"Response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```
