Aller au contenu

Créer un produit annexe (catalogue)

POST
/v1/ancillary-products
curl --request POST \
--url https://example.com/v1/ancillary-products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "code": "example", "label": "example", "kind": "unit_upgrade", "unitPriceCents": "2500", "currency": "EUR", "vatCategory": "accommodation", "chargeSubtype": "example", "targetUnitTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "description": "example" }'
Media type application/json
object
establishmentId
required
string format: uuid
code
required
string
label
required
string
kind
required
string
Allowed values: unit_upgrade early_checkin late_checkout extra activity
unitPriceCents
required

Prix unitaire en centimes (bigint string)

string
Example
2500
currency
required
string
Allowed values: EUR GBP
vatCategory
required
string
Allowed values: accommodation food_beverage_onsite standard reduced zero
chargeSubtype
string
nullable
targetUnitTypeId

Requis SSI kind=unit_upgrade

string format: uuid
nullable
description

Description libre (aide au comptoir), max 500 caractères

string
nullable <= 500 characters

Produit créé

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

Corps invalide ou invariant violé

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