Skip to main content

How to prepare a compatible API Pull source

LiVi can retrieve a complete product catalog through one registered HTTPS GET URL with Bearer authentication. The source must return a compatible JSON structure. A store API does not become compatible simply because it has a URL and token.

HTTPS source requirements​

ParameterSupported contract
RequestOne GET to an agreed HTTPS URL, port 443
AuthorizationAuthorization: Bearer with read-only permissions
ResponseHTTP 200, Content-Type: application/json, UTF-8
TransferNo redirects, compression, or query string or fragment in the URL
Maximum body size16 MiB (16,777,216 bytes)
CategoriesNon-empty categories[] array; each category needs id, slug and name
ProductsNon-empty products[] array; a complete, unpaginated snapshot, subject to validation and search preparation

The URL is checked for DNS, TLS, hostname and address safety. Local/internal addresses and unsafe redirects are not allowed. Don't put the Bearer token in the URL, logs or documentation.

JSON for the agreed external source​

The root object, without snapshotId, contains source, version, currency, updatedAt, products[] and categories[]. This is a synthetic response example:

{
"source": "shop-export-v1",
"version": "2026-11-20T10:00:00Z",
"currency": "UAH",
"updatedAt": "2026-11-20T10:00:00Z",
"categories": [
{"id": "cat-1", "slug": "lighting", "name": "Освітлення"}
],
"products": [
{"sku": "SKU-001", "title": "Лампа настільна", "price": "1250.50", "category": "Освітлення", "stock": 8}
]
}

source and version are non-empty strings of up to 160 characters; currency is three uppercase letters; updatedAt is a valid date. source and currency must match the authorized connection. products[] and categories[] must not be empty.

The strict format that includes snapshotId requires validation of a specific canonical digest and an exact set of root fields. Do not add an arbitrary snapshotId to this example; doing so does not bypass or simplify validation.

Product fields in the compatible external format​

DataAccepted keys
Identifierid, sku
Namename, title, product_name
Priceprice, amount, price_amount
Stock quantitystock, quantity, stock_quantity
AvailabilityinStock (boolean)
CategoryOnly category — the category name
Optionaldescription, brand, variant, image, product_url

Price is required: a number or string using a decimal point, with at most two decimal places and no thousands-grouping spaces. Stock quantity must be a non-negative integer. If both inStock and stock quantity are provided, they must agree.

Every product.category must match exactly one categories[].name. A categoryId without a textual category is not accepted. Unlike flexible CSV, this format does not fill in a missing category automatically.

Example HTTP request made by LiVi​

GET /catalog-snapshot.json HTTP/1.1
Host: catalog.example.com
Authorization: Bearer REDACTED_READ_ONLY_TOKEN
Accept: application/json
Accept-Encoding: identity

This is a request from LiVi to the store's server, not a LiVi endpoint for submitting commands.

What won't work without an adapter​

Responses such as {"data":{"items":[]}}, paginated ?page=1 feeds, XML, GraphQL, OAuth refresh, Basic Auth, vendor-specific API keys, 302 redirects or prices like "1 250,50" do not meet this direct contract. Even a valid product list is rejected if the categories[] array is missing.

Validation and updates​

The technical workflow distinguishes TEST (validation without publication), SYNC (retrieving a new version) and status checks. A successful TEST does not mean new products are available in AISA. A version that fails validation does not replace the previous published version. Automatic scheduling and publication are not guaranteed separately for every external store.

Next: Configure the minimum required access permissions.