Skip to content

Catalog Sync (API) ​

If your products, prices and stock live in an accounting system - 1C, a CRM, warehouse software or a Google Sheet - there's no need to enter them into the knowledge base by hand. The platform accepts your catalog via API: your system pushes the data, and the AI employee instantly answers customers with up-to-date items - "in stock", "2 left", "price 95,000 KGS", "installment available".

When you need this

  • The catalog is large and/or changes often (prices, stock).
  • The data already lives in 1C or another system and you want it updated automatically.
  • You want the AI never to mislead: when an item runs out, the bot honestly says "out of stock".

Catalog vs. Business Profile ​

The catalog (this API) holds per-item facts: what the product is, where it is, how many, in stock or not, whether installment/credit is available.

Terms and rules belong in the Business Profile: how delivery works, the terms of installment and credit (banks, durations), store addresses and hours, returns, warranty.

Rule: the catalog answers "is it available / how many / where / how much + flags"; the profile answers "how it works". A store address isn't duplicated per item: the item carries a store code (store_code), and the address is resolved from the profile.

Step 1. Get an API key ​

In the dashboard → Settings → API tokens, create a key. It's shown once - save it. A key looks like biz_... and is bound to your organization: data is written only to your catalog, never anyone else's.

Pass it in every request via the header:

Authorization: Bearer biz_your_key

Step 2. Send items ​

POST https://ai.atlabyte.com/api/v1/sync/items

Request body (JSON):

json
{
  "source": "crm",
  "mode": "upsert",
  "items": [
    {
      "external_id": "store7:P1",
      "title": "iPhone 15 128GB",
      "category": "Smartphones",
      "price": 95000,
      "currency": "KGS",
      "available": true,
      "stock": 3,
      "store_code": "MAIN",
      "installment": true,
      "credit": true,
      "attributes": { "color": "black", "storage": "128GB" },
      "url": "https://shop.example/p1",
      "image_url": "https://shop.example/p1.jpg"
    }
  ]
}

curl example:

bash
curl -X POST https://ai.atlabyte.com/api/v1/sync/items \
  -H "Authorization: Bearer biz_your_key" \
  -H "Content-Type: application/json" \
  -d @catalog.json

Item fields ​

FieldReq.Description
external_idyesStable identifier of the item in your system. Updates key off it - don't change it for the same product.
titleyesProduct name (in your language - this is what the customer sees).
category-Category ("Smartphones", "Washing machines").
price-Price (number).
currency-Currency, e.g. KGS, USD.
available-Availability, true/false. If omitted, derived from stock.
stock-Quantity (number). Always stored and visible to you. The agent tells customers the exact number only if "Tell customers the exact stock count" is enabled (in the Knowledge Base section; off by default — the agent says only "in stock / out of stock").
store_code-Store/warehouse code. The address is resolved from the Business Profile.
installment-Whether installment is available for the item (true/false). Terms live in the profile.
credit-Whether credit is available for the item (true/false). Terms live in the profile.
attributes-Any key-value specs: { "color": "black", "storage": "128GB" }. Works for any domain.
url, image_url-Product link and image.

source is a tag for the source system ("1c", "crm", "sheets"…). It's just a grouping label: the API is not tied to 1C - any system that pushes JSON in this format works.

Modes (mode) ​

  • upsert (default) - add new and update existing items by external_id. Nothing is deleted just because it was absent from a payload - no accidental data loss.
  • delete - remove the listed items (only their external_id is needed).

Item out of stock? The preferred path is to send it with available: false (the item stays, the bot says "out of stock" and suggests an alternative). Use delete for permanent removal.

Sending straight from 1C (Russian fields) ​

If the export comes straight out of 1C, you don't have to translate fields into the English schema — there's a dedicated endpoint that accepts the native 1C shape:

POST https://ai.atlabyte.com/api/v1/sync/1c

Body — a standard 1C dump of {Точки, Товары, Остатки} (Points, Products, Stock):

json
{
  "Точки": [{ "Код": 7, "Наименование": "МТ ЦЕНТР" }],
  "Товары": [
    { "Код": "P1", "Наименование": "iPhone 15 128GB", "Цена": 95000,
      "ГруппаТоваров": "Смартфоны", "Рассрочка": true, "Кредит": true }
  ],
  "Остатки": [{ "КодТочки": 7, "КодТовара": "P1", "Остаток": 3 }]
}
  • The item id is built as КодТочки:КодТовара — the same product in different points is tracked separately.
  • Остаток (stock) → availability (> 0 = in stock) and quantity.
  • The point name is used as the store code; the address is resolved from the Business Profile.
  • Рассрочка / Кредит are per-item installment/credit flags (terms live in the profile).
  • Same auth and behavior: Authorization: Bearer biz_…, update by item id, no deletion of absent items (send Остаток: 0 for out-of-stock).

Internally both formats converge on one schema and one normalizer — English for integrators, the native 1C intake for export convenience.

Step 3. Read your catalog back ​

GET https://ai.atlabyte.com/api/v1/items

Returns your items with filters and pagination - handy to confirm a sync landed, or to cross-check by store/model.

bash
curl "https://ai.atlabyte.com/api/v1/items?store_code=MAIN&available=true&q=iPhone&limit=50" \
  -H "Authorization: Bearer biz_your_key"

Filters: source, store_code, category, available, installment, credit, q (title search), price_min, price_max, limit (up to 200), cursor (next page).

How often to send ​

Send on a schedule (e.g. hourly or after changes in 1C) or on every stock update. Re-sending is safe and cheap: the platform detects what actually changed and re-learns only the changed items - you can push the whole catalog hourly without extra load. Up to 5000 items per request; split a large catalog into batches.

What the customer sees ​

After a sync, the AI employee answers strictly from your data: confirms availability, quotes the price, mentions installment/credit, points to stores. If an item isn't in the catalog, it doesn't make things up - it says so honestly and offers an alternative or hands off to an operator.