# API For Affiliate

## Get affiliate statistics

> Retrieves aggregated affiliate performance statistics, including referral counts, current level, commission totals, and amounts already processed (withdrawn, converted, or transferred).

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseAffiliateStats":{"type":"object","description":"Affiliate statistics response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"description":"Affiliate statistics.","$ref":"#/components/schemas/AffiliateStats"}}},"AffiliateStats":{"type":"object","description":"Aggregated affiliate performance metrics.","properties":{"registered_users":{"type":"integer","description":"Total number of referred (registered) users."},"today_commission":{"type":"number","description":"Commission earned today."},"total_commission":{"type":"number","description":"Total commission earned (all-time)."},"total_commission_valid":{"type":"number","description":"Total valid commission earned (all-time)."},"withdrawn_amount":{"type":"number","description":"Total commission amount that has already been processed (withdrawn, converted to IPs, or transferred to wallet)."},"current_level":{"$ref":"#/components/schemas/AffiliateLevel","description":"Current affiliate level."},"all_level":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLevel"}}}},"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/stats":{"get":{"summary":"Get affiliate statistics","description":"Retrieves aggregated affiliate performance statistics, including referral counts, current level, commission totals, and amounts already processed (withdrawn, converted, or transferred).","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseAffiliateStats"}}}},"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 affiliate levels

> Returns the complete list of affiliate levels, including each level's title, commission rate, and the purchase threshold required to reach the next level.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseAllLevelOfAffiliate":{"type":"object","description":"Affiliate levels response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"description":"Affiliate levels.","type":"array","items":{"$ref":"#/components/schemas/AffiliateLevel"}}}},"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/all-level":{"get":{"summary":"Get affiliate levels","description":"Returns the complete list of affiliate levels, including each level's title, commission rate, and the purchase threshold required to reach the next level.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseAllLevelOfAffiliate"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List referred users

> Returns a paginated list of users referred through the affiliate program, including basic identity fields and the invite code used.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListReferredUser":{"type":"object","description":"Referred users list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of referred users.","items":{"$ref":"#/components/schemas/ReferredUser"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"ReferredUser":{"type":"object","description":"Referred user profile information.","properties":{"username":{"type":"string","description":"Referred user's username."},"email":{"type":"string","description":"Referred user's email address."},"invite_code_used":{"type":"string","description":"Invite code used at registration."},"created_at":{"type":"number","description":"Referral user creation timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-referred-user":{"get":{"summary":"List referred users","description":"Returns a paginated list of users referred through the affiliate program, including basic identity fields and the invite code used.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListReferredUser"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List commissions

> Returns a paginated list of commission records generated from referred users, including amount, rate, payment method, validation status, and creation time.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListCommission":{"type":"object","description":"Commissions list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of commission records.","items":{"$ref":"#/components/schemas/CommissionInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"CommissionInfo":{"type":"object","description":"Commission record details.","properties":{"id":{"type":"integer","description":"Commission record ID."},"amount":{"type":"number","description":"Commission amount."},"rate":{"type":"number","description":"Commission rate."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"is_valid":{"type":"boolean","description":"Commission validity status."},"created_at":{"type":"integer","description":"Commission creation timestamp."},"account":{"type":"object","description":"Referred user account information associated with this commission record.","properties":{"email":{"type":"string","description":"Referred user's email address."},"username":{"type":"string","description":"Referred user's username."}}}}},"PaymentMethod":{"type":"integer","description":"1: Crypto\n2: Card\n3: Local Payment\n4: Wallet\n5: Income"},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-commission":{"get":{"summary":"List commissions","description":"Returns a paginated list of commission records generated from referred users, including amount, rate, payment method, validation status, and creation time.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListCommission"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List conversions

> Returns a paginated list of commission conversion records, showing the commission amount used and the resulting value received, along with the conversion timestamp.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListConversion":{"type":"object","description":"Conversions list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of conversion records.","items":{"$ref":"#/components/schemas/ConversionInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"ConversionInfo":{"type":"object","description":"Commission conversion record.","properties":{"amount":{"type":"number","description":"Commission amount used for conversion."},"number_of_ips":{"type":"number","description":"Value received from the conversion."},"created_at":{"type":"integer","description":"Conversion creation timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-conversion":{"get":{"summary":"List conversions","description":"Returns a paginated list of commission conversion records, showing the commission amount used and the resulting value received, along with the conversion timestamp.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListConversion"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List invite codes

> Returns a paginated list of affiliate invite codes, including code metadata, activation status, and timestamps.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListInviteCode":{"type":"object","description":"Invite codes list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of invite codes.","items":{"$ref":"#/components/schemas/InviteCodeInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"InviteCodeInfo":{"type":"object","description":"Affiliate invite code metadata.","properties":{"id":{"type":"integer","description":"Invite code ID."},"account_id":{"type":"integer","description":"Owning account ID."},"code":{"type":"string","description":"Invite code used to refer new users."},"name":{"type":"string","description":"Invite code name set by the user."},"custom_path":{"type":"string","description":"Custom affiliate URL path."},"is_default":{"type":"boolean","description":"Indicates whether the invite code was system-generated (true) or user-created (false)."},"is_active":{"type":"boolean","description":"Invite code activation status."},"created_at":{"type":"integer","description":"Invite code creation timestamp."},"updated_at":{"type":"integer","description":"Invite code last updated timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-invite-code":{"get":{"summary":"List invite codes","description":"Returns a paginated list of affiliate invite codes, including code metadata, activation status, and timestamps.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListInviteCode"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List withdrawals

> Returns a paginated list of affiliate withdrawal requests, including payout details, destination wallet information, status, and creation time.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListWithdrawn":{"type":"object","description":"Withdrawals list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of withdrawal requests.","items":{"$ref":"#/components/schemas/WithdrawnInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"WithdrawnInfo":{"type":"object","description":"Withdrawal request details.","properties":{"id":{"type":"integer","description":"Withdrawal request ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Requested withdrawal amount."},"coin":{"type":"string","description":"Payout cryptocurrency symbol."},"wallet_address":{"type":"string","description":"Destination wallet address."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Withdrawal request creation timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-withdrawn":{"get":{"summary":"List withdrawals","description":"Returns a paginated list of affiliate withdrawal requests, including payout details, destination wallet information, status, and creation time.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListWithdrawn"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## List wallet transfers

> Returns a paginated list of commission transfers to wallet balance, including amount, processing status, and creation time.

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListTransferToWallet":{"type":"object","description":"Wallet transfers list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of wallet transfer records.","items":{"$ref":"#/components/schemas/TransferToWalletInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"TransferToWalletInfo":{"type":"object","description":"Wallet transfer record details.","properties":{"id":{"type":"integer","description":"Transfer record ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Amount transferred to wallet."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Transfer creation timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/affiliate/list-transfer-to-wallet":{"get":{"summary":"List wallet transfers","description":"Returns a paginated list of commission transfers to wallet balance, including amount, processing status, and creation time.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListTransferToWallet"}}}},"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 AffiliateStats object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"AffiliateStats":{"type":"object","description":"Aggregated affiliate performance metrics.","properties":{"registered_users":{"type":"integer","description":"Total number of referred (registered) users."},"today_commission":{"type":"number","description":"Commission earned today."},"total_commission":{"type":"number","description":"Total commission earned (all-time)."},"total_commission_valid":{"type":"number","description":"Total valid commission earned (all-time)."},"withdrawn_amount":{"type":"number","description":"Total commission amount that has already been processed (withdrawn, converted to IPs, or transferred to wallet)."},"current_level":{"$ref":"#/components/schemas/AffiliateLevel","description":"Current affiliate level."},"all_level":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLevel"}}}},"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}}}}}
```

## The AffiliateLevel object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}}}}}
```

## The ReferredUser object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ReferredUser":{"type":"object","description":"Referred user profile information.","properties":{"username":{"type":"string","description":"Referred user's username."},"email":{"type":"string","description":"Referred user's email address."},"invite_code_used":{"type":"string","description":"Invite code used at registration."},"created_at":{"type":"number","description":"Referral user creation timestamp."}}}}}}
```

## The CommissionInfo object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"CommissionInfo":{"type":"object","description":"Commission record details.","properties":{"id":{"type":"integer","description":"Commission record ID."},"amount":{"type":"number","description":"Commission amount."},"rate":{"type":"number","description":"Commission rate."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"is_valid":{"type":"boolean","description":"Commission validity status."},"created_at":{"type":"integer","description":"Commission creation timestamp."},"account":{"type":"object","description":"Referred user account information associated with this commission record.","properties":{"email":{"type":"string","description":"Referred user's email address."},"username":{"type":"string","description":"Referred user's username."}}}}},"PaymentMethod":{"type":"integer","description":"1: Crypto\n2: Card\n3: Local Payment\n4: Wallet\n5: Income"}}}}
```

## The ConversionInfo object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ConversionInfo":{"type":"object","description":"Commission conversion record.","properties":{"amount":{"type":"number","description":"Commission amount used for conversion."},"number_of_ips":{"type":"number","description":"Value received from the conversion."},"created_at":{"type":"integer","description":"Conversion creation timestamp."}}}}}}
```

## The InviteCodeInfo object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"InviteCodeInfo":{"type":"object","description":"Affiliate invite code metadata.","properties":{"id":{"type":"integer","description":"Invite code ID."},"account_id":{"type":"integer","description":"Owning account ID."},"code":{"type":"string","description":"Invite code used to refer new users."},"name":{"type":"string","description":"Invite code name set by the user."},"custom_path":{"type":"string","description":"Custom affiliate URL path."},"is_default":{"type":"boolean","description":"Indicates whether the invite code was system-generated (true) or user-created (false)."},"is_active":{"type":"boolean","description":"Invite code activation status."},"created_at":{"type":"integer","description":"Invite code creation timestamp."},"updated_at":{"type":"integer","description":"Invite code last updated timestamp."}}}}}}
```

## The WithdrawnInfo object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"WithdrawnInfo":{"type":"object","description":"Withdrawal request details.","properties":{"id":{"type":"integer","description":"Withdrawal request ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Requested withdrawal amount."},"coin":{"type":"string","description":"Payout cryptocurrency symbol."},"wallet_address":{"type":"string","description":"Destination wallet address."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Withdrawal request creation timestamp."}}}}}}
```

## The TransferToWalletInfo object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"TransferToWalletInfo":{"type":"object","description":"Wallet transfer record details.","properties":{"id":{"type":"integer","description":"Transfer record ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Amount transferred to wallet."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Transfer creation timestamp."}}}}}}
```

## The PaymentMethod object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"PaymentMethod":{"type":"integer","description":"1: Crypto\n2: Card\n3: Local Payment\n4: Wallet\n5: Income"}}}}
```

## The ResponseAffiliateStats object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseAffiliateStats":{"type":"object","description":"Affiliate statistics response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"description":"Affiliate statistics.","$ref":"#/components/schemas/AffiliateStats"}}},"AffiliateStats":{"type":"object","description":"Aggregated affiliate performance metrics.","properties":{"registered_users":{"type":"integer","description":"Total number of referred (registered) users."},"today_commission":{"type":"number","description":"Commission earned today."},"total_commission":{"type":"number","description":"Total commission earned (all-time)."},"total_commission_valid":{"type":"number","description":"Total valid commission earned (all-time)."},"withdrawn_amount":{"type":"number","description":"Total commission amount that has already been processed (withdrawn, converted to IPs, or transferred to wallet)."},"current_level":{"$ref":"#/components/schemas/AffiliateLevel","description":"Current affiliate level."},"all_level":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLevel"}}}},"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}}}}}
```

## The ResponseAllLevelOfAffiliate object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseAllLevelOfAffiliate":{"type":"object","description":"Affiliate levels response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"description":"Affiliate levels.","type":"array","items":{"$ref":"#/components/schemas/AffiliateLevel"}}}},"AffiliateLevel":{"type":"object","description":"Affiliate level definition and qualification thresholds.","properties":{"number":{"type":"integer","description":"Level number."},"title":{"type":"string","description":"Level title."},"rate":{"type":"number","description":"Commission rate applied to purchases made by referred users."},"goal_amount":{"type":"number","description":"Cumulative purchase amount from referred users required to reach the next level."}}}}}}
```

## The ResponseListReferredUser object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListReferredUser":{"type":"object","description":"Referred users list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of referred users.","items":{"$ref":"#/components/schemas/ReferredUser"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"ReferredUser":{"type":"object","description":"Referred user profile information.","properties":{"username":{"type":"string","description":"Referred user's username."},"email":{"type":"string","description":"Referred user's email address."},"invite_code_used":{"type":"string","description":"Invite code used at registration."},"created_at":{"type":"number","description":"Referral user creation timestamp."}}}}}}
```

## The ResponseListCommission object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListCommission":{"type":"object","description":"Commissions list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of commission records.","items":{"$ref":"#/components/schemas/CommissionInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"CommissionInfo":{"type":"object","description":"Commission record details.","properties":{"id":{"type":"integer","description":"Commission record ID."},"amount":{"type":"number","description":"Commission amount."},"rate":{"type":"number","description":"Commission rate."},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"is_valid":{"type":"boolean","description":"Commission validity status."},"created_at":{"type":"integer","description":"Commission creation timestamp."},"account":{"type":"object","description":"Referred user account information associated with this commission record.","properties":{"email":{"type":"string","description":"Referred user's email address."},"username":{"type":"string","description":"Referred user's username."}}}}},"PaymentMethod":{"type":"integer","description":"1: Crypto\n2: Card\n3: Local Payment\n4: Wallet\n5: Income"}}}}
```

## The ResponseListConversion object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListConversion":{"type":"object","description":"Conversions list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of conversion records.","items":{"$ref":"#/components/schemas/ConversionInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"ConversionInfo":{"type":"object","description":"Commission conversion record.","properties":{"amount":{"type":"number","description":"Commission amount used for conversion."},"number_of_ips":{"type":"number","description":"Value received from the conversion."},"created_at":{"type":"integer","description":"Conversion creation timestamp."}}}}}}
```

## The ResponseListInviteCode object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListInviteCode":{"type":"object","description":"Invite codes list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of invite codes.","items":{"$ref":"#/components/schemas/InviteCodeInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"InviteCodeInfo":{"type":"object","description":"Affiliate invite code metadata.","properties":{"id":{"type":"integer","description":"Invite code ID."},"account_id":{"type":"integer","description":"Owning account ID."},"code":{"type":"string","description":"Invite code used to refer new users."},"name":{"type":"string","description":"Invite code name set by the user."},"custom_path":{"type":"string","description":"Custom affiliate URL path."},"is_default":{"type":"boolean","description":"Indicates whether the invite code was system-generated (true) or user-created (false)."},"is_active":{"type":"boolean","description":"Invite code activation status."},"created_at":{"type":"integer","description":"Invite code creation timestamp."},"updated_at":{"type":"integer","description":"Invite code last updated timestamp."}}}}}}
```

## The ResponseListWithdrawn object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListWithdrawn":{"type":"object","description":"Withdrawals list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of withdrawal requests.","items":{"$ref":"#/components/schemas/WithdrawnInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"WithdrawnInfo":{"type":"object","description":"Withdrawal request details.","properties":{"id":{"type":"integer","description":"Withdrawal request ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Requested withdrawal amount."},"coin":{"type":"string","description":"Payout cryptocurrency symbol."},"wallet_address":{"type":"string","description":"Destination wallet address."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Withdrawal request creation timestamp."}}}}}}
```

## The ResponseListTransferToWallet object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseListTransferToWallet":{"type":"object","description":"Wallet transfers list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of wallet transfer records.","items":{"$ref":"#/components/schemas/TransferToWalletInfo"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"TransferToWalletInfo":{"type":"object","description":"Wallet transfer record details.","properties":{"id":{"type":"integer","description":"Transfer record ID."},"email":{"type":"string","description":"Email address provided by the user."},"amount":{"type":"number","description":"Amount transferred to wallet."},"status":{"type":"integer","description":"0: Pending, 1: Success, 2: Error, 3: Processing, 4: Cancelled"},"created_at":{"type":"integer","description":"Transfer creation timestamp."}}}}}}
```

## The ResponseForbiddenError object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```

## The ResponseBadRequestError object

```json
{"openapi":"3.1.1","info":{"title":"Affiliate","version":"1.0"},"components":{"schemas":{"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```
