Skip to content

Price a delivery

POST
/quotes
curl --request POST \
--url https://api.govza.app/v1/partner/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "pickup": { "latitude": 43.342439, "longitude": 45.693597 }, "dropoffs": [ { "latitude": 43.320872, "longitude": 45.691756, "cargo_size": "M" }, { "latitude": 43.351021, "longitude": 45.69154, "cargo_size": "S" } ], "routing_mode": "sequential" }'

Returns the price, distance and duration for a trip without creating anything. Pass the returned quote_id to POST /orders to lock in these prices; quotes expire after five minutes, after which the order is re-priced at the current rate.

Media typeapplication/json

Pricing needs coordinates and cargo size, and nothing else — no addresses and no contact details. You can price a basket before the customer has typed an address, and you never send us personal data for a call that has no use for it.

object
pickup
required
object
latitude
required
number
>= -90 <= 90
longitude
required
number
>= -180 <= 180
dropoffs
required
Array
>= 1 items <= 10 items
object
latitude
required
number
>= -90 <= 90
longitude
required
number
>= -180 <= 180
cargo_size

Overrides the request-level cargo_size for this stop.

string
Allowed values: S M L XL
cargo_size

Applies to every dropoff that does not set its own. Cargo size is priced per destination, so it changes the quote.

string
default: M
Allowed values: S M L XL
routing_mode

sequential routes one chained trip through every dropoff in order. parallel prices each dropoff independently from the pickup.

string
default: sequential
Allowed values: parallel sequential
Example
{
"pickup": {
"latitude": 43.342439,
"longitude": 45.693597
},
"dropoffs": [
{
"latitude": 43.320872,
"longitude": 45.691756,
"cargo_size": "M"
},
{
"latitude": 43.351021,
"longitude": 45.69154,
"cargo_size": "S"
}
],
"routing_mode": "sequential"
}

The trip was priced.

Media typeapplication/json
object
success
boolean
data
object
quote_id

Pass to POST /orders to keep these prices.

string
price

Sum of every leg, each including its cargo surcharge.

number
distance
number
duration
number
expires_at
string format: date-time
dropoffs
Array<object>
object
route_id
string
distance

Metres.

number
duration

Seconds.

number
cargo_size
string
Allowed values: S M L XL
price

Route price for this leg plus its cargo surcharge.

number
Example
{
"data": {
"dropoffs": [
{
"cargo_size": "S"
}
]
}
}

The payload was rejected. error.details is a JSON array of { field, message } covering every offending field, not just the first, so one response is enough to fix the request.

Media typeapplication/json
object
success
boolean
error
object
id
string
code
string
message
string
details
string
Example
{
"success": false,
"error": {
"id": "validation.partner_payload_invalid",
"message": "dropoffs.0.address.latitude: latitude is required",
"details": "[{\"field\":\"dropoffs.0.address.latitude\",\"message\":\"latitude is required\"}]"
}
}

The key is missing, malformed, revoked, or its account can no longer create orders.

Media typeapplication/json
object
success
boolean
error
object
id
string
code
string
message
string
details
string
Example
{
"success": false
}