Aller au contenu

Pré-attribuer une unité physique à une réservation

POST
/v1/reservations/{id}/pre-assign
curl --request POST \
--url https://example.com/v1/reservations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pre-assign \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "unitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "Demande client chambre 214" }'
id
required
string format: uuid

Identifiant de la réservation

Media type application/json
object
unitId
required

Unité physique à pré-attribuer

string format: uuid
unitTypeId
required

Type de l’unité (doit être réservé sur le dossier)

string format: uuid
reason
string
nullable >= 1 characters <= 500 characters
Example
Demande client chambre 214

Unité pré-attribuée

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

Corps 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 ou scope IDOR

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
}

Réservation ou 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
}

Unité indisponible / type incohérent / statut résa incompatible

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
}