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

API
Главная / API - Directories

Directories

Обновлено 30.10.2023
220 кб

General information

The service allows getting the data from the directories.

Methods request

All method requests have the same structure.

Request structure

{
   "appkey": "00000000-0000-0000-0000-000000000000"
}
<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
</request>

Description of parameters

ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register

Methods response

The following directories have the same response structure (the response contains a link to download the CSV file):

  • Directory of additional services.
  • Nature of cargo.
  • Documents for receipt of cargo.
  • Directory of parameters for statistics report.

Responses of other methods are described in the corresponding sections.

Response structure

{
   "hash": "1707aea20f301fd0a8787b5a68608dd6cf270347ea04c266f1b4c6aa540088a4",
   "url": "https://api.dellin.ru/catalog/[filename].csv?sk=Kn0OtWJcumDYUqRjtCEvhg&e=1401285434"
}
<response>
   <hash>1707aea20f301fd0a8787b5a68608dd6cf270347ea04c266f1b4c6aa540088a4</hash>
   <url>https://api.dellin.ru/catalog/[filename].csv?sk=Kn0OtWJcumDYUqRjtCEvhg&e=1401285434</url>
</response>

Description of parameters

ParameterTypeDescription
hashstring

File hash code (MD5). By comparing the hash codes of two files received at different time it is possible to establish whether the data in the directory has changed or not

urlstring

Link to the file with directory data in csv format in utf-8 encoding (the link is valid for 10 minutes). The file should be updated once a month.

Instead of "[filename]", the link contains a name that matches the keyword in the name of the corresponding method.

The line delimiter in the file is the character "\n", the column delimiter is comma (","), and the text delimiter is the quotation mark (" " ").

For file content description see the corresponding method description

Errors handling

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

Directory of additional services

Is used to calculate the order cost or place an order. See:

Method address:

The file located by the link in the response contains the following columns:

  • id - unique identifier;
  • uid - unique identifier for relation with other methods;
  • name - service name.

Nature of cargo

Method address:

The file located by the link in the response contains the following columns:

  • UID - unique identifier;
  • description - name of the nature of cargo.

Documents for receipt of cargo

Method address:

The file located by the link in the response contains the following columns:

  • UID - unique identifier;
  • name - name of the document;
  • day_to_day - flag indicating the possibility of receiving cargo on the same day using this document.

Directory of parameters for statistics report

Method address:

The file located by the link in the response contains the following columns:

  • name - parameter name (key; in Latin);
  • сaption - parameter name (in Cyrillic).

Directory of vehicle loading types

Method address:

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2015-06-18 12:37:28"
   },
   "data":[
      {
         "uid":"0xb83b7589658a3851440a853325d1bf69",
         "name":"боковая погрузка",
         "title":"Боковая загрузка",
         "incompatible":[
            "0xabb9c63c596b08f94c3664c930e77778"
         ]
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2015-06-18 12:37:28</generated_at>
   </metadata>
   <data>
      <uid>0xb83b7589658a3851440a853325d1bf69</uid>
      <name>боковая погрузка</name>
      <title>Боковая загрузка</title>
      <incompatible>0xabb9c63c596b08f94c3664c930e77778</incompatible>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 is returned

metadata.generated_atstring

Server response date and time.

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

dataarray of DataInformation on loading types
data.uidstring

Loading type UID

data.namestring

Loading type name.

Possible values:

  • "верхняя погрузка" - top loading;
  • "боковая погрузка" - side loading
data.titlestring

Loading type short name.

Possible values:

  • "Верхняя загрузка" - top loading;
  • "Боковая загрузка" - side loading
data.incompatiblearray of stringsUIDs of loading types incompatible with the type which UID is passed in data.uid parameter

Directory of special transport requirements

Method address:

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2015-06-18 12:37:28"
   },
   "data":[
      {
         "uid":"0x92fce2284f000b0241dad7c2e88b1655",
         "name":"для погрузки необходим гидроборт",
         "title":"Гидроборт",
         "incompatible":[
            "0x88f93a2c37f106d94ff9f7ada8efe886"
         ]
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2015-06-18 12:37:28</generated_at>
   </metadata>
   <data>
      <uid>0x92fce2284f000b0241dad7c2e88b1655</uid>
      <name>для погрузки необходим гидроборт</name>
      <title>Гидроборт</title>
      <incompatible>0x88f93a2c37f106d94ff9f7ada8efe886</incompatible>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

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

dataarray of DataInformation on special transport requirements
data.uidstring

Service UID

data.namestring

Full name of the service.

For parameter values see table below

data.titlestring

Short name of the service.

For parameter values see table below

data.incompatiblearray of stringsUIDs of services types incompatible with the type which UID is passed in data.uid parameter

"response.data.name" and "response.data.title" parameters values
The table below lists possible values of "response.data.name" parameter and corresponding values of "response.data.title" parameter

data.name

data.title

"для погрузки необходим гидроборт" - tail lift is required"Гидроборт" - tail lift
"для погрузки необходим манипулятор" - crane is required"Манипулятор" - crane
"для погрузки необходима открытая машина" - open vehicle is required"Открытая машина" - open vehicle
"растентовка" - removable curtains"Растентовка" - removable curtains

Directory of packages (for v1/public/packages_available/ and v1/public/request_conditions only)

The method allows getting the list of all the packages used in the company. To get the list of packages available for the cargo with the certain parameters use "Available packages" and "Directory of additional services" methods

Method address:

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2015-06-18 12:37:28"
   },
   "data":[
      {
         "uid":"0x838FC70BAEB49B564426B45B1D216C15",
         "title":"Деревянная обрешётка",
         "name":"crate",
         "countable":"false",
         "incompatible":[
            "0x8783b183e825d40d4eb5c21ef63fbbfb",
            "0xb9f594d27a2d31b440a647d19547543c"
         ]
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2015-06-18 12:37:28</generated_at>
   </metadata>
   <data>
      <uid>0x838FC70BAEB49B564426B45B1D216C15</uid>
      <title>Деревянная обрешётка</title>
      <name>crate</name>
      <countable>false</countable>
      <incompatible>0x8783b183e825d40d4eb5c21ef63fbbfb</incompatible>
      <incompatible>0xb9f594d27a2d31b440a647d19547543c</incompatible>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

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

dataarray of DataInformation on packaging type
data.uidstring

UID

data.titlestring

Packaging type name in Russian.

For parameter values see table below

data.namestring

Packaging type conditional name in English.

For parameter values see table below

data.countablebooleanFlag indicating that several units of packaging can be ordered
data.incompatiblearray of strings

UIDs of packaging types incompatible with the type which UID is passed in data.uid parameter

"response.data.title" and "response.data.name" parameters values
The table below lists possible values of "response.data.title" parameter and corresponding values of "response.data.name" parameter

data.title

data.name

Meaning
Деревянная обрешёткаcrateWooden crate
Жёсткая коробcrate_plusWooden box
Картонные коробкиboxCardboard box
Дополнительная упаковкаtypeAdditional packaging
Деревянная обрешётка + амортизацияcrate_with_bubbleBubble wrap and wooden crate
Спец. упаковка для автостеколprotect_auto_glassSpecial packaging for auto glass
Спец. упаковка для автозапчастейprotect_auto_partSpecial packaging for auto parts
Палетный борт + амортизацияpallet_with_bubbleBubble wrap and pallet
Воздушно-пузырьковая плёнкаbubleBubble wrap
МешокbagBag
Палетный бортpalletPallet
Амортизирующая упаковкаamortizingAmortizing packaging

Directory of order statuses

Method address:

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2015-06-18 12:37:28"
   },
   "data":[
      {
         "status":"processing",
         "title":"В обработке"
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2015-06-18 12:37:28</generated_at>
   </metadata>
   <data>
      <status>processing</status>
      <title>В обработке</title>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

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

dataarray of DataInformation on order status
data.statusstringOrder status. For parameter values see table below
data.titlestringOrder status name in Russian. For parameter values see table below

"response.data.status" and "response.data.title" parameters values
The table below lists possible values of "response.data.status" parameter and corresponding values of "response.data.title" parameter

data.status

data.title

Notes
draftЧерновик-
processingВ обработке-
pickupЗабор груза от адресаCargo pickup at the sender's address
waitingОжидает сдачи на терминал-
declinedОтклонен-
receivedГруз принят к перевозке-
received_warehousingГруз принят к перевозке. Платное хранение-
inwayГруз в пути-
arrivedГруз прибыл на терминал-
warehousingГруз прибыл на терминал. Платное хранение-
arrived_to_airportГруз прибыл в аэропорт-
airport_warehousingГруз прибыл в аэропорт. Платное хранение-
deliveryДоставка груза до адресаCargo delivery to the receiver's address
accompanying_documents_returnГруз выдан. Возврат СД-
finishedЗаказ завершен-

Event types

The method allows getting the list of all possible event types for setting up order event notification subscriptions. Is used in the "Subscription creating/changing" method.

Method address: https://api.dellin.ru/v1/webhooks/events

Method response

Response structure

{
   "metadata": {
      "status": 200,
      "generated_at": "2023-06-23 12:02:06"
   },
   "data": [
      {
         "key": "order.change.delivery_cancel",
         "description": "Отмена доставки",
         "public": false
      },
      {
         "key": "order.change.delivery_info",
         "description": "Изменение данных доставки",
         "public": false
      }
   ]
}
<>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusintegerEmulated status http-code. If successful, code 200 is returned
metadata.generated_atstring

Server response date and time.

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

dataarray of DataList of event types
Data
Data
ParameterTypeDescription

key

string

Event type.

Format: <matter>.<group of events>.<event>

Examples:

  • "order.state.processing",
  • "order.state.declined",
  • "order.change.pickup_info"

For parameter values and description see table below

publicboolean

Indicator of availability of the event subscription setting for a user who is not a participant in the transportation.

Possible values

  • True - available for any user,
  • False - available for transportation participants only 

"response.data.key" parameters values
The table below lists possible values of "response.data.key" parameter
MatterGroup of eventsEventDescription

order

state

processing

Order in processing

declined

Order declined

pickup

Pickup date is set

waiting_departure

Cargo is accepted and awaits for departure

arrived

Сargo has arrived at the receiving terminal

paid_storage

Paid storage of cargo has begun

delivery

Date of cargo delivery to the receiver's address is set

delivered_documents_return

Cargo is delivered, the accompanying documents are sent

completed

Cargo is delivered, order completed

return

Cargo return

change

pickup_info

Cargo pickup information at the dispatch address is changed

pickup_cancel

Cargo pickup at the dispatch address is cancelled

delivery_info

Cargo delivery information at the delivery address is changed

delivery_cancel

Cargo delivery to the delivery address is cancelled

payer

Payer is changed

receiver

Receiver is changed