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

API
Главная / API - Cancelling delivery from/to the add

Cancelling delivery from/to the address

Обновлено 28.08.2020
95 кб

General information 

The service allows to cancel the delivery from the sender'/to the receiver's address. In case of cancelling the delivery from the sender's address the client will have to place a new order for the delivery from the terminal (see "Orders for shipping from the personal account" method). In case of cancelling the delivery to the sender's address the receiver will have to pick up the cargo from Delovye Linii company terminal.

To check the possibility of cancelling the delivery from/to the address, use Checking possibility to change the order method.

Cancelling delivery from the sender's address

Method request

Request example

Method address: https://api.dellin.ru/v3/orders/cancel_pickup.json 

{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"00000000",
   "contactIDs":[
      12345678,
      78456123
   ],
   "contactPersons":[
      {
         "name":"Иван Иванович"
      },
      {
         "name":"Петр Петрович"
      }
   ],
   "phoneIDs":[
      98765412,
      65478921
   ],
   "phoneNumbers":[
      {
         "number":"79213332211",
         "ext":"0123"
      }
   ]
}

Method address: https://api.dellin.ru/v3/orders/cancel_pickup.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>00000000</orderID>
   <contactIDs>12345678</contactIDs>
   <contactIDs>78456123</contactIDs>
   <contactPersons>
      <name>Иван Иванович</name>
   </contactPersons>
   <contactPersons>
      <name>Петр Петрович</name>
   </contactPersons>
   <phoneIDs>98765412</phoneIDs>
   <phoneIDs>65478921</phoneIDs>
   <phoneNumbers>
      <number>79213332211</number>
      <ext>0123</ext>
   </phoneNumbers>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription

appkey

YesstringApplication key. To get the key, register
sessionIDYesstringSession ID. To get the session ID, use User authorization service

orderID

YesstringThe number of the order for which it is necessary to cancel the delivery from the sender's address

contactIDs

No*array of integer

Contact persons IDs from address book.

Maximum 3 elements in the array.

*One of the two excluding parameters - "contactIDs" or"contactPersons" - is required

contactPersons

No*array of contactPersons

Contact persons data.

Maximum 3 elements in the array.

*One of the two excluding parameters - "contactIDs" or"contactPersons" - is required

contactPersons.name

YesstringContact person name

phoneIDs

No*array of integer

Phone number IDs from address book.

Maximum 3 elements in the array

*One of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required

phoneNumbers

No*array of phoneNumbers

Phone numbers list.

Maximum 3 elements in the array

*One of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required

phoneNumbers.number

YesstringPhone number. 15 characters maximum (the only valid non-digit sign is the plus sign at the beginning of the string)

phoneNumbers.ext

NostringExtension phone number. 5 digits maximum

Method response

Response example

{
   "metadata":{
      "status":200,
      "generated_at":"2019-11-18 12:52:26"
   },
   "data":{
      "status":"success",
      "info": "Отмена доставки от адреса будет бесплатной до 17:00 (по местному времени) дня, предшествующего дню доставки."
   }
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2019-11-18 12:52:26</generated_at>
   </metadata>
   <data>
      <status>success</status>
      <info>Отмена доставки от адреса будет бесплатной до 17:00 (по местному времени) дня, предшествующего дню доставки.</info>
   </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"

data.infostringFree cancellation information

Error handling

Except for common API errors the method response may contain the following errors:

Error numberhttp-codeError titleError description
TitleTranslationDescriptionTranslation

620001

400По данному заказу отмена доставки груза от адреса недоступнаThe delivery from the address for the order can not be cancelled--

620002

400По данному заказу отмена доставки груза от адреса недоступнаThe delivery from the address for the order can not be cancelledИзменение по данному заказу недоступно в связи с отсутствием доступаIt is not possible to change the order details since there is no access

Cancelling delivery to the receiver's address

Method request

Request example

Method address: https://api.dellin.ru/v3/orders/cancel_delivery.json 

{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"00000000",
   "requester":"customer",
   "contactIDs":[
      12345678,
      78456123
   ],
   "contactPersons":[
      {
         "name":"Иван Иванович"
      },
      {
         "name":"Петр Петрович"
      }
   ],
   "phoneIDs":[
      98765412,
      65478921
   ],
   "phoneNumbers":[
      {
         "number":"79213332211",
         "ext":"0123"
      }
   ]
}

Method address: https://api.dellin.ru/v3/orders/cancel_delivery.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>00000000</orderID>
   <requester>customer</requester>
   <contactIDs>12345678</contactIDs>
   <contactIDs>78456123</contactIDs>
   <contactPersons>
      <name>Иван Иванович</name>
   </contactPersons>
   <contactPersons>
      <name>Петр Петрович</name>
   </contactPersons>
   <phoneIDs>98765412</phoneIDs>
   <phoneIDs>65478921</phoneIDs>
   <phoneNumbers>
      <number>79213332211</number>
      <ext>0123</ext>
   </phoneNumbers>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription

appkey

YesstringApplication key. To get the key, register
sessionIDYesstringSession ID. To get the session ID, use User authorization service

orderID

YesstringThe number of the order for which it is necessary to cancel the delivery to the receiver's address or the number of the related document - the waybill or the order
requesterYesstring

Role of the user requesting to cancel the delivery.

Possible values:

  • "sender";
  • "receiver";
  • "customer"

contactIDs

No*array of integer

Contact persons IDs from address book.

Maximum 3 elements in the array

*If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "contactIDs" or"contactPersons" - is required

contactPersons

No*array of contactPersons

Contact persons data.

Maximum 3 elements in the array

*If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "contactIDs" or"contactPersons" - is required

contactPersons.name

YesstringContact person name

phoneIDs

No*array of integer

Phone number IDs from address book.

Maximum 3 elements in the array

*If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required

phoneNumbers

No*array of phoneNumbers

Phone numbers list.

Maximum 3 elements in the array

*If the request to cancel the delivery is submitted by the customer ("requester" parameter value is "customer"), then one of the two excluding parameters - "phoneIDs" or"phoneNumbers" - is required

phoneNumbers.number

YesstringPhone number. 15 characters maximum (the only valid non-digit sign is the plus sign at the beginning of the string)

phoneNumbers.ext

NostringExtension phone number. 5 digits maximum

Method response

Response of the method "Cancelling delivery to the receiver's address"  is similar to the response of the method "Cancelling delivery from the sender's address"

Error handling

Except for common API errors the method response may contain the following errors:

Error numberhttp-codeError titleError description
TitleTranslationDescriptionTranslation

615001

400По данному заказу отмена доставки груза до адреса недоступнаThe delivery to the address for the order can not be cancelled--

615002

400По данному заказу отмена доставки груза до адреса недоступнаThe delivery to the address for the order can not be cancelledИзменение по данному заказу недоступно в связи с отсутствием доступаIt is not possible to change the order details since there is no access

615003

400Указанная роль заказчика для данного заказа недоступнаThe specified requester role is not allowable for the order--

615004

400Нет доступа к контрагенту заказаNo access to the counterparty--