# Custom REST API

> Connect any software with a REST API that returns JSON (POS, CRM, inventory, in-house ERP) by declaring the base URL, authentication, endpoints and pagination, then test the call before adding it.

Use this connector when your software is not in the [connector library](/en/docs/sources/connector-library) but has a REST API that returns JSON. It needs the Starter plan or above.

## 1. URL and authentication

- **API base URL**: must start with `https://`. DataxLand only sends read requests, and only to the host of this URL.
- **Authentication**:

| Type | You fill in |
| --- | --- |
| No authentication | — |
| API key | The key, the **header or parameter name**, and whether to **send it in** a header or the query string |
| Bearer token | The token |
| Basic (username, password) | Username, password |
| OAuth2 client credentials | Token URL, client ID, client secret, scope |

- **Extra headers** (up to 30): fixed headers the API needs. Do not put secrets here; secrets belong in the authentication fields, which are encrypted at rest.

## 2. Endpoints

Each endpoint (1–20) becomes one table:

| Field | Example |
| --- | --- |
| Table name | `orders` |
| Path | `/v1/orders` |
| Parameters | `updated_from` = `{{ start_date }}` |
| Path to the record list | `data.items` |
| Primary key | `id` |
| Pagination | see below |
| Maximum pages | 1000 by default |

**Pagination**: none, by page number, by offset (limit/offset), by cursor, or by next-page link.

Shared fields: **Fetch data from date** (the value of `{{ start_date }}`) and **Timeout per call (seconds)**, 30 by default.

## 3. Test the call

Click **Try it**: DataxLand calls the endpoint and shows up to 20 records plus the **Inferred columns**, with personal data already masked. Adjust the list path or pagination until it looks right, then add the source.

## Current limits

- Calls use GET, POST or GraphQL; responses must be JSON.
- Each refresh reads everything again (filtered from **Fetch data from date**).

## Related

- [Connector library](/en/docs/sources/connector-library)
- [Connect your data](/en/docs/connect-data)
- [Personal data masking](/en/docs/review/pii)
