---
title: "Create multiple maintenances"
method: POST
path: "/operations/v1/maintenances/bulk"
tags: ["Maintenance"]
---

# Create multiple maintenances

`POST /operations/v1/maintenances/bulk`

Use this call to create multiple maintenances.<br>You must have at least one of these scopes: 'maintenances.create, setup.manage'.

## Headers

- `Idempotency-Key` string

## Request body

- BulkCreateMaintenancesModel
  - `maintenances` CreateMaintenanceModel[], required — The list of maintenances
    - `unitId` string, required — The id of the unit
    - `from` string, date-time, required — Date and time the maintenance begins. Has to be today or on a day in the future<br />A date and time (without fractional second part) in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
    - `to` string, date-time, required — Date and time the maintenance ends. Has to be later than from<br />A date and time (without fractional second part) in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
    - `type` 'OutOfService' | 'OutOfOrder' | 'OutOfInventory', required — The type of maintenance that is planned for the unit. A small repair (OutOfService), a bigger disfunction that does not allow to sell the unit (OutOfOrder) or is it under construction (OutOfInventory)
    - `description` string, nullable — Description of the maintenance

## Response `200`

Success.

- BulkMaintenancesCreatedModel
  - `ids` string[], required — The maintenance ids

## Other responses

- `400` — Bad request.
- `401` — You are unauthorized.
- `403` — Forbidden.
- `404` — The Request-URI could not be found.
- `415` — Unsupported media type.
- `422` — Validation errors in the request body or query params.
- `499` — Client closed request.
- `500` — An unexpected error occurred.
- `503` — The server is currently unavailable. Please try later.

---

[API](https://skmtc.dev/apaleo/apis/apaleo-operations-api.md) · [All operations](https://skmtc.dev/apaleo/apis/apaleo-operations-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apaleo/apaleo-operations-api/revisions/42bfd5d5fecf/schema)
