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

# API Introduction

> OnlyTraffic Marketer API v2 — retrieve RevShare campaigns, CPL orders, CPC orders, transactions, and subscribers programmatically.

The OnlyTraffic Marketer API lets you retrieve data about your campaigns, orders, transactions, and subscribers. Use it to build integrations, dashboards, and automated workflows.

## Base URL

```text theme={null}
https://partner.onlytraffic.com
```

## Authentication

All requests require the `Authorization` header with your API key. Get your key in the [Partner Dashboard](https://partner.onlytraffic.com/docs/api_marketer).

```bash theme={null}
curl "https://partner.onlytraffic.com/api/marketer/revshare/campaigns" \
  -H "Authorization: your-api-key-here"
```

<Info>See the [Authentication](/partners/api/authentication) page for error codes and detailed setup.</Info>

## Endpoints

| Endpoint                              | Method | Description                                          |
| ------------------------------------- | ------ | ---------------------------------------------------- |
| `/api/marketer/revshare/campaigns`    | GET    | List your RevShare campaigns                         |
| `/api/marketer/revshare/transactions` | GET    | RevShare financial transactions                      |
| `/api/marketer/cpl/orders`            | GET    | CPL orders placed against your offers                |
| `/api/marketer/cpc/orders`            | GET    | CPC (pay-per-click) orders                           |
| `/api/marketer/subscribers`           | GET    | Fans acquired through all campaigns (RevShare + CPL) |

## Pagination

All list endpoints accept `offset` and `limit` as query parameters.

| Parameter | Default | Max  | Description                 |
| --------- | ------- | ---- | --------------------------- |
| `offset`  | 0       | -    | Number of records to skip   |
| `limit`   | 50      | 1000 | Number of records to return |

## Date formats

Every timestamp field has two variants:

* **ISO 8601 string** (`*_at`) e.g. `"2024-06-01T12:00:00+00:00"`
* **Unix timestamp integer** (`*_at_ts` / `*_ts`) e.g. `1717243200`

## Response format

All responses return HTTP `200`. The actual status is in the `status` field.

<CodeGroup>
  ```json Success theme={null}
  {
    "status": "success",
    "data": [ ... ]
  }
  ```

  ```json Error theme={null}
  {
    "status": "error",
    "error_code": 422,
    "message": "Invalid parameters"
  }
  ```
</CodeGroup>

## Error codes

| Code  | Meaning                    |
| ----- | -------------------------- |
| `422` | Invalid request parameters |
| `404` | Resource not found         |
| `429` | Rate limit exceeded        |
