Skip to main content
If your store runs on a platform not natively supported by Cartally, you can integrate using the Custom API method. You build an API endpoint on your server that returns your product catalog — Cartally fetches it periodically and indexes it for search.

Overview

Setup

  1. Log in to app.cartally.co.
  2. Go to Integration and select API as the method.
  3. Enter the full URL of your product endpoint (e.g. https://myshop.com/api/cartally/products).
  4. (Optional) Enter an API key if your endpoint requires authentication.
  5. Click Save & Connect.
Cartally will call your endpoint with a 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

Response

Return a JSON array of product objects. When the last page is reached, return an empty array [].

Product fields reference

Required fields

Variant fields

If your products have color variants, provide them in the variants array. Cartally splits color variants into separate search results so each variant shows the correct image.
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 a currencies object with ISO 4217 codes as keys:
If 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 different lang parameter values. Your endpoint should return product names, descriptions, and categories in the requested language.
If a product is not translated, return it in the default language — Cartally handles the fallback gracefully.

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_page products 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.
Example pagination flow:

Authentication

If your endpoint requires authentication, enter an API key in the Cartally panel. Cartally sends it as:
Always use HTTPS for your product endpoint. API keys sent over HTTP are vulnerable to interception.

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

The AI assistant uses product descriptions to answer customer questions. The more detailed your descriptions, the better the AI can recommend and compare products.
Categories become filter facets in the widget. Use consistent naming (e.g. always “T-Shirts”, not sometimes “Tshirts” or “tee shirts”).
The first image in the array is used as the search result thumbnail. Use square or landscape images for best results.
If a product comes in multiple colors, provide color-specific images in each variant. This way customers see the correct color in search results.
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.
  • Check that your endpoint returns valid JSON.
  • Verify that name, description, categories, images, and price are 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 lang parameter with correctly translated data.
  • Verify that currencies values are decimal numbers (not strings, not minor units).