Aller au contenu

Déroger le tarif d'une réservation confirmée (prix négocié, NF203)

POST
/v1/reservations/{id}/derogate
curl --request POST \
--url https://example.com/v1/reservations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/derogate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "pct": 10, "targetTotalCents": "9000", "reason": "Geste commercial" }'

Re-cote le prix public, applique la dérogation (≤ public) et re-tarife via reprice (journal NF203 append-only). Manager/director illimités ; réceptionniste plafonné (scope derogation, fail-closed).

id
required
string format: uuid

Identifiant de la réservation confirmée

Prix négocié. pct (0..100) OU targetTotalCents (≤ public) + reason.

Media type application/json
object
pct
number
<= 100
Example
10
targetTotalCents
string
Example
9000
reason
required
string
>= 1 characters <= 500 characters
Example
Geste commercial

Tarif dérogé (reprice journalisé)

Media type application/json
object
data
required
object
reservationId
required
string format: uuid
publicTotalCents
required

Total public coté (bigint string)

string
newTotalCents
required

Total appliqué après dérogation (bigint string)

string
gapCents
required

Écart consenti public − appliqué (bigint string)

string
currency
required
string
Example
{
"data": {
"currency": "EUR"
}
}

Bloc dérogation invalide (majoration refusée, pct hors bornes, motif manquant)

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
}

Plafond de rôle dépassé / non configuré (fail-closed)

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

Réservation non confirmée (dérogation pré-check-in uniquement)

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
}