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

Getting started

Quick start

Go from signing up to having an assistant answering on your store, whether you’re using Magento or any other platform.

Updated 8 min read

On this page

You need two things before you start. The first is an Ottla workspace: the 14-day free trial needs no card and has every Pro feature, with lower limits. The second depends on your store:

  • Magento Open Source or Adobe Commerce 2.4.6 to 2.4.9, with Magento cron running and access to run Composer commands on your project.
  • Any other storefront: you need to be able to add two script tags to your pages, and a server that can send your catalogue to Ottla.

The Getting started checklist on your console home page mirrors the four steps on this page. It ticks each step off as you complete it, so you always know what is left. Follow the instructions that match your store.

Getting started checklist in the Ottla console with two of four steps ticked Example data

Magento or Adobe Commerce

There are 4 steps to getting started. Each step is named the same as the checklist in your console. Depending on the size of your catalogue, your first sync can take some time.

  1. Install the Ottla module

    From your Magento project root, run composer require ottla/module-connector, then bin/magento setup:upgrade and bin/magento cache:flush. In production mode, run bin/magento setup:di:compile and bin/magento setup:static-content:deploy -f before the cache flush, as you would for any module.

    Shell
    composer require ottla/module-connector
    bin/magento setup:upgrade
    bin/magento cache:flush

    The module needs Magento cron. Nothing syncs until cron is running.

  2. Connect to Ottla

    Go to Stores → Configuration → Ottla → Settings → Connection in your Magento admin. Select United Kingdom and click Connect to Ottla. Sign in to your console, select your workspace and approve the connection. You do not need to generate an API key: Ottla creates the keys your store needs.

  3. Wait for the first sync

    Your first sync will begin with your next sync cycle. This should happen within about 15 minutes of connecting. Order history is sent in batches every 5 minutes. You can monitor your sync under Catalogue → Sync history. If you have a large catalogue, this will take a while, and that is normal.

  4. Place the advisor on your store

    Create your advisor under Storefront → Widgets and customise how it looks. Then go to Stores → Configuration → Ottla → Settings → AI Advisor in your Magento admin and add a row under Where the advisor appears. This step ticks when your advisor is opened on your store for the first time.

Magento admin Ottla settings with the United Kingdom region and the Connect to Ottla button
Connection settings in the Magento admin

See the Magento module guide for information on multiple websites, staging environments, Adobe Commerce B2B and more.

Headless or custom storefront

If you’re not using the Magento module, you’ll need to send your catalogue to Ottla and add the widget to your storefront. Again, the steps mirror the checklist in your console.

  1. Add your website

    In Storefront → Websites, add a website and choose the platform Custom / headless (REST API). Note its website id: it is the number in the page address (/console/websites/12), and the widget’s Install snippet shows it as data-website-id. A key limited to this website does not need it.

  2. Create an ingest key

    In Storefront → API keys, create a key and answer What is this key for? with Server import. It has the ingest:write scope. Keep it on your server: it can change your catalogue.

  3. Send your catalogue

    Send products to POST /api/v1/ingest/products, up to 500 in a request, with their prices and stock. Pages, FAQs, reviews and documents go to the other /api/v1/ingest endpoints. Each request is accepted straight away and processed shortly after; check each batch with /ingest/acks. This step ticks once your products are in Ottla and processing has finished. Send your catalogue from any platform has the full sync.

    Shell
    curl https://ottla.ai/api/v1/ingest/products \
      -H "Authorization: Bearer YOUR_SERVER_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: products-2026-11-03-001" \
      -d '{
        "website_id": 12,
        "items": [{
          "external_id": "1042",
          "sku": "TENT-2P",
          "name": "Trailhead 2 tent",
          "url": "https://shop.example/trailhead-2-tent",
          "status": "enabled",
          "market_signals": [{
            "market_code": "uk",
            "currency": "GBP",
            "regular_price": 149.00,
            "in_stock": true
          }]
        }]
      }'
  4. Place the advisor on your store

    Create an advisor in Storefront → Widgets, click Install and paste the two tags into every page. The tags need a separate Storefront widget key with only ask:read and feedback:write, and your storefront’s address under Allowed origins. This step ticks the first time the advisor is opened. See Install the widget.

Install window in the Ottla console showing the two script tags for a chat widget Example data

Ask your first question

With products in Ottla, one call to POST /ask gets an answer. Use your Storefront widget key and send your storefront’s address as Origin, because the key only works from its allowed origins. On Magento this call is optional: the module makes it for you.

curl https://ottla.ai/api/v1/ask \
  -H "Authorization: Bearer YOUR_BROWSER_KEY" \
  -H "Origin: https://shop.example" \
  -H "Content-Type: application/json" \
  -d '{"question": "Which two-person tent is lightest?", "session_id": "qs-demo-1"}'
Response (trimmed)
{
  "answer_id": 48213,
  "answer": "The Trailhead 2 is our lightest two-person tent at 2.1 kg, and it's in stock.",
  "confidence": "high",
  "recommended_products": [
    {
      "sku": "TENT-2P",
      "name": "Trailhead 2 tent",
      "url": "https://shop.example/trailhead-2-tent",
      "image_url": "https://shop.example/media/trailhead-2.jpg",
      "price": "£149.00",
      "in_stock": true
    }
  ],
  "fallback": false,
  "refusal_reason": null
}

Keep answer_id if you want to send feedback or events for this answer later, and reuse session_id for the next question so the conversation hangs together. The ask reference lists every field.

An example chat on Kestrel & Fell’s store. The shopper asks: “Which two-person tent is lightest?”. The assistant answers: “The Trailhead 2 is our lightest two-person tent at 2.1 kg, and it’s in stock.”, and shows Trailhead 2 tent (£149.00).

Next

FAQ

Frequently asked questions

When does the first sync start after I connect?

Your first sync will begin with your next sync cycle. This should happen within about 15 minutes of connecting. Order history is sent in batches every 5 minutes. Depending on the size of your catalogue, this can take a while. The Wait for the first sync step ticks when your first sync has completed.

Do I create API keys for Magento?

No. When you click Connect to Ottla, it generates the keys for you. The module stores these in your Magento configuration. You only need to generate API keys by hand if you’re using a headless or custom storefront.

Does testing use my monthly answered questions?

Questions in the console Playground do not. You can ask up to 50 test questions a day per workspace there. A call to /ask from a test page does count, like any other answer.

Can I show the assistant only to my team first?

Yes. Add your office and/or home IP addresses to your widget’s IP allow-list under Storefront → Widgets. Your customers do not see the widget if they’re not on the allow-list. See Test your integration.

What does my Magento store need?

Magento Open Source or Adobe Commerce 2.4.6 to 2.4.9, PHP 8.2 to 8.5, and Magento cron running. There is nothing to change in your search set-up: Ottla runs its own search and falls back to the engine Magento 2.4 already has.

Try Ottla

Give every shopper a good answer.

Start your free trial on your own store, or book a demo and we’ll show you Ottla on a store like yours.

14 days free. No card needed.