Aller au contenu

Facturer une période de consommation (imputation folio)

POST
/v1/meters/{id}/bill-consumption
curl --request POST \
--url https://example.com/v1/meters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/bill-consumption \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "endReadingId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "folioId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "folioKind": "stay", "businessDate": "2026-04-15" }'
id
required
string format: uuid
Media type application/json
object
endReadingId
required
string format: uuid
folioId
required
string format: uuid
folioKind
required
string
Allowed values: stay contract
businessDate
required
string format: date

Consommation facturée (idempotent — alreadyBilled=true si déjà facturé)

Media type application/json
object
data
required
object
folioEntryId
required
string format: uuid
alreadyBilled
required
boolean
amountCents
required

Montant facturé en centimes (bigint string)

string
Example generated
{
"data": {
"folioEntryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"alreadyBilled": true,
"amountCents": "example"
}
}

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
}

Compteur ou relevé 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
}