Getting Customer Tree in JSON-RPC API
To get a list of a customer's child partners using the customer's ID, use the GetPartnerTree
method.
Required parameters
Parameter | Description | Supported values |
---|---|---|
partnerId
|
The ID of the customer the device is created for (retrieved through the |
<std::string> |
Sample request
{ "id": "jsonrpc", "visa": "{{visa}}", "method": "GetPartnerTree", "jsonrpc": "2.0", "params": { "partnerId": 123456 } }
Sample response
{ "id": "jsonrpc", "jsonrpc": "2.0", "result": { "result": { "ActualChildCount": 4, "Children": [ { "ActualChildCount": 0, "Children": null, "Info": { "Company": { "PostAddress": null }, "ExternalPartnerProperties": null, "Id": 345678, "Level": "EndCustomer", "Name": null, "ParentId": 123456 } }, { "ActualChildCount": 1, "Children": null, "Info": { "Company": { "PostAddress": null }, "ExternalPartnerProperties": null, "Id": 456789, "Level": "EndCustomer", "Name": null, "ParentId": 273266 } }, { "ActualChildCount": 0, "Children": null, "Info": { "Company": { "PostAddress": null }, "ExternalPartnerProperties": null, "Id": 567890, "Level": "EndCustomer", "Name": null, "ParentId": 123456 } }, { "ActualChildCount": 0, "Children": null, "Info": { "Company": { "PostAddress": null }, "ExternalPartnerProperties": null, "Id": 678901, "Level": "EndCustomer", "Name": null, "ParentId": 123456 } } ], "Info": { "Company": { "PostAddress": null }, "ExternalPartnerProperties": null, "Id": 123456, "Level": "Reseller", "Name": null, "ParentId": 012345 } } }, "visa": "{{visa}}" }