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

API
Главная / API - Suspension and resumption

Suspension and resumption of the cargo delivery

Обновлено 25.05.2018
98 кб

General information

This service allows you to check the possibility of suspension and resumption of the cargo delivery as well as suspend or resume delivery from the mobile app.

This function duplicates the similar funciton of personal account with the next limitation: mobile app includes only the part that is available for users with full access to the counterparty that is the sender.

Checking the possibility of suspension and resumption of the cargo delivery

Method request

Request example

Method address: https://api.dellin.ru/v1/customers/order/change_available.json

{   
   "appkey":"00000000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"345235"
}

Method address: https://api.dellin.ru/v1/customers/order/change_available.xml

<request>
   <appkey>00000000-0000-0000-000000000000</appkey>
   <sessionid>00000000-0000-0000-0000-000000000000</sessionid>
   <orderid>345235</orderid>
</request>

Description of parameters

Request
ParameterR*TypeDescription
appkeyYesstringApplication key. To get the key, register

sessionID

YesstringTo get the session ID, use the User Authorization method

orderID

YesstringID of the order on which you need to check the possibility of suspension and resumption of the cargo delivery

Method response

Response example

{
   "services":[
      {
         "code":"suspend",
         "displayName":"Приостановка выдачи груза",
         "itemData":{
            "terminalInfo":"Груз по вашему заказу прибудет на терминал по адресу г. Омск, 10 лет Октября ул., 180 Б лит. Б",
            "availableTill":"2018-06-10",
            "warning":"Выполнение запроса не гарантировано при подаче запроса после 17:00 текущего дня по местному времени терминала выдачи.",
            "terminalId":53,
            "stateInfo":"Приостановка выдачи груза получателю может потребовать оплаты хранения. Груз не будет выдан получателю до указанной вами даты либо до отмены запрета на выдачу."
         }
      }
   ]
}
<response>
   <services>
      <code>suspend</code>
      <displayName>Приостановка выдачи груза</displayName>
      <itemData>
         <terminalInfo>Груз по вашему заказу прибудет на терминал по адресу г. Омск, 10 лет Октября ул., 180 Б лит. Б</terminalInfo>
         <availableTill>2018-06-10</availableTill>
         <warning>Выполнение запроса не гарантировано при подаче запроса после 17:00 текущего дня по местному времени терминала выдачи.</warning>
         <terminalId>53</terminalId>
         <stateInfo>Приостановка выдачи груза получателю может потребовать оплаты хранения. Груз не будет выдан получателю до указанной вами даты либо до отмены запрета на выдачу.</stateInfo>
      </itemData>
   </services>
</response>

Description of parameters

Response
ParameterTypeDescription
servicesarray of Response.Services

List of available services

Response.Services
ParameterTypeDescription
codestring

Code of the service.

Possible values:

  • "suspend" - suspension of the cargo delivery
  • "resume" - resumption of the cargo delivery
displayNamestringService name that is displayed in mobile app
itemDataobjectList of service attributes
itemData.terminalInfostring

Information about the terminal at which the cargo is located

itemData.availableTillstring

Date until which the delivery suspension/resumption is available (inclusive)

Format: YYYY-MM-DD

itemData.warningstring

Warning text in case of choice of the earliest available date.

Default value:

  • if "code" = suspend: "Request execution is not guaranteed in case of its submission after 17:00 by local time of the terminal of delivery."
  • if "code" = resume: "Delivery resumption is not guaranteed in case of request submission in the evening. Information about the delivery resumption will appear in the order card."
itemData.terminalIdinteger

Terminal ID

itemData.stateInfostringGeneral information about delivery. Depends on the status

Delivery suspension

Method request

Request example

Method address: https://api.dellin.ru/v1/customers/order/suspend.json

{   
   "appkey":"00000000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"345235",
   "suspendDate":"2018-05-31"
}

Method address: https://api.dellin.ru/v1/customers/order/suspend.xml

<request>
   <appkey>00000000-0000-0000-000000000000</appkey>
   <sessionid>00000000-0000-0000-0000-000000000000</sessionid>
   <orderid>345235</orderid>
   <suspendDate>2018-05-31</suspendDate>
</request>

Description of parameters

Request
ParameterR*TypeDescription
appkeyYesstringApplication key. To get the key, register

sessionID

YesstringTo get the session ID, use the User Authorization method

orderID

YesstringID of the order on which you need to suspend the cargo delivery
suspendDateYes
string

Date until which the delivery suspension is required

Method response

Response example

{  
   "status":"error",
   "errors":{  
      "orderID":"Операция недоступна",
      "suspendDate":"Требуется"
   }
}
<response>
   <status>error</status>
   <errors>
      <orderid>Операция недоступна</orderid>
      <suspenddate>Требуется</suspenddate>
   </errors>
</response>

Description of parameters

Response
ParameterTypeDescription
statusstring

Request status.

Possible values:

  • "success"
  • "error"
errorsResponse.Errors

List of errors with their reasons.

Object is present only if "status" ="error".

(Description of errors in example above: "orderID" - operation unavailable; "suspendDate" - required)

Delivery resumption

Method request

Request example

Method address: https://api.dellin.ru/v1/customers/order/resume.json

{   
   "appkey":"00000000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"345235",
   "resumeDate":"2018-05-25"
}

Method address: https://api.dellin.ru/v1/customers/order/resume.xml

<request>
   <appkey>00000000-0000-0000-000000000000</appkey>
   <sessionid>00000000-0000-0000-0000-000000000000</sessionid>
   <orderid>345235</orderid>
   <resumedate>2018-05-25</resumedate>
</request>

Description of parameters

Request
ParameterR*TypeDescription
appkeyYesstringApplication key. To get the key, register

sessionID

YesstringTo get the session ID, use the User Authorization method

orderID

YesstringID of the order on which you need to resume the cargo delivery
resumeDateYesstring

Date since which the delivery resumption is required

Response of the method "Delivery resumption" is similar to the response of the method "Delivery suspension".