Available counterparties
General information
The service allows getting the list of counterparties with the access to the account.
Available counterparties
One account can be associated with several counterparties, that is, it possible to process orders, get information about the settlements and perform other actions on behalf of different counterparties from one account.
This method allows:
- getting basic information about counterparties that are associated with certain account;
- getting full information about counterparties that are associated with certain account;
- getting information on the cash flow for each counterparty;
- changing the current counterparty in the personal account.
The "Available counterparties" and counterparties from the address book are different concepts. The "Available counterparties" method allows obtaining information on legal entities/individuals associated with the account, on whose behalf an order can be placed, while the address book stores data of counterparties that are not related to the current account, the address book data is used to speed up the ordering process.
Method request
Request structure
Method address: https://api.dellin.ru/v2/counteragents.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "cauid": "00000000-0000-0000-0000-000000000000", "fullInfo": true }
Method address: https://api.dellin.ru/v2/counteragents.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionid>00000000-0000-0000-0000-000000000000</sessionid> <cauid>00000000-0000-0000-0000-000000000000</cauid> <fullInfo>true</fullInfo> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | To get the session ID, use the User Authorization method |
cauid | No | string | |
fullInfo | No | boolean | Flag for requesting detailed information as well as the information on the cash flow for each counterparty |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "counteragents":[ { "balance":{ "opening":{ "date":"2016-04-01 00:00:00", "sum":380 }, "closing":{ "date":"2016-04-30 23:59:59", "sum":0 } }, "info":{ "sharedTo":[ { "phone":"+7 (111) 111-11-11", "name":"ФИО", "email":"Pushkino_auto@dellin.ru" }, { "phone":"+7 (444) 444-44-44", "name":"ФИО", "email":"Petr.Petrov@dellin.ru" } ], "accessLevel":2, "requestComment":null, "managerEmail":"Ivan.Ivanov@dellin.ru", "managerPhone":"+7 (911) 232-95-50", "sharedFrom":{ "phone":"+7 (111) 111-11-11", "name":"ФИО", "email":"ssidorov@dellin.ru" }, "managerName":"Иванов Иван Иванович" }, "isCurrent":true, "uid":"00000000-0000-0000-0000-000000000000", "juridical":true, "inn":"1234567890", "document":{ "type":"passport", "serial":"0000", "number":"123456" }, "name":"ООО \"Компания\"", "cashOnDeliveryAvailable":true } ] } }
<response> </metadata> <data> <counteragents> <balance> <opening> <date>2016-04-01 00:00:00</date> <sum>380</sum> </opening> <closing> <date>2016-04-30 23:59:59</date> <sum>0</sum> </closing> </balance> <info> <sharedTo> <phone>+7 (111) 111-11-11</phone> <name>ФИО</name> <email>Pushkino_auto@dellin.ru</email> </sharedTo> <sharedTo> <phone>+7 (444) 444-44-44</phone> <name>ФИО</name> <email>Petr.Petrov@dellin.ru</email> </sharedTo> <accessLevel>2</accessLevel> <requestComment /> <managerEmail>Ivan.Ivanov@dellin.ru</managerEmail> <managerPhone>+7 (911) 232-95-50</managerPhone> <sharedFrom> <phone>+7 (111) 111-11-11</phone> <name>ФИО</name> <email>ssidorov@dellin.ru</email> </sharedFrom> <managerName>Иванов Иван Иванович</managerName> </info> <isCurrent>true</isCurrent> <uid>00000000-0000-0000-0000-000000000000</uid> <juridical>true</juridical> <inn>1234567890</inn> <document> <type>passport</type> <serial>0000</serial> <number>123456</number> </document> <name>ООО "Компания"</name> <cashOnDeliveryAvailable>true</cashOnDeliveryAvailable> </counteragents> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Parameter | Type | Description |
metadata | object | System information |
metadata.status | integer | Emulated status http-code. If successful, code 200 is returned |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Counterparties data |
data.counteragents | array of Counteragents | Array of available counterparties |
Counteragents
Response.Counteragents | ||
---|---|---|
Parameter | Type | Description |
balance | object | Counterparty cash flow. If no settlements were made, the parameter value is "null". The parameter is present in the response only if "fullInfo" parameter with value "true" was passed in the request |
balance.opening | Balance | Counterparty balance at the beginning of the period |
balance.closing | Balance | Counterparty balance at the end of the period (or the current date, if period is not over) |
info | object | Full information about the counterparties. The parameter is present in the response only if "fullInfo" parameter with value "true" was passed in the request |
info.sharedTo | array of Shared | Information about the users with the access to the account |
info.accessLevel | integer | Current access level. Possible values:
To get full access, confirm the account in the personal cabinet of Delovye Linii company website (send a copy of your passport or application) or come to the company terminal |
info.requestComment | string | Comment (in case the access has been denied) |
info.managerEmail | string | Client manager email |
info.managerPhone | string | Client manager phone number |
info.sharedFrom | Shared | Information about the user who has granted access to the personal account |
info.managerName | string | Client manager full name |
isCurrent | boolean | Selected counterparty flag. If request contained parameter "cauid", then in the response the "isCurrent" parameter value for the counterparty whose UID was passed in the request will be "true" |
uid | string | Counterparty UID |
juridical | boolean | Flag indicating that counterparty is a legal entity (not an individual). The parameter is present in the response only if "fullInfo" parameter with value "true" was passed in the request |
inn | string | TIN (taxpayer identification number) - for legal entities, if counterparty is an individual ("juridical" parameter value is "false"), then the parameter value is "null". The parameter is present in the response only if "fullInfo" parameter with value "true" was passed in the request |
document | object | Identification document data - for individuals, if counterparty is a legal entity ("juridical" parameter value is "true"), then the parameter value is "null". The parameter is present in the response only if "fullInfo" parameter with value "true" was passed in the request |
document.type | string | Document type. Possible values:
|
document.serial | string | Document series |
document.number | string | Document number. Number format may vary depending on the country |
name | string | Counterparty name |
cashOnDeliveryAvailable | boolean | Flag indicating that cash on delivery type of payment is available to counterparty |
Balance
Balance | ||
---|---|---|
Parameter | Type | Description |
date | string | Period beginning/end date Format: YYYY-MM-DD HH:MM:SS |
sum | integer | Amount at the period beginning/end, rubles |
Shared
Shared | ||
---|---|---|
Parameter | Type | Description |
phone | string | User phone number |
name | string | User full name |
string | User email |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.