DocsProducts

Products API

Access your product catalog and categories through the Products API.

Endpoints Overview

MethodEndpointDescription
GET/api/productsList all products (paginated)
GET/api/products/:idGet product by ID
GET/api/categoriesList all categories

List Products

Retrieve a paginated list of products for a store.

Request
GET /api/products?store_id={storeId}&page=1&limit=25
Authorization: Bearer {token}

Query Parameters

ParameterTypeRequiredDescription
store_idstringYesStore UUID
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 25, max: 100)
searchstringNoSearch by name or SKU
category_idstringNoFilter by category UUID
statusstringNoFilter by status (active, hidden)
Response
{
  "data": [
    {
      "id": "uuid",
      "salla_id": 111222333,
      "name": "Premium Widget",
      "sku": "PWG-001",
      "price": 199.99,
      "sale_price": null,
      "currency": "SAR",
      "quantity": 50,
      "status": "active",
      "thumbnail": "https://cdn.salla.sa/...",
      "categories": [
        {
          "id": "uuid",
          "name": "Electronics"
        }
      ],
      "created_at": "2024-01-10T08:00:00Z"
    }
  ],
  "meta": {
    "total": 150,
    "page": 1,
    "limit": 25,
    "total_pages": 6
  }
}

Get Product

Retrieve a single product with full details.

Request
GET /api/products/{productId}?store_id={storeId}
Authorization: Bearer {token}
Response
{
  "id": "uuid",
  "salla_id": 111222333,
  "name": "Premium Widget",
  "description": "High-quality widget for...",
  "sku": "PWG-001",
  "price": 199.99,
  "sale_price": null,
  "cost_price": 100.00,
  "currency": "SAR",
  "quantity": 50,
  "status": "active",
  "thumbnail": "https://cdn.salla.sa/...",
  "images": [
    "https://cdn.salla.sa/image1.jpg",
    "https://cdn.salla.sa/image2.jpg"
  ],
  "categories": [
    {
      "id": "uuid",
      "salla_id": 444555,
      "name": "Electronics"
    }
  ],
  "weight": 0.5,
  "weight_unit": "kg",
  "require_shipping": true,
  "salla_created_at": "2023-12-01T10:00:00Z",
  "created_at": "2024-01-10T08:00:00Z",
  "updated_at": "2024-01-15T12:30:00Z"
}

List Categories

Retrieve all categories for a store.

Request
GET /api/categories?store_id={storeId}
Authorization: Bearer {token}
Response
{
  "data": [
    {
      "id": "uuid",
      "salla_id": 444555,
      "name": "Electronics",
      "parent_id": null,
      "products_count": 45,
      "created_at": "2024-01-05T08:00:00Z"
    },
    {
      "id": "uuid",
      "salla_id": 444556,
      "name": "Smartphones",
      "parent_id": "uuid-of-electronics",
      "products_count": 20,
      "created_at": "2024-01-05T08:00:00Z"
    }
  ]
}

Product Object

Full product object field reference:

FieldTypeDescription
idstringSyncaty UUID
salla_idnumberSalla product ID
namestringProduct name
skustringStock keeping unit
pricenumberRegular price
sale_pricenumber|nullSale price if on sale
quantitynumberStock quantity
statusstringactive, hidden, out_of_stock
categoriesarrayAssociated categories