Aller au contenu

Poser un bloc OOO/OOS manuel sur une unité (manager-only)

POST
/v1/units/{unitId}/out-of-service
curl --request POST \
--url https://example.com/v1/units/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/out-of-service \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "kind": "ooo", "oooFrom": "2026-07-10", "oooUntil": "2026-07-20" }'
unitId
required
string format: uuid

OooFrom >= aujourd’hui - 1 jour (grâce fuseaux). oooUntil optionnel (indéfini = durée indéterminée).

Media type application/json
object
kind
required

Ooo = hors service logiciel, oos = hors service physique

string
Allowed values: ooo oos
oooFrom
required
string format: date
Example
2026-07-10
oooUntil
string format: date
nullable
Example
2026-07-20

Bloc OOO/OOS posé

Media type application/json
object
data
required
object
refId
required
string
unitId
required
string format: uuid
nightsBlocked
integer
Example generated
{
"data": {
"refId": "example",
"unitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"nightsBlocked": 1
}
}

Corps invalide (date dans le passé, fenêtre invalide)

Media type application/json
object
code
required

Code machine de l’erreur

string
message
required

Message lisible

string
origin

Origine domaine de l’erreur (optionnel)

object
boundedContext
string
module
string
status
required
integer
traceId
required

Identifiant de corrélation pour le support

string
Example
{
"code": "RESERVATION_NOT_FOUND",
"message": "Réservation introuvable",
"status": 404
}

Non authentifié

Media type application/json
object
code
required

Code machine de l’erreur

string
message
required

Message lisible

string
origin

Origine domaine de l’erreur (optionnel)

object
boundedContext
string
module
string
status
required
integer
traceId
required

Identifiant de corrélation pour le support

string
Example
{
"code": "RESERVATION_NOT_FOUND",
"message": "Réservation introuvable",
"status": 404
}

Permission refusée (manager-only)

Media type application/json
object
code
required

Code machine de l’erreur

string
message
required

Message lisible

string
origin

Origine domaine de l’erreur (optionnel)

object
boundedContext
string
module
string
status
required
integer
traceId
required

Identifiant de corrélation pour le support

string
Example
{
"code": "RESERVATION_NOT_FOUND",
"message": "Réservation introuvable",
"status": 404
}

Unité introuvable

Media type application/json
object
code
required

Code machine de l’erreur

string
message
required

Message lisible

string
origin

Origine domaine de l’erreur (optionnel)

object
boundedContext
string
module
string
status
required
integer
traceId
required

Identifiant de corrélation pour le support

string
Example
{
"code": "RESERVATION_NOT_FOUND",
"message": "Réservation introuvable",
"status": 404
}

Capacité saturée (tout-ou-rien)

Media type application/json
object
code
required

Code machine de l’erreur

string
message
required

Message lisible

string
origin

Origine domaine de l’erreur (optionnel)

object
boundedContext
string
module
string
status
required
integer
traceId
required

Identifiant de corrélation pour le support

string
Example
{
"code": "RESERVATION_NOT_FOUND",
"message": "Réservation introuvable",
"status": 404
}