# Bulk assign tariff groups

`POST https://api.parklio.com/v2/tariffs/{id}/groups`

This endpoint allows the user to bulk assign tariff groups by using their ids

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

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | number[] | yes | IDs of the groups to assign to the tariff |

```json
{
  "ids": [
    3,
    8,
    12
  ]
}
```

## 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"
    }
  ]
}
```

