V3 is in beta. General availability (GA) is planned for January 2027.
solvice-routing-v3.openapi.json
OpenAPI 3.1, JSON, about 240 KB
What the file contains
- All seven endpoints, tagged
Routing(/v3/routing/solve,/evaluate,/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.
The file changes with every API release, and during the beta a release can rename or remove fields. Download it again when you update your integration.
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. Pass validate_only=True to get a ValidateOnlyResponse instead of a solve.- 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.