> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-6.0/soap-6.0/reference/reseller/update-order-reseller-information.md).

# Update order reseller information

Use this method to update the reseller information defined for a specific order.

## Request parameters

| Parameter      | Type / Description                                                                                                                                                                                                                      |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sessionID`    | <p><strong>Required (string)</strong><br>Session identifier, which is the output of the <strong>Login</strong> method. An exception will be thrown if the values are incorrect.</p>                                                     |
| `PartnerCode`  | <p><strong>Required (string)</strong><br>Unique identifier that you need to specify when creating a partner in the Control Panel. You can find it under the <strong>General Information</strong> area when editing partner details.</p> |
| `ResellerCode` | <p><strong>Required (string)</strong><br>Unique, system generated reseller identifier.</p>                                                                                                                                              |
| `OrderRefNo`   | <p><strong>Required (string)</strong><br>The unique, system-generated identifier of a partner order.</p>                                                                                                                                |

### Request sample

```php
<?php

declare(strict_types=1);

class Configuration
{
    public const MERCHANT_CODE = 'MERCHANT';
    public const MERCHANT_KEY = 'SECRET_KEY';
    public const URL = 'https://api.2checkout.com/soap/6.0';
    public const ACTION = 'updateOrderReseller';
    //array or JSON
    public const PAYLOAD = <<<JSON
{
    "PartnerCode": "Test Avangate",
    "ResellerCode": "DB6F1A946E",
    "OrderRefNo": 731522351
}
JSON;

}
class Client
{
    public function call(
        string $url = Configuration::URL,
        $payload = Configuration::PAYLOAD,
        string $action = Configuration::ACTION
    ): ?object {
        if (is_array($payload)) {
            $payload = json_encode($payload);
        }
        if (!empty($payload)) {
            // SoapClient works with objects(StdClass)
            $payload = json_decode($payload);
        }
        $soapClient = $this->getClient($url);
        $sessionId = $this->getSession($soapClient);
        $args = array_filter([$sessionId, $payload]);
        return $soapClient->$action(...$args);
    }

    public function getClient(string $url): SoapClient
    {
        return new SoapClient(
            $url.'?wsdl',
            [
                'location' => $url,
                'cache_wsdl' => WSDL_CACHE_NONE,
            ]
        );
    }

    public function getSession(SoapClient $client)
    {
        $date = gmdate('Y-m-d H:i:s');
        $merchantCode = Configuration::MERCHANT_CODE;
        $key = Configuration::MERCHANT_KEY;
        $string = strlen($merchantCode).$merchantCode.strlen($date).$date;
        $algo = 'sha256';
        $hash = hash_hmac($algo, $string, $key);
        $client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
        return $client->login($merchantCode, $date, $hash, $algo);
    }
}
try {
    $client = new Client();
    var_dump($client->call());
} catch (Exception $ex) {
    var_dump($ex);
}
```

## Errors

| Error                                        | Description                     |
| -------------------------------------------- | ------------------------------- |
| **Missing required parameter: PartnerCode**  | Add the PartnerCode parameter.  |
| **Missing required parameter: ResellerCode** | Add the ResellerCode parameter. |
| **Missing required parameter: OrderRefNo**   | Add the OrderRefNo parameter.   |
| **INVALID\_ID\_SALE**                        | Invalid order reference.        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-6.0/soap-6.0/reference/reseller/update-order-reseller-information.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
