Skip to content

Getting started

The REST API gives your ERP, storefront, marketplace tooling or scripts the same product content the app manages: products with variants, translations and custom attributes, the category tree, assets, channel-ready payloads, exports and imports.

Base URL: https://library.retailcommerceai.com/api/v1. Requests and responses are JSON with camelCase keys; timestamps are ISO-8601 in UTC. The full machine-readable description is the OpenAPI 3.1 document, also rendered as an interactive reference.

1. Create an API key

  1. In the app open Developers → API keys (owners and admins) and choose New key.
  2. Name it after the system that will use it (for example “ERP sync”) and pick only the scopes it needs.
  3. Copy the key — it starts with cl_live_ and is shown only once. Store it in your secret manager; if it leaks, revoke it and create a new one.
ScopeAllows
products:readRead products, variants, translations and versions
products:writeCreate, update and delete products; bulk upserts; imports
catalog:readRead categories, attributes, attribute groups and collections
catalog:writeChange categories, attributes, attribute groups and collections
assets:readList and read assets
assets:writeUpload, register, edit and delete assets
channels:readRead channels, readiness and channel-mapped payloads
channels:writePublish products to channels
exports:readRun exports and download export files
jobs:readRead background jobs (imports, exports, publishing)
webhooks:writeManage webhook endpoints

2. Authenticate

Send the key in the Authorization header as a bearer token (or in X-API-Key). Every key belongs to one workspace — one brand — and only ever sees that workspace's data. Check a key with GET /me, which needs no scope:

cURL
bash
curl "https://library.retailcommerceai.com/api/v1/me" \
  -H "Authorization: Bearer cl_live_YOUR_API_KEY"

Keep keys on the server

API keys are secrets. Never ship them in browser or mobile code; call the API from your backend.

3. Make your first request

List the products that changed since your last sync, oldest change first:

cURL
bash
curl "https://library.retailcommerceai.com/api/v1/products?updated_since=2026-09-01T00:00:00Z&sort=updatedAt:asc&limit=100" \
  -H "Authorization: Bearer cl_live_YOUR_API_KEY"

Lists answer with the items and a pagination block:

200 OK
json
{
  "data": [
    {
      "id": "cm1x0p3k20001",
      "sku": "FR-OUD-100",
      "type": "simple",
      "status": "approved",
      "name": "Oud Noir Eau de Parfum 100 ml",
      "brand": "Acme",
      "category": {
        "id": "cm1…",
        "code": "edp",
        "name": "Eau de Parfum",
        "path": "Fragrance > Eau de Parfum",
        "pathCodes": [
          "fragrance",
          "edp"
        ]
      },
      "price": 349,
      "currency": "AED",
      "prices": [
        {
          "currency": "SAR",
          "amount": 359,
          "compareAt": null
        }
      ],
      "attributes": {
        "volume_ml": 100,
        "fragrance_family": "woody-oriental"
      },
      "translations": {
        "ar": {
          "name": "عطر عود نوار ١٠٠ مل"
        }
      },
      "images": [
        {
          "assetId": "cm1…",
          "url": "https://library.retailcommerceai.com/files/…/oud-noir.webp",
          "alt": "Front",
          "position": 0
        }
      ],
      "version": 7,
      "updatedAt": "2026-09-24T08:12:45.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 1284,
    "totalPages": 26,
    "hasMore": true
  }
}

What you can do

GET/products
Products with filters, locale views and nested variants
POST/products/bulk
Create or update up to 500 products by SKU
GET/categories
The category tree with paths and product counts
GET/attributes
Custom attribute definitions and options
POST/assets
Upload images or register image URLs
GET/channels/{id}/products
Products as a marketplace receives them
POST/exports
CSV, Excel, XML or JSON files
POST/imports
Import a product file in the background
POST/webhooks
Receive signed events when data changes

Using an AI assistant? The same data is available through the MCP server. Environment variable names in the samples (CL_API_KEY) are only a convention; cl_live_YOUR_API_KEY stands for your key.