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

# API Overview (v2)

> Base URL and authentication changes for Clopos Open API v2

<Callout type="info">
  Version 2 of the Clopos Open API introduces JWT-based authentication and
  simplifies request headers. After authentication you only need to send
  `x-token` with each call.
</Callout>

## Base URL

<CodeGroup>
  ```bash Production theme={null}
  https://integrations.clopos.com/open-api/v2
  ```
</CodeGroup>

## What changed in v2

* Endpoints live under `/open-api/v2`.
* `/auth` now requires an `integrator_id` along with your existing client credentials.
* `venue_id` is **not** part of the auth payload.
* Subsequent requests require only the `x-token` header; brand and venue headers are no longer needed.
* Auth responses now return both `expires_in` and `expires_at` (epoch seconds).

## Authentication flow

<Steps>
  <Step title="Collect credentials">
    Use your `client_id`, `client_secret`, `brand`, and `integrator_id`.
  </Step>

  <Step title="Call /v2/auth">
    Exchange credentials for a JWT access token and note the `expires_at` value.
  </Step>

  <Step title="Call other endpoints">
    Include only `x-token` with the JWT you received.
  </Step>
</Steps>

### Required header for all v2 endpoints (except `/auth`)

```bash theme={null}
x-token: your_jwt_token_here
```

### Sample authenticated request

```bash theme={null}
curl -X GET https://integrations.clopos.com/open-api/v2/orders \
  -H "x-token: your_jwt_token_here"
```
