Aller au contenu

Ouvrir un wallet cashless (idempotent)

POST
/v1/wallets
curl --request POST \
--url https://example.com/v1/wallets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "stayId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "mode": "prepaid", "currency": "EUR", "mediumRef": "example", "creditLimitCents": "10000", "correlationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
Media type application/json
object
stayId
required
string format: uuid
establishmentId
required
string format: uuid
mode
required
string
Allowed values: prepaid postpaid
currency
required
string
>= 3 characters <= 3 characters
Example
EUR
mediumRef

Référence support physique (bracelet/QR)

string
nullable
creditLimitCents

Plafond de crédit en centimes (bigint string). Mode postpaid seulement.

string
nullable
Example
10000
correlationId
required
string format: uuid

Wallet ouvert ou existant retourné

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

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 (cashless.manage)

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
}