# Add reseller information

Use this method to add information about a reseller in the 2Checkout system.

## Requirements

This method requires you to set a specific partner using [**setPartner**](/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/partner/set-partner.md).

## Request parameters

<table><thead><tr><th width="122.199951171875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>Session identifier, output of the <strong>Login</strong> method. An exception will be thrown if the values are incorrect.</td></tr><tr><td><a href="/pages/M2spoANXbuao9ilNGK4m"><code>Reseller</code></a></td><td><strong>Required (object)</strong></td></tr></tbody></table>

### Request sample

```php
<?php
require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_SET_PARTNER'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$reseller = new stdClass();
$reseller->ResellerCode = '1234565';
$reseller->Company = 'Avangate';
$reseller->FirstName = 'John';
$reseller->LastName = 'Doe';
$reseller->Email = 'johndoe@example.com';
$reseller->Phone = '123456789';
$reseller->Fax = '12345';
$reseller->Country = 'US';
$reseller->State = 'CA';
$reseller->City = 'Palo Alto';
$reseller->Address = 'Street';
$reseller->PostaCode = '90210';

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'createReseller',
'params' => array($sessionID, $reseller)
);

var_dump (callRPC((Object)$jsonRpcRequest, $host));
```

## Response parameters

<table><thead><tr><th width="140.2000732421875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>ResellerCode</code></td><td><strong>String</strong><br>Unique code identifying a specific reseller.</td></tr></tbody></table>

## Errors

<table><thead><tr><th width="291.4000244140625">Error</th><th>Description</th></tr></thead><tbody><tr><td><strong>NOT_FOUND_PARTNER</strong></td><td>A partner must be set first.</td></tr><tr><td><strong>EMPTY_RESELLER_FIRST_NAME</strong></td><td>Reseller first name is mandatory.</td></tr><tr><td><strong>EMPTY_RESELLER_LAST_NAME</strong></td><td>Reseller last name is mandatory.</td></tr><tr><td><strong>EMPTY_RESELLER_COMPANY</strong></td><td>Reseller company is mandatory.</td></tr><tr><td><strong>INVALID_RESELLER_EMAIL</strong></td><td>Reseller email is mandatory.</td></tr><tr><td><strong>INVALID_RESELLER_EMAIL</strong></td><td>Invalid reseller email provided.</td></tr><tr><td><strong>INVALID_COUNTRY</strong></td><td>Invalid reseller country code.</td></tr><tr><td><strong>INTERNAL_ERROR</strong></td><td>Reseller information could not be saved.</td></tr></tbody></table>


---

# 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://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/reseller/add-reseller-information.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.
