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

API
Главная / API - Updating the order contact data

Updating the order contact data

Обновлено 20.05.2022
99 кб

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.

"Anonymous" receiver - a receiver on whom minimum info was provided.Delovye Linii company allows providing minimum information on the receiver - only name and phone number. In this case SMS with a code is sent to the phone number. The code is used to receive the goods. For more information see the description of Simplified Shipping service on Delovye Linii company website

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
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYes
stringSession ID. To get the session ID, use "User authorization" service.

orderID

Yesstring

Number of the order to be modified

members

Yesobject

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

Sender contact information to be modified

members.receiverNoMemberReceiver contact information to be modified

Member
Member
ParameterRequiredTypeDescription
contactIDsNo*
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

phoneIDsNo*
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.nameNostringContact person name
phoneNumbersNo*
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.numberNostring

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.extNo
stringExtension 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
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 is returned. In case of error - 400

metadata.generated_atstring

Server response date and time.

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

dataobjectSuccess confirmation
data.statusstring

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.