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

# HTTP data loader endpoint contract

> Build an authenticated source endpoint for Hyperline to fetch usage records with cursor or offset pagination.

This contract describes the endpoint **your system exposes**, which Hyperline calls to pull records. Configure the connection and schedule in the [data loader interface](https://docs.hyperline.co/docs/usage/usage-data-with-connectors.md#load-data-from-an-http-endpoint). HTTP connections must be enabled for your account.

## Endpoint and authentication

Use a public HTTPS URL without URL credentials, a query string or a fragment. Hyperline does not follow redirects or connect to private network addresses. Choose `GET` or a read-only `POST`; requests may be retried.

The source must accept one of these authentication methods:

| Method | Request header |
| - | - |
| Bearer token | `Authorization: Bearer <source-issued-token>` |
| API key | A custom header starting with `X-`, such as `X-API-Key` |

Use a credential issued by your source system, not a Hyperline API key. Hyperline encrypts the stored credential and does not return it in connection responses. OAuth is not supported. When editing a connection, leave the credential blank to keep it; changing the endpoint or authentication method/header requires entering the credential again.

## Request parameters

For `GET`, accept parameters in the URL query string. For `POST`, accept the same parameters in a JSON body. Hyperline sends `Accept: application/json` and `Content-Type: application/json`.

| Parameter | Sample | Scheduled import |
| - | - | - |
| `limit` | `5` | `1000` |
| `from` | Omitted | Inclusive lower bound, UTC ISO 8601 |
| `to` | Omitted | Exclusive upper bound, UTC ISO 8601 |
| `cursor` | Omitted on the first page | Previous response's `nextCursor`; omitted on the first page |
| `offset` | `0` in offset mode | Starts at `0`, then increases by the number of records received |

Only the selected pagination mode is used. Accept absent date bounds and return up to `limit` records of any age for samples. When dates are provided, return records matching `from <= timestamp < to`. The source must accept imports with `limit=1000`; accepting only the sample's smaller limit is insufficient. No total-count endpoint or response field is required.

### Import window

* On the first run, `from` is 24 hours before the data loader was created.
* On subsequent runs, `from` is 24 hours before the previous successful fetch window's `to`.
* `to` is captured when the current fetch starts. All pages and retries in that run use the same bounds.
* A failed fetch does not advance the checkpoint. The checkpoint tracks records fetched and queued, not completion of ingestion or billing updates.

> [!WARNING]
>
> There is no configurable start date or automatic historical backfill. Records older than the first window are excluded even if they appear in a sample. Late records and updates outside the overlap window may require a separate import; contact support through the in-app chat.

## Response records

Return a JSON object containing a `data` array. Each record is flat, like a database row:

| Field | Requirement |
| - | - |
| `id` | Stable string or safe integer identifying the record |
| `customerId` | String containing the Hyperline customer ID or external customer ID |
| `timestamp` | UTC ISO 8601 timestamp, for example `2026-11-16T10:00:00.000Z` |
| Additional fields | Usage properties such as `quantity`, with string, number, boolean or null values |

Keep usage properties at the same level as `id`, `customerId` and `timestamp`; do not nest them under `usage` or `record`. Arrays and nested objects are not supported. Return no more records than the requested `limit`. Stable IDs allow the existing ingestion pipeline to deduplicate overlapping fetches.

For example, the final page of a cursor-paginated response can contain:

```json theme={null}
{
  "data": [
    {
      "id": "record_123",
      "customerId": "customer_456",
      "timestamp": "2026-11-16T10:00:00.000Z",
      "quantity": 42
    }
  ],
  "nextCursor": null
}
```

### Cursor pagination

Include `nextCursor` in every response. Use a non-empty string when another page exists and `null` on the final page. Hyperline sends that string as `cursor` on the next request. Repeated cursors are rejected.

### Offset pagination

Return the `data` array; `nextCursor` is not required. Hyperline increases `offset` by the number of records received and stops when a page contains fewer records than `limit`. An exact multiple of the page size requires a final empty page.

Use stable ordering throughout pagination so changes to your source do not cause records to be skipped between pages.

## Failures and limits

| Limit | Value |
| - | - |
| Response size | 8 MiB |
| Request timeout | 30 seconds |
| Pages per import | 10,000 |
| Fetch-duration guard | Approximately 15 minutes |

HTTP `429` and `5xx` responses can be retried twice. Hyperline honors `Retry-After` delays up to 30 seconds; longer delays fail the pull for the scheduler to handle. Authentication failures, invalid JSON and invalid response records fail the pull. Repeated source failures stop automatic refresh attempts after the existing three-failure cutoff.

Imports use the same ingestion, customer assignment and billing pipeline as other data loaders. The total record count is unknown while pages are being fetched. A chunk error does not discard the final fetched total: successful ingestion retries can still trigger batch completion, while the HTTP batch retains its error status. Completion waits for all queued records to be processed.

## Troubleshooting

* **The sample succeeds but the import returns `400`:** check that the endpoint accepts `limit=1000` and the `from`/`to` date parameters, not only the sample request.
* **The sample has records but the import is empty:** compare record timestamps with the import window. Samples have no date filter.
* **Rows are missing across pages:** verify stable ordering, cursor progression and filtering before returning each page.
* **HTTP is not offered in the connection form:** contact support through the in-app chat to check availability for your account.

For setup steps, see [Pull usage data with connectors](https://docs.hyperline.co/docs/usage/usage-data-with-connectors.md).


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