For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update reseller information

Use this method to update the details for an existing reseller entity in the Avangate platform.

Note: Updating the details of a reseller does not impact the reseller information already attached to existing partner orders. Let's assume that you added Reseller 1 to Order 1, and then update Reseller 1 changing the company name. Reseller 1 for Order 1 will continue to feature the old Reseller 1 information. To swap it for the new details, add the reseller to the order again using setOrderReseller.

Request parameters

Parameter
Type / Description

sessionID

Required (string) Session identifier, which is the output of the Login method. An exception will be thrown if the values are incorrect.

Required (object)

Request sample

<?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

$RefNo = 'YOUR_ORDER_REFERENCE_NUMBER';

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getOrderReseller',
'params' => array($sessionID, $RefNo)
);
// Start by retrieving the order reseller information

$existingReseller = callRPC((Object)$jsonRpcRequest, $host);

$newAddress = 'NEW_ADDRESS';

$existingReseller->Address = $newAddress;
// Update the existing reseller address

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'updateReseller',
'params' => array($sessionID, $existingReseller)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));
// Send the new address to the reseller object, then display it

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'setOrderReseller',
'params' => array($sessionID, $RefNo, $existingReseller->ResellerCode)
);
var_dump(callRPC((Object)$jsonRpcRequest, $host));
// Re-assign the reseller information back to the order

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getOrderReseller',
'params' => array($sessionID, $RefNo)
);
var_dump(callRPC((Object)$jsonRpcRequest, $host));
// Display the updated reseller information

Response parameters

Parameter
Type

Result

Boolean

Last updated

Was this helpful?