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

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

Available counterparties

Обновлено 24.05.2018
79 кб

General information

This service allows you to get the list of counterparties with information about the access level or the status of access request.

List of available counterparties

Each personal account may have access to few counterparties, that is, it may have a right to process orders, get information about the settlements and perform other actions on behalf of different counterparties. 

This method allows:

  • to get basic information about counterparties that are available for certain personal account;
  • to get full information about counterparties that are available for certain personal account;
  • to get information about rejected counterparties;
  • to change the current counterparty in the personal account.

Method request

Request example

Method address: https://api.dellin.ru/v1/customers/counteragents.json 

{
   "appkey":"00000000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "cauid": "00000000-0000-0000-0000-000000000001",
   "full_info": true
}

Method address: https://api.dellin.ru/v1/customers/counteragents.xml

<request>
   <appkey>00000000-0000-0000-000000000000</appkey>
   <sessionid>00000000-0000-0000-0000-000000000000</sessionid>
   <cauid>00000000-0000-0000-0000-000000000001</cauid>
   <full_info>true</full_info>
</request>

Description of parameters

Request
ParameterR*TypeDescription
appkeyYesstring

Application key. To get the key, register

sessionID

YesstringTo get the session ID, use the User Authorization method
cauidNostring

UID of the counterparty that needs to be chosen in order to perform operations on its behalf during the current session. It's possible to change the default counterpary to the needed one by using this parameter.

full_infoNoboolean

Flag for requesting full information about all available counterparties and the list of rejected counterparties

Method response

Response example 

{  
   "counteragents":[  
      {  
         "info":{  
            "shared_to":[  
               {  
                  "phone":"+7 (111) 111-11-11",
                  "name":"ФИО",
                  "email":"Pushkino_auto@dellin.ru"
               },
               {  
                  "phone":"+7 (444) 444-44-44",
                  "name":"ФИО",
                  "email":"Petr.Petrov@dellin.ru"
               }
            ],
            "access_level":2,
            "request_comment":null,
            "manager_email":"Ivan.Ivanov@dellin.ru",
            "manager_phone":"+7 (911) 232-95-50",
            "shared_from":{  
               "phone":"+7 (111) 111-11-11",
               "name":"ФИО",
               "email":"ssidorov@dellin.ru"
            },
            "manager_name":"Иванов Иван Иванович"
         },
         "is_current":true,
         "uid":"00000000-0000-0000-0000-000000000000",
         "name":"ООО \"Компания\"",
         "cash_on_delivery_available":true
      }
   ]
}
<response>
   <counteragents>
      <info>
         <shared_to>
            <phone>+7 (111) 111-11-11</phone>
            <name>ФИО</name>
            <email>Pushkino_auto@dellin.ru</email>
         </shared_to>
         <shared_to>
            <phone>+7 (444) 444-44-44</phone>
            <name>ФИО</name>
            <email>Petr.Petrov@dellin.ru</email>
         </shared_to>
         <access_level>2</access_level>
         <request_comment />
         <manager_email>Ivan.Ivanov@dellin.ru</manager_email>
         <manager_phone>+7 (911) 232-95-50</manager_phone>
         <shared_from>
             <phone>+7 (111) 111-11-11</phone>
             <name>ФИО</name>
             <email>nbeeva@dellin.ru</email>
         </shared_from>
         <manager_name>Иванов Иван Иванович</manager_name>
      </info>
      <is_current>true</is_current>
      <uid>00000000-0000-0000-0000-000000000000</uid>
      <name>ООО "Компания"</name>
      <cash_on_delivery_available>true</cash_on_delivery_available>
   </counteragents>
</response>

Description of parameters

Response
ParameterTypeDescription
counteragentsarray of Response.CounteragentsArray of available counterparties

Response.Counteragents
ParameterTypeDescription
infoResponse.Counteragents.InfoFull information about the counterparties
is_currentboolean

Indicator showing whether counterparty is the current one in the personal account.

If request contained parameter "cauid" with counterparty UID, then the answer will contain parameter "is_current" = "true" for that counterparty

uidstringCounterparty UID
namestringCounterparty name
cash_on_delivery_availableboolean

Indicator showing whether counterparty may process orders with cash on delivery

Response.Counteragents.Info
ParameterTypeDescription
shared_toarray of Response.Counteragents.Info.SharedTo

Information about the users who have access to the the personal account

access_levelinteger

Current access level:

  • 0 = access request in process
  • 1 = access denied
  • 2 = full access
  • 3 = partial access
request_commentstringComment (in case of denial of access)
manager_emailstringE-mail of client manager
manager_phonestringPhone number of client manager
shared_fromobject

Information about the user who granted access to the personal account

shared_from.phonestringUser phone number
shared_from.namestringUser full name
shared_from.emailstringUser e-mail
manager_namestringFull name of client manager

Response.Counteragents.Info.SharedTo
ParameterTypeDescription
phonestringPhone number of the user who has access to the the personal account
namestringUser full name
emailstringUser e-mail