Поиск по сайту

API
Главная / API - Available counterparties

Available counterparties

Обновлено 18.01.2022
115 кб

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
ParameterRequiredTypeDescription
appkeyYesstring

Application key. To get the key, register

sessionID

YesstringTo get the session ID, use the User Authorization method

cauid

Nostring

UID of the counterparty that needs to be chosen in order to perform operations on its behalf during the current session. The parameter allows changing the default counterparty to another one.

fullInfo

Noboolean

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
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

Format: YYYY-MM-DD HH:MM:SS

dataobjectCounterparties data
data.counteragentsarray of CounteragentsArray of available counterparties

Counteragents
Response.Counteragents
ParameterTypeDescription
balanceobject

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.openingBalanceCounterparty balance at the beginning of the period
balance.closingBalanceCounterparty balance at the end of the period (or the current date, if period is not over)
infoobject

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.sharedToarray of SharedInformation about the users with the access to the account
info.accessLevelinteger

Current access level.

Possible values:

  • 0 = access request in process;
  • 1 = access denied;
  • 2 = full access;
  • 3 = partial access
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.requestCommentstringComment (in case the access has been denied)
info.managerEmailstringClient manager email
info.managerPhonestringClient manager phone number
info.sharedFromSharedInformation about the user who has granted access to the personal account
info.managerNamestringClient manager full name
isCurrentboolean

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" 

uidstringCounterparty UID
juridicalboolean

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

innstring

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

documentobject

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.typestring

Document type.

Possible values:

  • "passport";
  • "drivingLicence";
  • "foreignPassport" - international passport
document.serialstringDocument series
document.numberstringDocument number. Number format may vary depending on the country
namestringCounterparty name
cashOnDeliveryAvailableboolean

Flag indicating that cash on delivery type of payment is available to counterparty

Balance

Balance

ParameterTypeDescription
datestring

Period beginning/end date

Format: YYYY-MM-DD HH:MM:SS

sumintegerAmount at the period beginning/end, rubles

Shared
Shared
ParameterTypeDescription
phonestringUser phone number
namestringUser full name
emailstringUser email

Error handling

The common API errors are used with the method, for errors format description and errors list see Errors of API methods.