API reference
Ingestion
Push and delete catalogue and content. Check the progress of a batch and erase a shopper’s data.
On this page
Our catalogue ingestion API allows you to keep Ottla up to date from any platform our Magento module doesn’t cover, including products with their prices and stock, categories, content pages, FAQs, reviews, articles, documents and order history. The assistant, search and recommendations all use the data you send to us, so the better your data, the better our answers. Check out our custom platform sync guide to learn how to do a first full sync and keep your data up to date. This page is the field by field reference.
Shared rules
| Rule | What it means |
|---|---|
| Key | A key with ingest:write, such as your Server import key. Never put it in a web page, and limit it to your servers’ IP addresses. |
| Where to call from | Your server only. These endpoints don’t check Origin. |
| Website | Taken from the key when it is limited to one website, or else from website_id or store_view_id in the body. A key limited to one website that names another gets 403 website_not_allowed. An id Ottla doesn’t know gets 422. |
| Batch size | Up to 500 items a request. Removals take up to 1,000 ids, and progress checks up to 100 ack ids. |
| Answer | 202 with status, ack_id and request_id, plus an X-Ottla-Ingest header. The work is done shortly after, in the order your requests arrived. |
| Retries | Idempotency-Key is honoured on every write, so a retry never writes twice. |
| Rate limit | Group ingest: 120 requests a minute per key, on every plan. Progress checks have their own group, also 120. |
| Billing | A 402 means stop syncing until billing is resolved. Over your knowledge item allowance, new items are skipped and counted in the result, not refused. |
{
"status": "queued",
"ack_id": "01JC5Q8ZK3M7T2V9X4B6D8F0GH",
"request_id": 48213
}
A sync that stays correct
- You should initially send all your data in batches of 500. Then only send what has changed. Prices and stock change the most, so try to send those as soon as they change.
- Send deletions as deletions. A product you stop sending isn’t removed; call
/ingest/products/deindexor/ingest/deindex. - Check each batch with
/ingest/acksand retry only the ids infailed_ids. - Use the same
external_idfor an item every time, so updates land on the right record.
Send products
Adds or updates up to 500 products. Send every product once, then new and changed ones as they happen. A product already in Ottla is updated, matched on external_id or sku. This is the product feed API: one upsert endpoint for everything about a product.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
items
|
1 to 500 products, each with the fields below. |
items[].external_id
|
Your platform’s product id, up to 255 characters. Identify each product by external_id (preferred) or sku: one is required. |
items[].sku
|
The product’s SKU, up to 255 characters. |
items[].parent_external_id
|
For a variant: its parent product’s id. |
items[].parent_sku
|
For a variant: its parent product’s SKU. |
items[].name
|
The product name, up to 1,000 characters. |
items[].type
|
Your product type, such as simple, configurable, bundle or grouped. |
items[].status
|
enabled or disabled. Disabled products are never shown to shoppers. |
items[].visibility
|
Where the product appears. See Visibility values below. |
items[].url
|
The product page’s address, up to 2,000 characters. |
items[].image_url
|
The main image’s address, up to 2,000 characters. |
items[].short_description
|
A short description. |
items[].description
|
The full description, as plain text or HTML. |
items[].attributes
|
Attribute codes and values, such as colour, berths or weight. Used in answers, filters and comparisons. Lists are kept as lists. |
items[].category_external_ids
|
The categories the product is in, by your category id, up to 500. |
items[].category_positions
|
The product’s position in each category (external_id and position), for the Recommended sort. Up to 500. |
items[].identifiers
|
Part numbers and barcodes shoppers may search by, up to 100, each with a type (sku, mpn, gtin, ean, upc, isbn, barcode, sku_suffix or other) and a value. |
items[].created_at
|
When the product was added to your store, for the Newest sort. |
items[].news_from_date
|
The start of the product’s new arrival period. |
items[].news_to_date
|
The end of the product’s new arrival period. |
items[].lifecycle
|
active or discontinued. A discontinued product is no longer listed or recommended, but an exact search for its SKU or part number still finds it. |
items[].successor_external_id
|
For a discontinued product: the product that replaces it. |
items[].market_signals
|
Prices and stock, one entry per market. See below. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
Visibility values. catalog,search (the default) shows the product on listings and in search; catalog on listings only; search in search only; and none for a product that isn’t shown on its own, such as a variant.
| Field | Description |
|---|---|
market_code
|
A short code you choose for the market, such as uk, up to 64 characters. The first use creates the market, so use the same code every time. |
currency
|
The ISO 4217 code, such as GBP. |
regular_price
|
The normal price. |
special_price
|
The sale price. Send null to end a sale; leave it out to keep the current value. |
final_price
|
The price after every rule, when it differs from both. |
in_stock
|
Whether the product can be bought. |
salable_qty
|
The quantity available to sell. Send null to clear it. |
availability
|
in_stock, backorder or out_of_stock. |
curl https://ottla.ai/api/v1/ingest/products \
-H "Authorization: Bearer YOUR_SERVER_KEY" \
-H "Idempotency-Key: 3a7f1c2e-9b4d-4e6a-8c0f-5d2b7e9a1c34" \
-H "Content-Type: application/json" \
-d '{"items": [{"external_id": "1187", "sku": "TENT-2P", "name": "Ridgeline 2 Person Tent", "status": "enabled", "url": "https://shop.example/ridgeline-2-person-tent", "attributes": {"colour": "Green", "berths": 2, "weight_kg": 2.1}, "category_external_ids": ["41"], "market_signals": [{"market_code": "uk", "currency": "GBP", "regular_price": 129.00, "in_stock": true, "salable_qty": 14}]}]}'
import { randomUUID } from 'node:crypto';
const res = await fetch('https://ottla.ai/api/v1/ingest/products', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_SERVER_KEY',
'Content-Type': 'application/json',
'Idempotency-Key': randomUUID(), // reuse it if you retry this batch
},
body: JSON.stringify({
items: [
{
external_id: '1187',
sku: 'TENT-2P',
name: 'Ridgeline 2 Person Tent',
type: 'simple',
status: 'enabled',
visibility: 'catalog,search',
url: 'https://shop.example/ridgeline-2-person-tent',
image_url: 'https://shop.example/media/tent-2p.jpg',
description: '<p>Lightweight two person tent with taped seams and a 3,000 mm hydrostatic head.</p>',
attributes: { colour: 'Green', berths: 2, weight_kg: 2.1 },
category_external_ids: ['41'],
identifiers: [{ type: 'gtin', value: '5012345678900' }],
market_signals: [
{ market_code: 'uk', currency: 'GBP', regular_price: 129.0, special_price: null, in_stock: true, salable_qty: 14 },
],
},
],
}),
});
const { ack_id } = await res.json(); // check it with /ingest/acks
<?php
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://ottla.ai/api/v1/']);
$response = $client->post('ingest/products', [
'headers' => [
'Authorization' => 'Bearer YOUR_SERVER_KEY',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => [
'items' => [[
'external_id' => '1187',
'sku' => 'TENT-2P',
'name' => 'Ridgeline 2 Person Tent',
'status' => 'enabled',
'url' => 'https://shop.example/ridgeline-2-person-tent',
'attributes' => ['colour' => 'Green', 'berths' => 2, 'weight_kg' => 2.1],
'category_external_ids' => ['41'],
'market_signals' => [[
'market_code' => 'uk',
'currency' => 'GBP',
'regular_price' => 129.00,
'in_stock' => true,
'salable_qty' => 14,
]],
]],
],
]);
$ackId = json_decode((string) $response->getBody(), true)['ack_id'];
Remove products
Removes products you’ve deleted or hidden in your store. They stop appearing in answers, search and recommendations. A removal is processed after any writes you sent before it, so a delete never overtakes an update.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
external_ids
|
Products to remove, by your platform’s product id, up to 1,000. |
skus
|
Products to remove, by SKU, up to 1,000. Send external_ids, skus or both. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
curl https://ottla.ai/api/v1/ingest/products/deindex \
-H "Authorization: Bearer YOUR_SERVER_KEY" \
-H "Idempotency-Key: 3a7f1c2e-9b4d-4e6a-8c0f-5d2b7e9a1c34" \
-H "Content-Type: application/json" \
-d '{"external_ids": ["1187", "1188"]}'
await fetch('https://ottla.ai/api/v1/ingest/products/deindex', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_SERVER_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ external_ids: ['1187', '1188'] }),
});
<?php
$client->post('ingest/products/deindex', [
'headers' => ['Authorization' => 'Bearer YOUR_SERVER_KEY'],
'json' => ['skus' => ['TENT-2P', 'TENT-3P']],
]);
Send and remove categories
Adds or updates up to 500 categories, with their place in your category tree. Categories give the assistant and search the words your shoppers browse by, and make category pages possible through /product-search.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
items
|
1 to 500 categories. |
items[].external_id
|
Your category id, up to 255 characters. |
items[].name
|
The category name, up to 500 characters. |
items[].url
|
The category page’s address. |
items[].description
|
The category description. |
items[].parent_external_id
|
The parent category’s id. |
items[].is_anchor
|
Whether the category page lists its subcategories’ products. |
items[].scope_refs
|
The markets whose category tree holds this category. Leave it out for every market. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
Removes up to 1,000 categories you’ve deleted in your store, by your category id, in external_ids (required).
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
{
"items": [
{ "external_id": "40", "name": "Camping", "url": "https://shop.example/camping", "is_anchor": true },
{ "external_id": "41", "name": "Tents", "url": "https://shop.example/tents", "parent_external_id": "40", "is_anchor": true }
]
}
Send pages, FAQs, reviews and articles
Four endpoints share one item shape. Each adds or updates up to 500 items, and the assistant uses them in its answers: your delivery page answers delivery questions, your FAQs answer the questions you’ve already heard, and reviews let it say what owners think. Send an external_id with every item, so later sends update it and /ingest/deindex can remove it.
Content pages, such as delivery information, returns or about us.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
FAQs: the question as title, the answer as body.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
Product reviews, each with the product’s sku.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
Blog or news articles.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
items
|
1 to 500 items, each with the fields below. |
items[].title
|
The page title, the FAQ question, the review title or the article headline, up to 500 characters. |
items[].body
|
The text, as plain text or HTML. For an FAQ, the answer; for a review, the review itself. |
items[].external_id
|
Your id for the item, up to 255 characters, so a later send updates it and /ingest/deindex can remove it. |
items[].url
|
The item’s address on your storefront. |
items[].sku
|
The product it’s about, such as the product a review is for. |
items[].source_type
|
What kind of content it is. See Content types below. |
items[].metadata
|
Extra details as key and value pairs. For an article, image_url and published_at are shown in search suggestions. |
items[].scope_refs
|
The markets (your market_code values) the item belongs to. Leave it out for every market. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
curl https://ottla.ai/api/v1/ingest/faqs \
-H "Authorization: Bearer YOUR_SERVER_KEY" \
-H "Idempotency-Key: 3a7f1c2e-9b4d-4e6a-8c0f-5d2b7e9a1c34" \
-H "Content-Type: application/json" \
-d '{"items": [{"external_id": "faq-3", "title": "Can I return a tent I have used?", "body": "We accept returns of unused items within 30 days. Used items are covered by the manufacturer warranty."}]}'
await fetch('https://ottla.ai/api/v1/ingest/reviews', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_SERVER_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({
items: [
{
external_id: 'rev-5521',
sku: 'TENT-2P',
title: 'Kept us dry all weekend',
body: 'Two nights of heavy rain in the Lakes and not a drop inside.',
metadata: { author: 'Jo', rating: 5 },
},
],
}),
});
<?php
$client->post('ingest/cms-pages', [
'headers' => ['Authorization' => 'Bearer YOUR_SERVER_KEY'],
'json' => ['items' => [[
'external_id' => 'page-12',
'title' => 'Delivery information',
'url' => 'https://shop.example/delivery',
'body' => '<p>Standard UK delivery is free on orders over £50 and takes 2 to 4 working days.</p>',
'source_type' => 'shipping_policy',
]]],
]);
Content types
source_type tells Ottla what kind of content an item is, which helps it pick the right source for a question. Use one of these, or your own type named x: followed by 2 to 48 lowercase letters, digits or underscores, such as x:trade_terms.
| Type | For |
|---|---|
cms_page | A general content page. |
faq | A question and answer. |
shipping_policy, returns_policy, warranty_policy | Your delivery, returns and warranty terms. |
installation_guide, manual | How to fit or use a product. |
technical_specification | A product’s spec sheet or datasheet. |
size_guide | Sizing and fit. |
promotion | A current offer. |
review | A product review. |
blog_post | An article. |
store_locator | Shop addresses and opening hours. |
pdf, custom_document | Anything else. |
Send a document
Adds or updates one document, such as a datasheet, a manual, a size guide or a policy, as text. To upload PDF, Word, CSV or other files, use the console instead: it reads them for you.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
title
|
The document’s title, up to 500 characters. |
source_type
|
What kind of document it is, from Content types above. |
text
|
The document’s text. Ottla answers from this text. |
source_url
|
The document’s address, kept as its link. Ottla doesn’t fetch it, so always send the text. |
sku
|
The product the document is about, such as the product a datasheet is for. |
external_id
|
Your id for the document, so a later send updates it and /ingest/deindex can remove it. |
visibility
|
public (the default) or internal. An internal document is kept but never used in answers to shoppers. |
metadata
|
Extra details as key and value pairs. |
scope_refs
|
The markets the document belongs to. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
{
"external_id": "doc-tent-2p-spec",
"title": "Ridgeline 2 Person Tent specification",
"source_type": "technical_specification",
"sku": "TENT-2P",
"text": "Peak height 105 cm. Packed size 45 x 15 cm. Weight 2.1 kg. Flysheet hydrostatic head 3,000 mm."
}
Remove content
Removes up to 1,000 pages, FAQs, reviews, articles or documents of one type, by the external_id you sent them with.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
source_type
|
The type the items were sent with, such as faq. |
external_ids
|
The items to remove, 1 to 1,000. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
Send orders
Sends up to 500 orders: your order history once, then new and changed orders. Orders power bought together recommendations, best sellers, trending products, buy it again and “What you’ll need” kits. Each order is stored once, however often you send it.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingestgroup, 120 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted for processing.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), the workspace is not active (tenant_suspended), or the key is bound to one website and the request names another website or another website’s store view (website_not_allowed). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
orders
|
1 to 500 orders, each with the fields below. |
orders[].order_id
|
Your order number, up to 128 characters. Sending an order again updates it; it’s never counted twice. |
orders[].lines
|
1 to 500 lines. See Line fields. |
orders[].placed_at
|
When the order was placed, in ISO 8601. |
orders[].updated_at
|
When it last changed, in ISO 8601. When an order arrives more than once, the latest updated_at wins. |
orders[].total_minor
|
The order total in minor units, so 17400 is £174.00. |
orders[].currency
|
The ISO 4217 code, such as GBP. |
orders[].customer_ref
|
A pseudonymous id for the customer, such as a hash of your customer id, up to 128 characters. Never an email address or a name. |
orders[].state
|
Your order state, such as complete. |
orders[].status
|
Your order status, up to 64 characters. |
orders[].scope_ref
|
The market the order was placed in (your market_code). |
orders[].coupon_used
|
Whether a coupon was used. |
store_view_id
|
A store view of the website, for a catalogue organised by store view. |
| Field | Description |
|---|---|
sku
|
The SKU bought. |
external_id
|
Your platform’s product id. |
qty
|
The quantity, from 1. |
unit_price_minor
|
The unit price in minor units, so 12900 is £129.00. |
variant_external_id
|
For a product with options: the variant bought. |
parent_external_id
|
For a variant: its parent product. |
discount_minor
|
The discount on the line, in minor units. |
curl https://ottla.ai/api/v1/ingest/orders \
-H "Authorization: Bearer YOUR_SERVER_KEY" \
-H "Idempotency-Key: 3a7f1c2e-9b4d-4e6a-8c0f-5d2b7e9a1c34" \
-H "Content-Type: application/json" \
-d '{"orders": [{"order_id": "100004521", "placed_at": "2026-10-21T10:42:00Z", "total_minor": 17400, "currency": "GBP", "customer_ref": "c_7f3e9a12", "state": "complete", "lines": [{"sku": "TENT-2P", "external_id": "1187", "qty": 1, "unit_price_minor": 12900}, {"sku": "MAT-SELF", "external_id": "1342", "qty": 1, "unit_price_minor": 4500}]}]}'
import { createHash, randomUUID } from 'node:crypto';
// A pseudonymous reference: never send an email address or a name
const customerRef = (customerId) =>
'c_' + createHash('sha256').update(`your-secret-salt:${customerId}`).digest('hex').slice(0, 16);
await fetch('https://ottla.ai/api/v1/ingest/orders', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_SERVER_KEY',
'Content-Type': 'application/json',
'Idempotency-Key': randomUUID(),
},
body: JSON.stringify({
orders: [
{
order_id: '100004521',
placed_at: '2026-10-21T10:42:00Z',
total_minor: 17400,
currency: 'GBP',
customer_ref: customerRef(8812),
state: 'complete',
lines: [
{ sku: 'TENT-2P', external_id: '1187', qty: 1, unit_price_minor: 12900 },
{ sku: 'MAT-SELF', external_id: '1342', qty: 1, unit_price_minor: 4500 },
],
},
],
}),
});
<?php
$customerRef = 'c_'.substr(hash('sha256', 'your-secret-salt:'.$customerId), 0, 16);
$client->post('ingest/orders', [
'headers' => [
'Authorization' => 'Bearer YOUR_SERVER_KEY',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => ['orders' => [[
'order_id' => '100004521',
'placed_at' => '2026-10-21T10:42:00Z',
'total_minor' => 17400,
'currency' => 'GBP',
'customer_ref' => $customerRef,
'state' => 'complete',
'lines' => [
['sku' => 'TENT-2P', 'external_id' => '1187', 'qty' => 1, 'unit_price_minor' => 12900],
['sku' => 'MAT-SELF', 'external_id' => '1342', 'qty' => 1, 'unit_price_minor' => 4500],
],
]]],
]);
Check progress
The progress and result of up to 100 accepted writes, by the ack_id each returned. Results are kept for 48 hours. It has its own rate limit group, ingest_acks (120 a minute per key), isn’t idempotent, and keeps working while billing needs attention.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
ingest_acksgroup, 120 a minute
Headers and parameters
| Field | Description |
|---|---|
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
200 OK
One entry per id, in the order requested.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), or the workspace is not active (tenant_suspended). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds.
| Field | Description |
|---|---|
ack_ids
|
1 to 100 ack_id values from earlier writes, 26 characters each. |
{
"acks": [
{
"ack_id": "01JC5Q8ZK3M7T2V9X4B6D8F0GH",
"status": "projected",
"processed": true,
"projected_at": "2026-10-21T09:14:03Z",
"failed_items": 0,
"result": {
"stats": { "created": 1, "updated": 0, "skipped": 0, "indexed": 1, "skipped_over_limit": 0, "failed": 0 }
},
"failed_ids": []
}
]
}
| Field | What it holds |
|---|---|
status | pending: still being processed. projected: done, and live for shoppers, though some items can still have failed: check failed_items. failed: nothing could be written. unknown: no such id for this key, or older than 48 hours. |
processed | true once processing has finished and result is final. |
result | The outcome. For products, counts of items created, updated and skipped, including skipped_over_limit for items over your plan’s allowance. |
failed_items, failed_ids | How many items couldn’t be written, and their ids, on a projected ack as well as a failed one. Empty when none. |
You receive results in the order you request them. Your team can also view these batches under Catalogue → Sync history, where we provide plain guidance on any failed batches.
Erase a shopper’s data
Asks Ottla to erase what it holds about one shopper, when you delete a customer or receive an erasure request. It’s the GDPR erasure API endpoint for your platform: send every identifier you have for the person. It’s never blocked by billing. Rate limit group privacy: 60 a minute per key.
When a shopper says no or stops Ottla measuring their visits on your store, send POST /privacy/shopper-forget instead, with the visitor id your store read one last time (visitor_ids, up to 3, each a vid2. value or an older vid_ or env_ one), reason (refused or opt_out), the new mode (k or o) and, if the shopper’s account link rested on their yes, customer_ref. Ottla deletes what it linked to them under their yes, but their orders are still counted. Links made under your store’s privacy notice before the no stay. It accepts the same key, has its own rate limit group, privacy_forget: 600 a minute per key, and is never blocked by billing. If Ottla answers 503, try again later.
- Key
Authorization: Bearerwith theingest:writescope- Call from
- Your server only
- Rate limit
privacygroup, 60 a minute- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
202 Accepted
Accepted.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
403 Forbidden
The key cannot be used for this request: it lacks the scope (
forbidden_scope), it is limited to other IP addresses (ip_not_allowed), or the workspace is not active (tenant_suspended). -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds.
| Field | Description |
|---|---|
reason
|
customer_deleted when the customer was deleted in your store, or data_subject_request when the shopper asked for erasure. |
customer_id
|
Your customer id. |
customer_refs
|
The customer_ref values you sent with their orders, up to 20. |
email_sha256
|
SHA-256 hashes of the shopper’s email addresses, lowercased and trimmed before hashing, up to 20. 64 hex characters each. |
visitor_ids
|
Visitor ids from the shopper’s browsers, up to 100. |
requested_at
|
When the request was made, in ISO 8601. |
Send at least one of customer_id, customer_refs, email_sha256 or visitor_ids. Guests can be erased too, by their email hash or visitor ids. Ottla answers 202 with status: "accepted" and a request_id, records the request at once and carries it out in the background. Quote the request id if you contact us and we can trace it.
import { createHash, randomUUID } from 'node:crypto';
const emailHash = (email) => createHash('sha256').update(email.trim().toLowerCase()).digest('hex');
await fetch('https://ottla.ai/api/v1/privacy/shopper-erasure', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_SERVER_KEY',
'Content-Type': 'application/json',
'Idempotency-Key': randomUUID(),
},
body: JSON.stringify({
reason: 'data_subject_request',
customer_refs: ['c_7f3e9a12'],
email_sha256: [emailHash('[email protected]')],
requested_at: new Date().toISOString(),
}),
});
<?php
$client->post('privacy/shopper-erasure', [
'headers' => [
'Authorization' => 'Bearer YOUR_SERVER_KEY',
'Idempotency-Key' => bin2hex(random_bytes(16)),
],
'json' => [
'reason' => 'customer_deleted',
'customer_id' => 8812,
'email_sha256' => [hash('sha256', strtolower(trim($email)))],
],
]);
curl https://ottla.ai/api/v1/privacy/shopper-erasure \
-H "Authorization: Bearer YOUR_SERVER_KEY" \
-H "Idempotency-Key: 3a7f1c2e-9b4d-4e6a-8c0f-5d2b7e9a1c34" \
-H "Content-Type: application/json" \
-d '{"reason": "data_subject_request", "customer_refs": ["c_7f3e9a12"], "visitor_ids": ["c1f0a7d2-5b4e-4d2b-9a51-3e8f2c6b7a90"]}'
Errors
| Status | Code | What to do |
|---|---|---|
| 401 | unauthenticated, invalid_api_key | Ensure you are sending a valid Server import key. |
| 402 | account_past_due, account_suspended | Your billing needs attention. You should stop syncing until this is resolved, then resend any data you have held back. You can continue to check progress and request erasure. |
| 403 | forbidden_scope, ip_not_allowed | Your key needs the ingest:write scope, or your server’s IP address is not on the key’s allowed IP addresses. |
| 409 | idempotency_key_reused, idempotency_in_flight | You need to use a new idempotency key for a new batch, or wait a short time for a batch that is still running. |
| 422 | validation_failed | Please fix the items named in the errors array, keyed like items.3.sku, or the unknown website id. No items in this batch have been accepted. |
| 429 | rate_limited and the other rate limit codes | Please wait retry_after seconds. You should be sending 500 items per request, not one at a time. |
| 503 | feature_disabled | We have temporarily paused catalogue updates. Hold onto your batches and retry after the Retry-After time. |
FAQ
Questions developers ask
How many items can I send in one request?
You can send up to 500 products, categories, content or orders per request. You can delete up to 1,000 ids and check up to 100 ack ids.
Is ingestion synchronous?
No. You get an ack_id straight away and the work is done shortly after. Check it with /ingest/acks, or subscribe to the product.ingested webhook.
When is a batch live for shoppers?
When /ingest/acks shows its status as projected. From then on the assistant, search and recommendations can all use it. Items listed in failed_ids weren’t written, so fix and resend those.
Can I erase a guest’s data?
Yes. Send their email address as a SHA-256 hash in email_sha256, their visitor ids, or both.
Related
Custom platform sync
How to do an initial sync and keep your data up to date.
Rate limits
Learn more about the ingest rate limit group and how to pace a large sync.
Errors
View all error codes and what to do.
Webhook events
product.ingested, product.deindexed and content.deindexed.
Data and privacy
How Ottla handles shopper data and erasure.