Shop API

Manage products, variants, categories, and shop settings programmatically.

Get your API key

Products

GET /api/v1/projects/{project_id}/products/

List all products.

Filters: ?category={id}&is_active=true&search=keyword

{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "name": "Premium T-Shirt",
      "slug": "premium-t-shirt",
      "price": "29.99",
      "compare_at_price": "39.99",
      "sku": "TSH-001",
      "is_active": true,
      "is_featured": true,
      "stock_quantity": 100,
      "category": {"id": "uuid", "name": "Apparel"},
      "variant_count": 3
    }
  ],
  "count": 25
}
POST /api/v1/projects/{project_id}/products/

Create a product.

{
  "name": "Premium T-Shirt",
  "slug": "premium-t-shirt",
  "description": "100% organic cotton t-shirt",
  "price": "29.99",
  "compare_at_price": "39.99",
  "sku": "TSH-001",
  "category_id": "uuid",
  "track_inventory": true,
  "stock_quantity": 100,
  "is_active": true,
  "is_featured": false,
  "features": ["100% organic", "Machine washable"],
  "technical_specs": {"material": "Cotton", "weight": "200g"}
}
GET PUT DELETE /api/v1/projects/{project_id}/products/{product_id}/

Get, update, or delete a product.

POST /api/v1/projects/{project_id}/products/{product_id}/image/

Upload product image (multipart/form-data or base64 JSON).

Formats: JPEG, PNG, WebP (max 10MB)

Product Variants

GET POST /api/v1/projects/{project_id}/products/{product_id}/variants/

List or create variants for a product.

Create Variant

{
  "title": "Large / Blue",
  "sku": "TSH-001-LG-BL",
  "price": "29.99",
  "stock_quantity": 25
}
PUT DELETE /api/v1/projects/{project_id}/products/{product_id}/variants/{variant_id}/

Update or delete a variant.

Categories

GET POST /api/v1/projects/{project_id}/categories/

List or create product categories.

{
  "name": "Apparel",
  "slug": "apparel",
  "description": "Clothing and accessories"
}
PUT DELETE /api/v1/projects/{project_id}/categories/{category_id}/

Update or delete a category.

Shop Settings & Pages

GET PUT /api/v1/projects/{project_id}/shop/settings/

Get or update shop settings.

Response

{
  "success": true,
  "data": {
    "is_enabled": true,
    "currency_code": "PYG",
    "currency_symbol": "Gs.",
    "supported_currencies": [],
    "layout": "grid",
    "products_per_page": 12,
    "show_categories": true,
    "url_prefix": "shop",
    "product_base": "product",
    "category_base": "category",
    "shop_url": "https://subdomain.escalateflow.com/shop/"
  }
}

Update example

curl -X PUT "https://escalateflow.com/api/v1/projects/{id}/shop/settings/" \
  -H "X-API-Key: ef_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "currency_code": "PYG",
    "currency_symbol": "Gs.",
    "is_enabled": true,
    "shop_title": "Mi Tienda"
  }'

Field names matter: Use currency_code (ISO 4217: PYG, EUR, USD) and currency_symbol (display: Gs., €, $). Sending currency without the _code suffix will be rejected.

The currency_code controls number formatting (thousand/decimal separators). The currency_symbol is the visible label on prices. Set both together.

GET PUT /api/v1/projects/{project_id}/shop/page/

Get or update shop page HTML.

POST /api/v1/projects/{project_id}/shop/page/generate/

AI-generate a shop page.

{"prompt": "Create a modern shop page for a fashion brand"}
GET /api/v1/projects/{project_id}/shop/product-template/

Get the product page template.

Storefront Cart API

Session-based cart endpoints for the public storefront. These run on the shop subdomain, not the main API.

POST https://{subdomain}.escalateflow.com/shop/cart/add/{product_id}/

Add a product to the session cart.

curl -X POST "https://my-store.escalateflow.com/shop/cart/add/{product_id}/" \
  -H "Content-Type: application/json" \
  -d '{"quantity": 2}'
GET https://{subdomain}.escalateflow.com/shop/cartdata/

Get full cart contents with formatted prices. Used by the sidebar cart JavaScript.

Response

{
  "success": true,
  "items": [
    {
      "id": "uuid",
      "name": "Smart TV Samsung 55\" 4K",
      "slug": "smart-tv-samsung-55-4k",
      "price": "4290000.00",
      "price_formatted": "Gs. 4.290.000",
      "image_url": "https://...",
      "quantity": 2,
      "line_total": "8580000.00",
      "line_total_formatted": "Gs. 8.580.000"
    }
  ],
  "item_count": 1,
  "cart_count": 2,
  "subtotal": "8580000.00",
  "subtotal_formatted": "Gs. 8.580.000",
  "currency_symbol": "Gs."
}

The *_formatted fields include the currency symbol and locale-appropriate thousand/decimal separators based on the shop's currency_code setting. Raw decimal strings (price, subtotal) are also returned for backward compatibility.

POST https://{subdomain}.escalateflow.com/shop/cart/update/{product_id}/

Update item quantity. Body: {"quantity": 3}

POST https://{subdomain}.escalateflow.com/shop/cart/remove/{product_id}/

Remove an item from the cart.

Shop Hero Slides

GET POST /api/v1/projects/{project_id}/shop/hero-slides/

List or create hero slides.

{
  "title": "Summer Collection",
  "subtitle": "Up to 50% off",
  "image_url": "https://...",
  "cta_text": "Shop Now",
  "cta_url": "/shop/summer"
}
POST /api/v1/projects/{project_id}/shop/hero-slides/generate/

AI-generate hero slides.

PUT DELETE /api/v1/projects/{project_id}/shop/hero-slides/{slide_id}/

Update or delete a hero slide.