Reten Docs
Commerces

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

HeaderRequiredValue
AuthorizationYesBearer <access_token>
x-tenant-idYesTenant UUID

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
per_pagenumber25Items per page (max 100)
searchstring-Search by name or external ID
external_idstring-Filter by external ID
global_external_idstring-Filter by global external ID
is_activeboolean-Filter by active status
is_placeholderboolean-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>"
import axios from 'axios';

const response = await axios.get(
  'https://api.reten.ai/api/commerces',
  {
    params: { page: 1, limit: 10, search: 'main' },
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

const { data, meta } = response.data;

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
  }
}