Maxmove LogoDocs

Quotes and prices

Price a route before booking, lock the quoted price on the delivery, and handle expired or mismatched quotes.

View as Markdown

POST /v1/quotes prices a route for one vehicle type and returns a quote_id (qt_…) that is valid for about 5 minutes. valid_until in the response tells you until when.

Prices are integers in cents of currency. amount_cents is the total price of the delivery.

Lock the quoted price#

Create the delivery with the quote_id and the same route to get exactly the quoted price. The route must match the quote in every part:

  • addresses and coordinates of pickup, dropoff, and stops
  • the stops and their order
  • vehicle_type_id
  • extras
  • items
  • scheduled_at

For a scheduled delivery, send the same scheduled_at on the quote, because the price can depend on the pickup time. A scheduled_at in the past or too far ahead answers 400 invalid_request.

If the route differs in any way, the request fails with 400 quote_mismatch. If the quote has expired, it fails with 400 quote_expired. In both cases, request a new quote and create the delivery with the new quote_id.

Contacts and instructions are not part of the quote. You add them when you create the delivery.

Book without a quote#

You can also create a delivery without quote_id. Maxmove then prices the route at creation and returns the price in amount_cents of the delivery.

Check that the goods fit#

Optionally send items with per-unit dimensions and weight, on the quote and on the delivery. Maxmove then checks that the vehicle type can carry them:

StatusCodeMeaning
400vehicle_does_not_fitThe vehicle type cannot carry the items. Choose a larger vehicle type.
400invalid_itemsThe items cannot be evaluated.

See Items and vehicle fit.

Routes outside the service area#

Maxmove checks the pickup, every stop, and the dropoff against its service areas, on the quote and again on the delivery. A route outside them answers 400 service_area_unavailable. See Coverage.

Quote errors#

StatusCodeMeaning
400quote_mismatchThe route differs from the quoted route.
400quote_not_foundUnknown quote_id for this key and mode.
400quote_expiredThe quote has expired. Request a new one.
400service_area_unavailableThe pickup, the dropoff, or a stop is outside the service area.
409conflictAnother precondition failed. The message explains why.

Quotes belong to one mode: a quote created with a test key can't be used with a live key.

Did this answer your question?