Versioning
The version is in the path: /v1/decide (https://api.ordainer.dev/v1/decide). Today there is one version, /v1.
What can change within /v1
Section titled “What can change within /v1”We only add things:
- new fields in responses (for example,
messagewas added totest_limit_reachedanswers); - new
reasonvalues on a deny; - new error codes;
- new optional request fields and new endpoints.
We don’t remove or rename fields, change a field’s type or meaning, or make an optional request field required.
Error codes
Section titled “Error codes”From launch on, error codes are frozen: new codes may be added, but existing codes are never renamed or removed. Before launch we may still rename a code; for example, idempotency_key_reused became idempotency_conflict (which also covers a retry with a different mode), and bad idempotency keys moved from invalid_request to their own invalid_idempotency_key. If you integrated before launch, check Errors for the current names.
What your client must do
Section titled “What your client must do”- Ignore fields you don’t know. Don’t fail on an unexpected key. Most JSON libraries already do this; turn off any “strict” or “fail on unknown properties” option.
- Handle values you don’t know. Treat an unknown
reasonon a deny as a deny. Treat an unknownerror.codeby its HTTP status (4xx: fix the request or the account; 429: waitRetry-After; 5xx: retry with the same idempotency key). - Branch on codes, not messages.
messagewording can change at any time.
Breaking changes
Section titled “Breaking changes”We keep /v1 as the only version for as long as we can, and we don’t make breaking changes to it silently. If a breaking change ever becomes unavoidable, we’ll add a dated version header at that point, and calls without it keep the behaviour you have today.
Our promise:
- at least 6 months’ notice before any breaking change;
- at least 12 months of an old version still running before we retire it;
- during the notice period, affected responses will carry a
Deprecationheader, so you can find those calls in your logs.
SDK versions
Section titled “SDK versions”The Node SDK is on npm as ordainer (version 1.4.0; npm install ordainer). The Python package is on PyPI as ordainer (version 0.4.0; pip install ordainer). The Java SDK is on Maven Central as ai.ordainer:ordainer (version 0.1.0). SDK versions are separate from the API version: SDK versions can have breaking changes even when the API doesn’t. SDK changes from Node SDK 1.2.0, Python 0.1.0, Ruby gem 0.1.0 and Java SDK 0.1.0 on are listed in our Changelog, and the npm package, the Ruby gem and the Python source download on PyPI also ship a CHANGELOG.md. The published Java jar and sources jar do not include a CHANGELOG.md.