التوثيقالمنتجات
Products API
Access your product catalog and categories through the Products API.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/products | List all products (paginated) |
| GET | /api/products/:id | Get product by ID |
| GET | /api/categories | List 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
| Parameter | Type | Required | Description |
|---|---|---|---|
store_id | string | Yes | Store UUID |
page | number | No | Page number (default: 1) |
limit | number | No | Items per page (default: 25, max: 100) |
search | string | No | Search by name or SKU |
category_id | string | No | Filter by category UUID |
status | string | No | Filter 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:
| Field | Type | Description |
|---|---|---|
id | string | Syncaty UUID |
salla_id | number | Salla product ID |
name | string | Product name |
sku | string | Stock keeping unit |
price | number | Regular price |
sale_price | number|null | Sale price if on sale |
quantity | number | Stock quantity |
status | string | active, hidden, out_of_stock |
categories | array | Associated categories |