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

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

Updating the order contact data

Обновлено 30.03.2020
85 кб

General information 

The service allows to change 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.

"Anonymous" receiver - a receiver on whom minimum info was provided.Delovye Linii company allows to provide 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 example

Method address: https://api.dellin.ru/v1/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/v1/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

ID 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 integer

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 integer

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

Format: 79ХХХХХХХХХ (11 characters starting with 7)

phoneNumbers.extNo
stringExtension number. 4 characters maximum

Method response

Response example

{
   "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"

Error handling

The common API errors are used with the method, for errors format description and errors list see Errors of API methods.