# Create a tariff

`POST https://api.parklio.com/v2/tariffs`

Creates a tariff: when it applies (dates, season, weekly `schedules`), who it applies to (`group_ids`; none means everyone), and how a stay is priced. Only `name` is required. Assign it to zones with `PUT /v2/zones/{id}/tariffs/{tariffId}`.

When an LPR camera reads a plate that isn't whitelisted, a matching tariff lets it in (reason `tariff`). In `schedules`, `weekday` 0 is **Monday**, and times are in the lot's time zone. Prices are calculated by payment machines, not by the API. See the [Sessions and tariffs](/guides/sessions-and-tariffs#3-set-up-tariffs) guide.

**Auth:** `Authorization: Bearer <token>`

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `group_ids` | number[] | no | IDs of the groups this tariff applies to |
| `name` | string | yes | Name of the tariff |
| `description` | string | no | Description of the tariff |
| `start_time` | string | no | Date and time from which the tariff becomes active. The tariff is not applied before this timestamp. |
| `end_time` | string | no | Date and time until which the tariff remains active. The tariff is not applied after this timestamp. |
| `season_start` | string | no | Seasonal start date of the tariff. Only the day and month are evaluated; the year is ignored. The tariff is applied only within this day–month range each year. |
| `season_end` | string | no | Seasonal end date of the tariff. Only the day and month are evaluated; the year is ignored. The tariff is applied only within this day–month range each year. |
| `interval` | number | no | Charging interval in minutes (minimum 15) |
| `price` | number | no | Base price for the interval |
| `exit_free_time_interval` | number | no | Exit free time in minutes |
| `entry_free_time_interval` | number | no | Entry free time in minutes |
| `maxima` | number | no | Maximum price allowed for the tariff |
| `max_time_of_stay` | number | no | Maximum time of stay in minutes |
| `gratis_time` | number | no | Gratis time in minutes before charging starts |
| `currency_id` | number | no | Currency ID (e.g., 1 = EUR) |
| `price_progression_type` | string (`flat`, `linear`, `exponential`, `incremental`) | no | How the price increases (flat, linear, etc.) |
| `max_affected_members_per_group` | number | no | Maximum amount of members what will be allowed by that tariff per group |
| `schedules` | object[] | yes |  |

```json
{
  "group_ids": [
    2,
    9
  ],
  "name": "Weekend Special",
  "description": "Special pricing for weekends only",
  "start_time": "2026-01-15T09:30:00.000Z",
  "end_time": "2026-01-15T09:30:00.000Z",
  "season_start": "2025-01-01",
  "season_end": "2025-03-01",
  "interval": 15,
  "price": 2.5,
  "exit_free_time_interval": 10,
  "entry_free_time_interval": 5,
  "maxima": 20,
  "max_time_of_stay": 240,
  "gratis_time": 30,
  "currency_id": 1,
  "price_progression_type": "flat",
  "max_affected_members_per_group": 3,
  "schedules": [
    {
      "weekday": 0,
      "start_time": "08:00:00",
      "end_time": "17:00:00"
    }
  ]
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 1,
    "name": "Standard Day Tariff",
    "description": "Applies during regular business hours",
    "start_time": "2026-01-15T09:30:00.000Z",
    "end_time": "2026-01-15T09:30:00.000Z",
    "season_start": "2020-01-01",
    "season_end": "2020-12-01",
    "interval": 60,
    "price": 200,
    "exit_free_time_interval": 10,
    "entry_free_time_interval": 5,
    "maxima": 2000,
    "max_time_of_stay": 480,
    "gratis_time": 20,
    "currency": "EUR",
    "price_progression_type": "linear",
    "account_id": 1,
    "schedules": [
      {
        "id": 1,
        "weekday": 1,
        "start_time": "08:00",
        "end_time": "18:00"
      }
    ],
    "max_affected_members_per_group": 20,
    "zones": [
      {
        "id": 1,
        "name": "Premium Parking Zone"
      }
    ],
    "groups": [
      {
        "id": 5,
        "name": "Employees"
      }
    ]
  }
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 403 — User does not have permission to access requested resource.

```json
{
  "success": false,
  "errors": [
    {
      "code": 4,
      "message": "No permission."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

### 422 — Some of the provided request parameters are missing or are invalid. User should add/change them according to response message.

```json
{
  "success": false,
  "errors": [
    {
      "code": 23,
      "message": "Validation error",
      "field": "field"
    }
  ]
}
```

