Aller au contenu

Créer un contingent (allotment / tentative) et armer son cutoff

POST
/v1/allotments
curl --request POST \
--url https://example.com/v1/allotments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ratePlanId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "channelType": "to", "channelExternalId": "example", "allotmentType": "allotment", "currency": "EUR", "periodFrom": "2026-09-01", "periodTo": "2026-09-07", "unitAllocations": [ { "unitTypeId": "example", "quantity": 1 } ], "cutoffDate": "2026-08-01", "minimumPickupPercent": 70, "penaltyPerRoomNightCents": "5000", "complimentaryRooms": 1, "contractualHeadcount": 1, "invoicingMode": "master_single", "billingFolioId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

PenaltyPerRoomNightCents en centimes (bigint string). Un allotment contractuel exige une pénalité ; un tentative non.

Media type application/json
object
establishmentId
required
string format: uuid
ratePlanId
required
string format: uuid
channelType
required
string
Allowed values: to agency group corporate direct
channelExternalId
string
nullable <= 200 characters
allotmentType
required
string
Allowed values: allotment tentative
currency
required
string
Allowed values: EUR GBP
periodFrom
required
string format: date
Example
2026-09-01
periodTo
required
string format: date
Example
2026-09-07
unitAllocations
required
Array<object>
>= 1 items
object
unitTypeId
required
string
quantity
required
integer
>= 1
cutoffDate
required
string format: date
Example
2026-08-01
minimumPickupPercent
required
number
<= 100
Example
70
penaltyPerRoomNightCents
string
nullable
Example
5000
complimentaryRooms
integer
contractualHeadcount
integer
nullable >= 1
invoicingMode
string
Allowed values: master_single individual_per_sub
billingFolioId
string format: uuid
nullable

Contingent créé

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