> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lomadee.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination and filters

> Page through lists and filter by period

Every list in the Brand API uses the same parameters and the same response shape.

## Pagination

| Parameter | Default | Limits |
| - | - | - |
| `page` | `1` | Minimum `1` |
| `limit` | `20` | `1` to `100`. Other values return `400`. |

The response always has `data` and `meta`:

```json theme={null}
{
  "data": [],
  "meta": { "total": 128, "page": 1, "limit": 20, "totalPages": 7 }
}
```

To read everything, request pages until `page` equals `meta.totalPages`. Routes that return one item respond with `{ "data": { ... } }`.

## Period

Orders and reports accept `from` and `to`, in ISO 8601 (`2026-11-01T00:00:00Z`). Dates without a time zone are read as UTC.

| Route | `from` / `to` | Default | Maximum range |
| - | - | - | - |
| `GET .../orders` | Optional | Last 30 days | 90 days |
| `GET .../reports/performance` | Required | — | 90 days |

A range longer than 90 days, or `from` after `to`, returns `400`. For longer periods, make one request per 90-day window.

The period filters orders by **creation date** (`createdAt`).

## Filters by resource

| Route | Filters |
| - | - |
| Orders | `status`, `commissionStatus`, `channelId` (network) or `affiliateId` (white label) |
| Channels (network) | `status`, `type` |
| Affiliates (white label) | `status`, `search`, `clusterId`, `updatedSince` |
| Campaigns | `type`, `active` |
| Commission rules | `active` |
| Performance report | `groupBy`: `day`, or `channel` (network) / `affiliate` (white label) |

An unknown parameter returns `400`. The API does not ignore it.

## Keep a copy in sync

To mirror orders in your own system:

1. Request `GET .../orders` for the period you need, page by page.
2. Store each order by its `id`.
3. Run again on a schedule with a period that overlaps the last one (for example, the last 3 days). Order and commission status change after creation, so replace what you stored when `updatedAt` is newer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.