Reference
Versioning and changes
We will only ever add to version 1. If we need to make a breaking change, we’ll announce it ahead of time.
On this page
Ottla API versioning is simple on purpose. There’s one version, version 1, and it’s in the path: https://ottla.ai/api/v1. Within version 1 we add things: new endpoints, new fields, new answer blocks. Anything that would break a working integration is announced in the developer changelog in advance. Write your client to expect additions and it will keep working as they arrive.
Every response also carries X-Ottla-Platform-Contract: 10, the current revision of the API’s conventions within version 1. You don’t need to send it or check it. It’s there for reference, and it helps if you quote it alongside the request id when you contact us.
Changes we make without notice
| Change | For example |
|---|---|
| New endpoints | A new resource for a feature that didn’t exist before. |
| New optional request fields | A new filter on /product-search. Leave it out and nothing changes. |
| New response fields | An extra detail on each product card. |
| New block types in blocks | A new kind of card in an answer from /ask. |
| New refusal_reason values | A reason for a kind of question we didn’t refuse before. |
| New error codes, with a status you already handle | A code for a check on a new field or endpoint. |
| New webhook events and payload fields | A new event in an area you subscribe to with All events. |
| New diagnostic values | A new strategy value on a recommendation row. |
| New console features | A new setting your team can switch on. |
Build clients that keep working
| Rule | Why |
|---|---|
| Ignore fields you don’t know. | New response fields arrive without notice. |
| Render the block types you support and skip the rest. | Every block adds to the written answer, so nothing is lost. |
| Treat an unknown refusal_reason as a refusal. | Show the message in answer; it always makes sense on its own. |
| Branch on error, falling back on the HTTP status. | A new code always comes with a status you already handle. |
| Answer webhook events you don’t know with a 2xx. | Otherwise new events could get your webhook paused. |
| Don’t build logic on strategy or latency_ms. | They’re diagnostic and may change. |
| Keep idempotency keys unique per request. | A key reused with a different body is refused. |
Breaking changes
A change that would break a working integration gets a new version in the path, such as /api/v2, and is announced in advance in the developer changelog. By breaking we mean any change that could make correct code fail:
- removing or renaming an endpoint or field
- changing a field’s type or meaning
- making an optional field required
- changing the error code for an existing scenario
- changing how keys authenticate
Follow our changelog’s Atom feed to be notified of one before it happens.
The Magento module
Our module for Magento and Adobe Commerce is compatible with both the current and the previous Ottla platform revision. This allows you to upgrade the module at your convenience rather than ours. If the platform has a new feature your module version doesn’t support, or the other way round, the feature simply stays hidden until both sides support it.
Ottla can require a minimum module version, and would answer 426 module_upgrade_required to an older one, but no minimum is set today. Upgrade steps are in the Magento module guide.
FAQ
Questions developers ask
Will my integration break when you add a field?
No, as long as your code ignores fields it doesn’t know about. This is the most important thing to remember.
How will I hear about breaking changes?
In the developer changelog, in advance. Subscribe to its Atom feed at /developers/changelog/feed.xml and they’ll reach your feed reader.
What does contract 10 mean?
It’s the current revision of version 1’s conventions, sent as X-Ottla-Platform-Contract on every response. It’s there for reference and for support conversations; you don’t need to send it or act on it.
Related
Developer changelog
Every change that affects integrations, newest first.
API reference
The conventions every endpoint shares.
Webhook events
Return a 2xx for events you don’t know about.
Magento module
Install, upgrade and troubleshoot the module.