List Commerces
Get a paginated list of commerces with filters.
GET /api/commerces
Returns a paginated list of commerces with optional filters.
Auth: Required — MANAGE_COMMERCES permission
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
x-tenant-id | Yes | Tenant UUID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
per_page | number | 25 | Items per page (max 100) |
search | string | - | Search by name or external ID |
external_id | string | - | Filter by external ID |
global_external_id | string | - | Filter by global external ID |
is_active | boolean | - | Filter by active status |
is_placeholder | boolean | - | Filter by placeholder status |
Example
curl "https://api.reten.ai/api/commerces?page=1&limit=10&search=main" \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>"const params = new URLSearchParams({ page: "1", limit: "10", search: "main" });
const response = await fetch(`https://api.reten.ai/api/commerces?${params}`, {
headers: {
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.reten.ai/api/commerces",
headers={
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
},
params={"page": 1, "limit": 10, "search": "main"},
)
data = response.json()Response 200 OK
{
"data": [
{
"id": "880e8400-e29b-41d4-a716-446655440000",
"name": "Main Street Store",
"externalId": "store-001",
"taxId": "12345678-9",
"isActive": true,
"isPlaceholder": false,
"metadata": {},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1
}
}