Base URLhttps://ottla.ai/api/v1

API reference

Ingestion

Push and delete catalogue and content. Check the progress of a batch and erase a shopper’s data.

Updated 45 min read

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.

Product boxes travelling along a dotted path into an open catalogue box, each with a tick when it arrives

Shared rules

Every ingestion endpoint
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.
202 response to every write
{
  "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/deindex or /ingest/deindex.
  • Check each batch with /ingest/acks and retry only the ids in failed_ids.
  • Use the same external_id for an item every time, so updates land on the right record.

Send products

POST /api/v1/ingest/products 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/products: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Product fields
FieldDescription
items array Required 1 to 500 products, each with the fields below.
items[].external_id string Optional Your platform’s product id, up to 255 characters. Identify each product by external_id (preferred) or sku: one is required.
items[].sku string Optional The product’s SKU, up to 255 characters.
items[].parent_external_id string Optional For a variant: its parent product’s id.
items[].parent_sku string Optional For a variant: its parent product’s SKU.
items[].name string Optional The product name, up to 1,000 characters.
items[].type string Optional Your product type, such as simple, configurable, bundle or grouped.
items[].status string Optional enabled or disabled. Disabled products are never shown to shoppers.
items[].visibility string Optional Where the product appears. See Visibility values below.
items[].url string Optional The product page’s address, up to 2,000 characters.
items[].image_url string Optional The main image’s address, up to 2,000 characters.
items[].short_description string Optional A short description.
items[].description string Optional The full description, as plain text or HTML.
items[].attributes object Optional 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 array Optional The categories the product is in, by your category id, up to 500.
items[].category_positions array Optional The product’s position in each category (external_id and position), for the Recommended sort. Up to 500.
items[].identifiers array Optional 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 string Optional When the product was added to your store, for the Newest sort.
items[].news_from_date string Optional The start of the product’s new arrival period.
items[].news_to_date string Optional The end of the product’s new arrival period.
items[].lifecycle string Optional 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 string Optional For a discontinued product: the product that replaces it.
items[].market_signals array Optional Prices and stock, one entry per market. See below.
store_view_id integer Optional 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.

Price and stock fields (items[].market_signals[])
FieldDescription
market_code string Required 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 string Required The ISO 4217 code, such as GBP.
regular_price number Optional The normal price.
special_price number Optional The sale price. Send null to end a sale; leave it out to keep the current value.
final_price number Optional The price after every rule, when it differs from both.
in_stock boolean Optional Whether the product can be bought.
salable_qty number Optional The quantity available to sell. Send null to clear it.
availability string Optional 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}]}]}'

Remove products

POST /api/v1/ingest/products/deindex 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/products/deindex: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
external_ids array Optional Products to remove, by your platform’s product id, up to 1,000.
skus array Optional Products to remove, by SKU, up to 1,000. Send external_ids, skus or both.
store_view_id integer Optional 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"]}'

Send and remove categories

POST /api/v1/ingest/categories Send 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/categories: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
items array Required 1 to 500 categories.
items[].external_id string Required Your category id, up to 255 characters.
items[].name string Required The category name, up to 500 characters.
items[].url string Optional The category page’s address.
items[].description string Optional The category description.
items[].parent_external_id string Optional The parent category’s id.
items[].is_anchor boolean Optional Whether the category page lists its subcategories’ products.
items[].scope_refs array Optional The markets whose category tree holds this category. Leave it out for every market.
store_view_id integer Optional A store view of the website, for a catalogue organised by store view.
POST /api/v1/ingest/categories/deindex Remove categories

Removes up to 1,000 categories you’ve deleted in your store, by your category id, in external_ids (required).

Key
Authorization: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/categories/deindex: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

POST /ingest/categories body
{
  "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.

POST /api/v1/ingest/cms-pages Send pages

Content pages, such as delivery information, returns or about us.

Key
Authorization: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

POST /api/v1/ingest/faqs Send FAQs

FAQs: the question as title, the answer as body.

Key
Authorization: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

POST /api/v1/ingest/reviews Send reviews

Product reviews, each with the product’s sku.

Key
Authorization: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

POST /api/v1/ingest/blog-posts Send articles

Blog or news articles.

Key
Authorization: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields for all four
FieldDescription
items array Required 1 to 500 items, each with the fields below.
items[].title string Required The page title, the FAQ question, the review title or the article headline, up to 500 characters.
items[].body string Required The text, as plain text or HTML. For an FAQ, the answer; for a review, the review itself.
items[].external_id string Optional Your id for the item, up to 255 characters, so a later send updates it and /ingest/deindex can remove it.
items[].url string Optional The item’s address on your storefront.
items[].sku string Optional The product it’s about, such as the product a review is for.
items[].source_type string Optional What kind of content it is. See Content types below.
items[].metadata object Optional Extra details as key and value pairs. For an article, image_url and published_at are shown in search suggestions.
items[].scope_refs array Optional The markets (your market_code values) the item belongs to. Leave it out for every market.
store_view_id integer Optional 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."}]}'

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.

TypeFor
cms_pageA general content page.
faqA question and answer.
shipping_policy, returns_policy, warranty_policyYour delivery, returns and warranty terms.
installation_guide, manualHow to fit or use a product.
technical_specificationA product’s spec sheet or datasheet.
size_guideSizing and fit.
promotionA current offer.
reviewA product review.
blog_postAn article.
store_locatorShop addresses and opening hours.
pdf, custom_documentAnything else.

Send a document

POST /api/v1/ingest/documents 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/documents: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
title string Required The document’s title, up to 500 characters.
source_type string Required What kind of document it is, from Content types above.
text string Required The document’s text. Ottla answers from this text.
source_url string Optional The document’s address, kept as its link. Ottla doesn’t fetch it, so always send the text.
sku string Optional The product the document is about, such as the product a datasheet is for.
external_id string Optional Your id for the document, so a later send updates it and /ingest/deindex can remove it.
visibility string Optional public (the default) or internal. An internal document is kept but never used in answers to shoppers.
metadata object Optional Extra details as key and value pairs.
scope_refs array Optional The markets the document belongs to.
store_view_id integer Optional A store view of the website, for a catalogue organised by store view.
POST /ingest/documents body
{
  "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

POST /api/v1/ingest/deindex 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/deindex: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
source_type string Required The type the items were sent with, such as faq.
external_ids array Required The items to remove, 1 to 1,000.
store_view_id integer Optional A store view of the website, for a catalogue organised by store view.

Send orders

POST /api/v1/ingest/orders 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest group, 120 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /ingest/orders: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Order fields
FieldDescription
orders array Required 1 to 500 orders, each with the fields below.
orders[].order_id string Required Your order number, up to 128 characters. Sending an order again updates it; it’s never counted twice.
orders[].lines array Required 1 to 500 lines. See Line fields.
orders[].placed_at string Optional When the order was placed, in ISO 8601.
orders[].updated_at string Optional When it last changed, in ISO 8601. When an order arrives more than once, the latest updated_at wins.
orders[].total_minor integer Optional The order total in minor units, so 17400 is £174.00.
orders[].currency string Optional The ISO 4217 code, such as GBP.
orders[].customer_ref string Optional 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 string Optional Your order state, such as complete.
orders[].status string Optional Your order status, up to 64 characters.
orders[].scope_ref string Optional The market the order was placed in (your market_code).
orders[].coupon_used boolean Optional Whether a coupon was used.
store_view_id integer Optional A store view of the website, for a catalogue organised by store view.
Line fields (orders[].lines[])
FieldDescription
sku string Required The SKU bought.
external_id string Optional Your platform’s product id.
qty integer Optional The quantity, from 1.
unit_price_minor integer Optional The unit price in minor units, so 12900 is £129.00.
variant_external_id string Optional For a product with options: the variant bought.
parent_external_id string Optional For a variant: its parent product.
discount_minor integer Optional 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}]}]}'

Check progress

POST /api/v1/ingest/acks 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
ingest_acks group, 120 a minute

Headers and parameters

POST /ingest/acks: headers and parameters
FieldDescription
X-Ottla-Request-Id string header Optional 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

Request fields
FieldDescription
ack_ids array Required 1 to 100 ack_id values from earlier writes, 26 characters each.
200 response
{
  "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": []
    }
  ]
}
FieldWhat it holds
statuspending: 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.
processedtrue once processing has finished and result is final.
resultThe outcome. For products, counts of items created, updated and skipped, including skipped_over_limit for items over your plan’s allowance.
failed_items, failed_idsHow 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.

Sync history in the Ottla console with each batch’s status Example data
Every batch you send, with what happened to it.

Erase a shopper’s data

POST /api/v1/privacy/shopper-erasure 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: Bearer with the ingest:write scope
Call from
Your server only
Rate limit
privacy group, 60 a minute
Retries
Safe with Idempotency-Key

Headers and parameters

POST /privacy/shopper-erasure: headers and parameters
FieldDescription
Idempotency-Key string header Optional 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 string header Optional 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-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

Request fields
FieldDescription
reason string Required customer_deleted when the customer was deleted in your store, or data_subject_request when the shopper asked for erasure.
customer_id integer Optional Your customer id.
customer_refs array Optional The customer_ref values you sent with their orders, up to 20.
email_sha256 array Optional SHA-256 hashes of the shopper’s email addresses, lowercased and trimmed before hashing, up to 20. 64 hex characters each.
visitor_ids array Optional Visitor ids from the shopper’s browsers, up to 100.
requested_at string Optional 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(),
  }),
});

Errors

StatusCodeWhat to do
401unauthenticated, invalid_api_keyEnsure you are sending a valid Server import key.
402account_past_due, account_suspendedYour 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.
403forbidden_scope, ip_not_allowedYour key needs the ingest:write scope, or your server’s IP address is not on the key’s allowed IP addresses.
409idempotency_key_reused, idempotency_in_flightYou need to use a new idempotency key for a new batch, or wait a short time for a batch that is still running.
422validation_failedPlease 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.
429rate_limited and the other rate limit codesPlease wait retry_after seconds. You should be sending 500 items per request, not one at a time.
503feature_disabledWe 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.

Try Ottla on your own store

Start a 14-day free trial with no card needed. The trial has every Pro feature, with lower limits, so you can install the module or the widget, connect your catalogue and try the assistant on your own products.

14 days free. No card needed.