Overview
Setup
- Log in to app.cartally.co.
- Go to Integration and select API as the method.
- Enter the full URL of your product endpoint (e.g.
https://myshop.com/api/cartally/products). - (Optional) Enter an API key if your endpoint requires authentication.
- Click Save & Connect.
GET request. If authentication is configured, the request includes an Authorization: Basic {api_key} header.
Product endpoint specification
Your endpoint must return a JSON array of product objects. Cartally fetches products in pages using query parameters.Request
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (starts at 1) |
per_page | integer | Number of products per page (default: 100) |
lang | string | Language code (e.g. en, pl). Return product data in this language |
Response
Return a JSON array of product objects. When the last page is reached, return an empty array[].
Product fields reference
Required fields
| Field | Type | Description |
|---|---|---|
id | string or integer | Unique product identifier |
name | string | Product title. Should be descriptive — this is the primary search field |
description | string | Product description in plain text or HTML (HTML tags will be stripped). The more detailed, the better the AI search quality |
categories | string[] | List of category names the product belongs to. Used for faceted filtering |
images | string[] | List of publicly accessible image URLs. The first image is used as the main thumbnail |
price | number | Product price in the store’s default currency (decimal, e.g. 49.99) |
Recommended fields
| Field | Type | Description |
|---|---|---|
url | string | Direct URL to the product page in your store. Customers click this to visit the product |
reference | string | SKU or internal reference code |
variants | object[] | Product variants (see below). If omitted, the product is indexed as a single item |
currencies | object | Prices in additional currencies. Keys are ISO 4217 currency codes, values are decimal prices |
Variant fields
If your products have color variants, provide them in thevariants array. Cartally splits color variants into separate search results so each variant shows the correct image.
| Field | Type | Description |
|---|---|---|
id | string | Unique variant identifier (e.g. 12345-black) |
attributes | object | Key-value pairs of variant attributes (e.g. {"color": "black", "size": "M"}) |
price | number | Variant-specific price (if different from the parent product) |
images | string[] | Variant-specific images. If omitted, parent product images are used |
The
color attribute has special handling — variants with different colors become separate search results with their own images. Other attributes (like size) are indexed as filterable facets but don’t split the product.Multi-currency pricing
To support multiple currencies, include acurrencies object with ISO 4217 codes as keys:
currencies is omitted, only the base price field is indexed using your store’s default currency.
Multilingual products
If your store supports multiple languages, Cartally will call your endpoint with differentlang parameter values. Your endpoint should return product names, descriptions, and categories in the requested language.
Declaring available languages
Cartally detects available languages from the<html lang> attribute and <link rel="alternate" hreflang="..."> tags on your store’s homepage. Make sure these are present:
Pagination
Your endpoint must support pagination. Cartally fetches products in batches of 100 (configurable). Rules:- Return up to
per_pageproducts per request. - When there are no more products, return an empty array
[]. - Products should be returned in a consistent order (e.g. by ID) so pagination is stable.
| Request | Response |
|---|---|
?page=1&per_page=100 | 100 products |
?page=2&per_page=100 | 100 products |
?page=3&per_page=100 | 47 products |
?page=4&per_page=100 | [] (empty — sync complete) |
Authentication
If your endpoint requires authentication, enter an API key in the Cartally panel. Cartally sends it as:Sync schedule
- The first sync runs immediately after saving the integration.
- Subsequent syncs run automatically every 24 hours (configurable).
- You can trigger a manual re-sync from the Integration page in the Cartally panel.
Minimal example
Here’s the simplest possible product endpoint (Python/Flask):Best practices
Write detailed product descriptions
Write detailed product descriptions
The AI assistant uses product descriptions to answer customer questions. The more detailed your descriptions, the better the AI can recommend and compare products.
Use consistent category names
Use consistent category names
Categories become filter facets in the widget. Use consistent naming (e.g. always “T-Shirts”, not sometimes “Tshirts” or “tee shirts”).
Provide high-quality images
Provide high-quality images
The first image in the array is used as the search result thumbnail. Use square or landscape images for best results.
Include variant images
Include variant images
If a product comes in multiple colors, provide color-specific images in each variant. This way customers see the correct color in search results.
Keep your endpoint fast
Keep your endpoint fast
Cartally fetches up to 100 products per request. Your endpoint should respond within 30 seconds. Use database pagination — don’t load all products into memory.
Troubleshooting
Connection test fails
- Verify the endpoint URL is correct and publicly accessible.
- Check that HTTPS is working (Cartally requires a valid SSL certificate).
- If using an API key, verify it’s entered correctly in the panel.
Products not appearing in search
- Check that your endpoint returns valid JSON.
- Verify that
name,description,categories,images, andpriceare present for every product. - Check that pagination returns an empty array
[]on the last page (not an error). - Wait a few minutes after the sync — indexing may still be in progress.
Wrong prices or languages
- Ensure your endpoint responds to the
langparameter with correctly translated data. - Verify that
currenciesvalues are decimal numbers (not strings, not minor units).
