Aller au contenu

Créer une sous-réservation contre le contingent (pickup)

POST
/v1/allotments/{id}/reservations
curl --request POST \
--url https://example.com/v1/allotments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reservations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "checkInDate": "2026-09-01", "checkOutDate": "2026-09-03", "unitTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "quantity": 1, "ratePlanId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "guestProfileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "channelType": "group", "segment": "group", "bookerContactName": "CE Acme", "bookerContactEmail": "ce@acme.fr", "bookerPersonGuestId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
id
required
string format: uuid

BusinessDateAtCreation résolu CÔTÉ SERVEUR (ADR-00D78) — ne pas envoyer.

Media type application/json
object
checkInDate
required
string format: date
Example
2026-09-01
checkOutDate
required
string format: date
Example
2026-09-03
unitTypeId
required
string format: uuid
quantity
integer
default: 1 >= 1
ratePlanId
required
string format: uuid
guestProfileId
required
string format: uuid
channelType
required
string
Example
group
segment
required
string
Example
group
bookerContactName
required
string
Example
CE Acme
bookerContactEmail
required
string format: email
Example
ce@acme.fr
bookerPersonGuestId
string format: uuid
nullable

Sous-réservation créée

Media type application/json
object
data
required
object
reservationId
required
string format: uuid
Example generated
{
"data": {
"reservationId": "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
}

Contingent 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
}

Contingent dépassé ou non réservable

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
}