Updating the order contact data
General information
The service allows changing the sender and the receiver contact data (it is not possible to change the contact data of "anonymous" receiver, see below). It is only possible to change the contact information for orders that can be accessed from the current user account. To check the possibility of changing, use "Checking possibility to change the order" method. The changes do not come into effect immediately. To check the change request status use "Change history" method.
Updating the order contact data
Method request
Request structure
Method address: https://api.dellin.ru/v3/orders/change_contacts.json
{ "appkey":"00000000-0000-0000-0000-000000000000", "sessionID":"00000000-0000-0000-0000-000000000000", "orderID":"1900395024773", "members":{ "sender":{ "contactIDs":[ 15637261, 15638153, 15638154 ], "phoneIDs":[ 19501308, 19501311, 19501312 ], "contactPersons":[ { "name":"senderContact1" }, { "name":"senderContact2" }, { "name":"senderContact3" } ], "phoneNumbers":[ { "number":"79620000000", "ext":"3567" }, { "number":"79510000000" }, { "number":"79500000000" } ] }, "receiver":{ "contactIDs":[ 15638146 ], "phoneIDs":[ 19501297 ], "contactPersons":[ { "name":"receiverContact" } ], "phoneNumbers":[ { "number":"79520000000" } ] } } }
Method address: https://api.dellin.ru/v3/orders/change_contacts.xml
<request> <appkey>00000000-0000-0000-0000-000000000000</appkey> <sessionID>00000000-0000-0000-0000-000000000000</sessionID> <orderID>1900395024773</orderID> <members> <sender> <contactIDs>15637261</contactIDs> <contactIDs>15638153</contactIDs> <contactIDs>15638154</contactIDs> <phoneIDs>19501308</phoneIDs> <phoneIDs>19501311</phoneIDs> <phoneIDs>19501312</phoneIDs> <contactPersons> <name>senderContact1</name> </contactPersons> <contactPersons> <name>senderContact2</name> </contactPersons> <contactPersons> <name>senderContact3</name> </contactPersons> <phoneNumbers> <number>79620000000</number> <ext>3567</ext> </phoneNumbers> <phoneNumbers> <number>79510000000</number> </phoneNumbers> <phoneNumbers> <number>79500000000</number> </phoneNumbers> </sender> <receiver> <contactIDs>15638146</contactIDs> <phoneIDs>19501297</phoneIDs> <contactPersons> <name>receiverContact</name> </contactPersons> <phoneNumbers> <number>79520000000</number> </phoneNumbers> </receiver> </members> </request>
Description of parameters
Request
Request | |||
---|---|---|---|
Parameter | Required | Type | Description |
appkey | Yes | string | Application key. To get the key, register |
sessionID | Yes | string | Session ID. To get the session ID, use "User authorization" service. |
orderID | Yes | string | Number of the order to be modified |
members | Yes | object | Contact information to be modified. It is possible to transfer new contact data or update information already stored in the address book of the personal account |
members.sender | No | Member | Sender contact information to be modified |
members.receiver | No | Member | Receiver contact information to be modified |
Member
Member | |||
---|---|---|---|
Parameter | Required | Type | Description |
contactIDs | No* | array of integers | IDs of the contact persons from "Address book". Maximum 3 elements in the array. *The parameter is not required and is ignored if the user is not authorized. *Only one of the following parameters can be passed in the request: contactIDs or contactPersons |
phoneIDs | No* | array of integers | IDs of phone numbers from "Address book". Maximum 3 elements in the array. *The parameter is not required and is ignored if the user is not authorized. *Only one of the following parameters can be passed in the request: phoneIDs or phoneNumbers |
contactPersons | No* | array of ContactPersons | List of contact persons. Maximum 3 elements in the array. *Only one of the following parameters can be passed in the request: contactIDs or contactPersons |
contactPersons.name | No | string | Contact person name |
phoneNumbers | No* | array of PhoneNumbers | List of phone numbers. Maximum 3 elements in the array. *Only one of the following parameters can be passed in the request: phoneIDs or phoneNumbers |
phoneNumbers.number | No | string | Contact person 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) |
phoneNumbers.ext | No | string | Extension number. 4 characters maximum |
Method response
Response structure
{ "metadata":{ "status":200, "generated_at":"2019-11-18 12:52:26" }, "data":{ "status":"success" } }
<response> <metadata> <status>200</status> <generated_at>2019-11-18 12:52:26</generated_at> </metadata> <data> <status>success</status> </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. In case of error - 400 |
metadata.generated_at | string | Server response date and time. Format: YYYY-MM-DD HH:MM:SS |
data | object | Success confirmation |
data.status | string | Status in English. Possible value - "success" "Success" status indicates that the request was accepted. To check the change request status use "Change history" method |
Error handling
The common API errors are used with the method, for errors format description and errors list see Errors of API methods.