Die Entwicklerdokumentation ist auf Englisch verfügbar.
Quotes and prices
Price a route before booking, lock the quoted price on the delivery, and handle expired or mismatched quotes.
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_idextrasitemsscheduled_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:
| Status | Code | Meaning |
|---|---|---|
| 400 | vehicle_does_not_fit | The vehicle type cannot carry the items. Choose a larger vehicle type. |
| 400 | invalid_items | The items cannot be evaluated. |
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#
| Status | Code | Meaning |
|---|---|---|
| 400 | quote_mismatch | The route differs from the quoted route. |
| 400 | quote_not_found | Unknown quote_id for this key and mode. |
| 400 | quote_expired | The quote has expired. Request a new one. |
| 400 | service_area_unavailable | The pickup, the dropoff, or a stop is outside the service area. |
| 409 | conflict | Another 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.
Hat das Ihre Frage beantwortet?