Deleting objects from address book
General information
This service allows deleting counterparties, addresses, contact persons and phones from the address book.
Deleting of objects from the address book
Method request
Request example
Method address: https://api.dellin.ru/v2/book/delete.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "counteragentIDs":[ 123, 345 ], "addressIDs":[ 3, 2, 1 ], "phoneIDs":[ 1, 2 ], "contactIDs":[ 1, 2, 3 ] }
Method address: https://api.dellin.ru/v2/book/delete.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <counteragentIDs>123</counteragentIDs> <counteragentIDs>345</counteragentIDs> <addressIDs>3</addressIDs> <addressIDs>2</addressIDs> <addressIDs>1</addressIDs> <phoneIDs>1</phoneIDs> <phoneIDs>2</phoneIDs> <contactIDs>1</contactIDs> <contactIDs>2</contactIDs> <contactIDs>3</contactIDs> </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 |
counteragentIDs | No | array of integer | Array of ID's of counterparties that need to be deleted |
addressIDs | No | array of integer | Array of ID's of addresses that need to be deleted |
phoneIDs | No | array of integer | Array of ID's of phone numbers that need to be deleted |
contactIDs | No | array of integer | Array of ID's of contact persons that need to be deleted |
Method response
Response example
{ "metadata":{ "status":200, "generated_at":"2015-06-18 12:37:28" }, "data":{ "deleted":{ "counteragentIDs":[ 123 ], "addressIDs":[ 3, 2, 1 ], "contactIDs":[ 1, 2, 3 ], "phoneIDs":[ 1, 2 ] }, "notDeleted":{ "counteragentIDs":[ 123 ], "addressIDs":[ 6, 5, 4 ], "contactIDs":[ 4, 5, 6 ], "phoneIDs":[ 3, 4 ] } } }
<response> <metadata> <status>200</status> <generated_at>2015-06-18 12:37:28</generated_at> </metadata> <data> <deleted> <counteragentIDs>123</counteragentIDs> <addressIDs>3</addressIDs> <addressIDs>2</addressIDs> <addressIDs>1</addressIDs> <contactIDs>1</contactIDs> <contactIDs>2</contactIDs> <contactIDs>3</contactIDs> <phoneIDs>1</phoneIDs> <phoneIDs>2</phoneIDs> </deleted> <notDeleted> <counteragentIDs>123</counteragentIDs> <addressIDs>6</addressIDs> <addressIDs>5</addressIDs> <addressIDs>4</addressIDs> <contactIDs>4</contactIDs> <contactIDs>5</contactIDs> <contactIDs>6</contactIDs> <phoneIDs>3</phoneIDs> <phoneIDs>4</phoneIDs> </notDeleted> </data> </response>
Description of parameters
Response
Response | ||
---|---|---|
Параметр | Тип | Описание |
metadata | object | System information |
metadata.status | string | 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 on objects to be deleted from address book |
data.deleted | Deleted | The list of objects that has been deleted from address book |
data.notDeleted | Deleted | The list of objects that has not been deleted from address book (since there is no object with the forwarded ID) |
Deleted
Deleted | ||
---|---|---|
Parameter | Type | Description |
counteragentIDs | array of integer | Array of counterparties ID's |
addressIDs | array of integer | Array of addresses ID's |
contactIDs | array of integer | Array of contact persons ID's |
phoneIDs | array of integer | Array of phone numbers ID's |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.