Aller au contenu

Créer un contrat saisonnier (draft)

POST
/v1/long-stay-contracts
curl --request POST \
--url https://example.com/v1/long-stay-contracts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "guestProfileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitType": "example", "periodStart": "2026-04-01", "periodEnd": "2026-04-15", "totalAmountCents": "example", "currency": "EUR", "installments": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "seqNo": 1, "dueDate": "2026-04-15", "amountCents": "example", "currency": "EUR" } ], "noticePeriodDays": 30, "depositNature": "arrhes", "terminationPolicy": "pro_rata_nuits", "tourismTaxExempt": false, "tourismTaxExemptBasis": "example", "previousContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Contrat saisonnier. Montants en centimes bigint (integer côté JSON). Installments min 1.

Media type application/json
object
establishmentId
required
string format: uuid
guestProfileId
required
string format: uuid
unitId
string format: uuid
nullable
unitType
string
nullable
periodStart
required
string format: date
Example
2026-04-01
periodEnd
string format: date
nullable
totalAmountCents
required

Montant total en centimes (bigint string, ex: “300000”)

string
/^\d+$/
currency
required
string
Allowed values: EUR GBP
installments
required
Array<object>
>= 1 items
object
id
required
string format: uuid
seqNo
required
integer
>= 1
dueDate
required
string format: date
amountCents
required

Centimes (bigint string)

string
/^\d+$/
currency
required
string
Allowed values: EUR GBP
noticePeriodDays
integer
default: 30
depositNature
string
nullable
Allowed values: arrhes acompte
terminationPolicy
string
default: pro_rata_nuits
Allowed values: pro_rata_nuits forfait_frais contractuel
tourismTaxExempt
boolean
tourismTaxExemptBasis
string
nullable <= 500 characters
previousContractId
string format: uuid
nullable

Contrat créé (draft)

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

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
}