V3 is in beta. General availability (GA) is planned for January 2027.
solvice-routing-v3.openapi.json
OpenAPI 3.1, JSON, about 290 KB
What the file contains
- All ten endpoints, tagged
Routing(/v3/routing/solve,/evaluate,/suggestand/validate/solve,/validate/evaluate,/validate/suggest) andRuns(/v3/routing/runsand its status, result and cancel paths). See Introduction for what each one does. - The server and authentication:
https://api.solvice.io, with your API key in theAuthorizationheader as the bare key, noBearerprefix. - Every request and response schema, with the field descriptions from this reference and the limits the API enforces, such as
minimum,maximumandmaxItems.
Generate a client
For TypeScript, use the@solvice/routing package (beta), which is typed from this contract. For other languages, generate a client from the file.
OpenAPI 3.1 support differs between generators. openapi-python-client generates a working Python client from this file. The python generator of openapi-generator 7.14 does not yet handle its nullable fields.
1
Generate the package
pip install openapi-python-client and then the same command without uvx. --meta none writes the package alone; it needs httpx, attrs and python-dateutil installed.2
Call the API
The generated client sends
Authorization: Bearer <token> unless you set prefix="". Set it, because the API expects the bare key.solve.sync returns a SolveResponse, or an ErrorBody for a 400, 403, 413, 415, 500, 502 or 503. To check a request without solving it, call validate_solve instead, which returns a ValidateResponse.- Accept unknown values. Responses can gain fields, and every code or type in a response can gain values, without a new major version. Configure the generator to accept them; for openapi-generator, set
enumUnknownDefaultCase=true. - Send only documented fields. Requests are strict: an unknown field is a
400with anunknown_fielditem. - Do not parse
message. Branch on the HTTP status, then oncodeanderrors[].code. See Errors. - Authentication and rate-limit errors (
401,429) come from the API gateway in its own shape, not as anErrorBody.