Directory "Loads"
Description
Retrieving load names.
URL structure
GET /v2/references/cargo
List of parameters
Name | Description | Parameter transfer type | Required(+)/Default(value) |
---|---|---|---|
language |
Localization language. Usage details. | Query string parameter | ru |
ids |
Additional filtering options. | Query string parameter | |
query |
Search text. | Query string parameter | |
limit |
The desired number of responses, the maximum is 100. | Query string parameter | 10 |
Request creation specifics
The request must contain the ids
parameter (?ids=2,4,7
) or the query
parameter (?query=test
)
Result
Array of structures "Basic directory element".
Sample requests and sample responses
Using the ids
parameter
ids
curl -X GET -H "Accept: application/json" -H "Authorization: 3WQ1EQ465C4005000130" "https://api.lardi-trans.com/v2/references/cargo?ids=7,10,18"
[
{
"id": 7,
"name": "абрикосы"
},
{
"id": 10,
"name": "абразивный порошок"
},
{
"id": 18,
"name": "автохимия"
}
]
Using the query
parameter
query
Request in English (no URL-encoding, query=aprico)
curl -X GET -H "Accept: application/json" -H "Authorization: 3WQ1EQ465C4005000130" "https://api.lardi-trans.com/v2/references/cargo?query=aprico&language=en"
[
{
"id": 12,
"name": "apricot in boxes"
},
{
"id": 6,
"name": "apricots in boxes"
},
{
"id": 7,
"name": "apricots"
}
]
Request in Ukrainian (URL-encoded, query=абрик)
curl -X GET -H "Accept: application/json" -H "Authorization: 3WQ1EQ465C4005000130" "https://api.lardi-trans.com/v2/references/cargo?query=%D0%B0%D0%B1%D1%80%D0%B8%D0%BA&language=uk"
[
{
"id": 12,
"name": "абрикос в ящиках"
},
{
"id": 6,
"name": "абрикоси в ящиках"
},
{
"id": 7,
"name": "абрикоси"
}
]
Request in Ukrainian (URL-encoded, query=абр, limit=5)
curl -X GET -H "Accept: application/json" -H "Authorization: 3WQ1EQ465C4005000130" "https://api.lardi-trans.com/v2/references/cargo?query=%D0%B0%D0%B1%D1%80&limit=5&language=uk"
[
{
"id": 11,
"name": "абразив"
},
{
"id": 5,
"name": "абразиви"
},
{
"id": 8,
"name": "абразиви в біг-бегах"
},
{
"id": 9,
"name": "абразиви навалом"
},
{
"id": 10,
"name": "абразивний порошок"
}
]