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

API
Главная / API - Nature of cargo: search

Nature of cargo: search by the string

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

General information

The service allows searching for "Nature of cargo" directories items by the entered string. There are two methods: for groupage cargo transportation and for transportation by dedicated truck.

Nature of cargo: search by the string (groupage cargo transportation)

Method request

Request example

Method address: https://api.dellin.ru/v1/public/freight_types/search.json

{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "page":"2",
   "name":"коробка"
}

Method address:  https://api.dellin.ru/v1/public/freight_types/search.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <page>2</page>
   <name>коробка</name>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
pageNointegerResponse page number
nameYesstringSearch request

Method response

Response example

{  
   "metadata":{  
      "current_page":1,
      "next_page":null,
      "prev_page":null,
      "total_pages":1
   },
   "freight_types":[  
      {  
         "sqlUID":"0x960d35a065ddb1e841a8b09bf5eb42cc",
         "value":"Коробка передач",
         "order":1,
         "can_transport":"1",
         "comment":"Обязательна жесткая упаковка.Во Владивостоке и Хабаровске доступна специальная упаковка для автозапчастей-жесткий короб."
      },
      {  
         "sqlUID":"0x98086eae8b603ea911e5e1f22bb1e191",
         "value":"Кафельная плитка в коробках",
         "order":2,
         "can_transport":"1",
         "comment":""
      }
   ]
}
<response>
   <metadata>
      <current_page>1</current_page>
      <next_page />
      <prev_page />
      <total_pages>1</total_pages>
   </metadata>
   <freight_types>
      <sqlUID>0x960d35a065ddb1e841a8b09bf5eb42cc</sqlUID>
      <value>Коробка передач</value>
      <order>1</order>
      <can_transport>1</can_transport>
      <comment>Обязательна жесткая упаковка.Во Владивостоке и Хабаровске доступна специальная упаковка для автозапчастей-жесткий короб.</comment>
   </freight_types>
   <freight_types>
      <sqlUID>0x98086eae8b603ea911e5e1f22bb1e191</sqlUID>
      <value>Кафельная плитка в коробках</value>
      <order>2</order>
      <can_transport>1</can_transport>
      <comment></comment>
   </freight_types>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectInformation on response pages
metadata.current_pageintegerCurrent page number
metadata.next_pageintegerNext page number (if any)
metadata.prev_pageintegerPrevious page number (if any)
metadata.total_pagesintegerTotal amount of pages
freight_typesarray of Response.Fright_types

The list of directory items matching the search request

freight_types.sqlUIDstringCargo UID
freight_types.valuestringCargo name
freight_types.orderintegerDirectory item list priority
freight_types.can_transportstringInformation on whether the cargo type is accepted for the transportation
freight_types.commentstringComment

Nature of cargo: search by the string (dedicated truck transportation)

Method request

Request example

Method address: https://api.dellin.ru/v1/ftl/freight_types.json

{
   "appKey":"00000000-0000-0000-0000-000000000000",
   "search":"пи"
}

Method address: https://api.dellin.ru/v1/ftl/freight_types.xml

<request>
   <appKey>00000000-0000-0000-0000-000000000000</appKey>
   <search>пи</search>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
searchNostring

Cargo name - full or fragment. Minimum string length - 2 characters. Search from the beginning of the string

Method response

Response example

{
   "metadata":{
      "status":200,
      "generated_at":"2020-06-17 15:10:42"
   },
   "data":[
      {
         "uid":"3b4feeb0-cedf-11e0-99f0-001a64963cbd",
         "name":"Пиломатериалы"
      },
      {
         "uid":"eddb67f5-bdb3-11e0-ad24-001a64963cbd",
         "name":"Пищевые добавки"
      }
   ]
}
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-17 15:10:42</generated_at>
   </metadata>
   <data>
      <uid>3b4feeb0-cedf-11e0-99f0-001a64963cbd</uid>
      <name>Пиломатериалы</name>
   </data>
   <data>
      <uid>eddb67f5-bdb3-11e0-ad24-001a64963cbd</uid>
      <name>Пищевые добавки</name>
   </data>
</response>

Description of parameters

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

Server response date and time.

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

dataarray of DataThe list of directory items matching the search request
data.uidstringCargo UID
data.namestringCargo name

Error handling

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