Contact details
General information
Thу service allows getting the list of contact persons and phone numbers, add and edit information in the list. The entries unused for 6 months are automatically removed from the address book.
Getting the list of contact persons and phone numbers
Method request
Request structure
Method address: https://api.dellin.ru/v2/book/contacts.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "addressID":1 }
Method address: https://api.dellin.ru/v2/book/contacts.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <addressID>1</addressID> </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 |
addressID | Yes | integer | ID of address for which the list of contact persons and phone numbers is required |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "contacts":[ { "id":1, "contact":"Иван Иванович Иванов" }, { "id":3, "contact":"Петр" } ], "lastUpdate":"2019-05-18 17:23:58", "phones":[ { "id":123, "phoneNumber":"79002350122", "phoneFormatted":"+7 (900) 235-01-22", "ext":"55677" }, { "id":321, "phoneNumber":"375127789955", "phoneFormatted":"+375 (12) 778-99-55" }, { "id":456, "phoneNumber":"495778999999999999", "phoneFormatted":null, "ext":"0890" } ] } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <contacts> <id>1</id> <contact>Иван Иванович Иванов</contact> </contacts> <contacts> <id>3</id> <contact>Петр</contact> </contacts> <lastUpdate>2019-05-18 17:23:58</lastUpdate> <phones> <id>123</id> <phoneNumber>79002350122</phoneNumber> <phoneFormatted>+7 (900) 235-01-22</phoneFormatted> <ext>55677</ext> </phones> <phones> <id>321</id> <phoneNumber>375127789955</phoneNumber> <phoneFormatted>+375 (12) 778-99-55</phoneFormatted> </phones> <phones> <id>456</id> <phoneNumber>495778999999999999</phoneNumber> <phoneFormatted /> <ext>0890</ext> </phones> </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.generatedAt | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | Data | Contract persons data and phones |
Data
Data | ||
---|---|---|
Parameter | Type | Description |
contacts | array of Contacts | Array of contact persons data |
contacts.id | integer | Contact person ID |
contacts.contact | string | Contact person full name |
lastUpdate | string | Date of information last update Format: YYYY-MM-DD HH:MM:SS |
phones | array of Phones | Array of phone numbers data |
phones.id | integer | Phone number ID |
phones.phoneNumber | string | Phone number (not formatted) |
phones.phoneFormatted | string | Phone number (formatted). If it is impossible to format it by international standard, then the parameter value is "null" |
phones.ext | string | Extension phone number |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.
Contacts creating and editing
Method request
Request example (creating a contact)
Method address: https://api.dellin.ru/v2/book/contact/update.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "addressID":4, "contact":"Иван" }
Method address: https://api.dellin.ru/v2/book/contact/update.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <addressID>4</addressID> <contact>Иван</contact> </request>
Request example (editing a contact)
Method address: https://api.dellin.ru/v2/book/contact/update.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "contactID":244, "contact":"Иван Иванович" }
Method address: https://api.dellin.ru/v2/book/contact/update.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <contactID>244</contactID> <contact>Иван Иванович</contact> </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 |
addressID | No* | integer | ID of the address for which it is necessary to add a new contact. *If creating a contact, the parameter is required. If editing a contact, the parameter is not used |
contactID | No* | integer | ID of the contact that needs to be edited. *If editing a contact, the parameter is required. If creating a contact, the parameter is not used |
contact | Yes | string | Contact person full name |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "state":"new", "contactID":244 } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <state>new</state> <contactID>244</contactID> </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 | Information about the created/edited contact |
data.state | string | Contact status. Possible values:
|
data.contactID | integer | ID of the created/edited contact |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.
Phone numbers adding and editing
Method request
Request example (adding a phone number)
Method address: https://api.dellin.ru/v2/book/phone/update.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "addressID":4, "phoneNumber":"79002350122", "ext":"0867" }
Method address: https://api.dellin.ru/v2/book/phone/update.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <addressID>4</addressID> <phoneNumber>79002350122</phoneNumber> <ext>0867</ext> </request>
Request example (editing a phone number)
Method address: https://api.dellin.ru/v2/book/phone/update.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "phoneID":214, "phoneNumber":"79002350122", "ext":"0867" }
Method address: https://api.dellin.ru/v2/book/phone/update.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <phoneID>214</phoneID> <phoneNumber>79002350122</phoneNumber> <ext>0867</ext> </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 |
addressID | No* | integer | ID of address for which it is necessary to add a phone number. *If adding a phone number, the parameter is required. If editing a phone number, the parameter is not used |
phoneID | No* | integer | ID of phone number that needs to be edited. *If editing a phone number, the parameter is required. If adding a phone number, the parameter is not used |
phoneNumber | Yes | string | Phone number. Only digits and plus sign are allowed (plus can only be passed at the beginning of the string that starts with 7 or 375) |
ext | No | string | Extension phone number. Maximum length - 5 digits |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "state":"existing", "phoneID":214 } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <state>existing</state> <phoneID>214</phoneID> </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 | Information about the created/edited phone number |
data.state | string | ID of address for which addition of the contact person is done Phone number status. Possible values:
|
data.phoneID | integer | ID of the created/edited phone number |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.