List cargo sizes
const url = 'https://api.govza.app/v1/delivery/cargo-sizes';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.govza.app/v1/delivery/cargo-sizes \ --header 'Authorization: Bearer <token>'Returns every cargo size, smallest first, with what it adds to a dropoff’s price by the tariff of your company’s city and the heaviest load it covers. Map your own parcels to a size with it and show the difference at checkout.
A dropoff’s price is its distance price plus its size’s surcharge.
Discounts apply to the distance price only, never to the surcharge.
Each leg of POST /quotes shows its surcharge as cargo_surcharge.
Authorizations
Заголовок раздела «Authorizations»Responses
Заголовок раздела «Responses»The cargo sizes and their surcharges.
object
object
Every size, smallest first.
One cargo size and what it adds to every dropoff of that size.
object
Amount in RUB added to the distance price of each dropoff of this size.
The heaviest load this size covers. null for XL, which has no upper limit.
Example
{ "data": { "cargo_sizes": [ { "cargo_size": "S", "surcharge": 0, "max_weight_kg": 10 }, { "cargo_size": "M", "surcharge": 50, "max_weight_kg": 20 }, { "cargo_size": "L", "surcharge": 100, "max_weight_kg": 40 }, { "cargo_size": "XL", "surcharge": 150, "max_weight_kg": null } ] }}The key is missing, malformed, revoked, or its account can no longer create orders.
object
object
Example
{ "success": false}