# Pagination and requests

> Every response shares one JSON envelope. List endpoints page with page and per_page, query parameters are strict, and every date is ISO 8601 in UTC.

- Audience: API
- Page type: reference
- Updated: 2026-10-08
- Canonical URL: https://www.rendezvu.co/docs/api/pagination

The conventions on this page hold for every endpoint, so the resource pages do not repeat them.

## The response envelope

A successful response has `success: true`, the result in `data`, and the server's own timing in `_timing`.

```json
{
  "success": true,
  "data": { },
  "_timing": { "duration_ms": 41 }
}
```

On a list endpoint `data` is an array, and the body adds `pagination`.

## Page through a list

List endpoints take two parameters:

| Parameter | Default | Rule |
| --- | --- | --- |
| `page` | 1 | 1 to 10,000 |
| `per_page` | 25 | 1 to 100 |

The `pagination` object tells you where you are:

| Attribute | Meaning |
| --- | --- |
| `page` | The page you asked for. |
| `per_page` | Items per page. |
| `total_items` | Items across every page. |
| `total_pages` | Pages at this `per_page`, never less than 1. |
| `has_next` | Another page follows. |
| `has_prev` | A page comes before. |

Loop until `has_next` is false. Use `per_page=100` for syncs; it is the fewest requests against your [rate limit](/docs/api/rate-limits).

**Node.js**

```javascript
async function* allOrders() {
  for (let page = 1; ; page++) {
    const res = await fetch(
      `https://api.rendezvu.co/api/brand/v1/orders?per_page=100&page=${page}`,
      { headers: { Authorization: `Bearer ${process.env.RENDEZVU_BRAND_API_KEY}` } },
    );
    const { data, pagination } = await res.json();
    yield* data;
    if (!pagination.has_next) return;
  }
}
```

**Python**

```python
import os, requests

def all_orders():
    page = 1
    while True:
        res = requests.get(
            "https://api.rendezvu.co/api/brand/v1/orders",
            params={"per_page": 100, "page": page},
            headers={"Authorization": f"Bearer {os.environ['RENDEZVU_BRAND_API_KEY']}"},
            timeout=30,
        )
        res.raise_for_status()
        body = res.json()
        yield from body["data"]
        if not body["pagination"]["has_next"]:
            return
        page += 1
```

## Query parameters are strict

An unknown query parameter is a `400`, not something the API quietly ignores. A misspelled filter that silently returns everything is worse than an error, so the API refuses it.

There is no `partner_id` or `brand_id` parameter anywhere. The brand is always the key's.

Some filters take several values, comma-separated: `status=active,completed`. The reference marks those as `csv`.

## Dates and times

Dates in requests and responses are ISO 8601, in UTC. A filter accepts a date (`2026-09-01`) or a full timestamp (`2026-09-01T00:00:00Z`). Timestamps in responses carry milliseconds and a `Z`.

## Caching

Every response is sent with `Cache-Control: no-store`. If you need the data again, keep it in your own store rather than calling twice; most of it changes on the scale of hours, not seconds.

## Related

- [Errors](https://www.rendezvu.co/docs/api/errors.md): The Brand API uses conventional HTTP status codes. 2xx means success, 4xx means something in the request needs to change, and 5xx means retry later.
- [Rate limits](https://www.rendezvu.co/docs/api/rate-limits.md): Each API key can make 60 requests a minute, and each IP address 120. Every response carries headers that say how much of the limit is left.

---

Source: https://www.rendezvu.co/docs/api/pagination (Rendezvu docs, Markdown view). Every page: https://www.rendezvu.co/llms.txt