Aller au contenu

Créer un profil client (guest)

POST
/v1/guests
curl --request POST \
--url https://example.com/v1/guests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "identity": { "firstName": "example", "lastName": "example", "birthDate": "2026-04-15", "birthCity": "example", "birthCountryCode": "example", "nationality": "example" }, "primaryEmail": "hello@example.com", "primaryPhone": "example", "preferredLanguage": "example", "customerType": "example" }'
Media type application/json
object
identity
required
object
firstName
required
string
lastName
required
string
birthDate
required

Date de naissance obligatoire (YYYY-MM-DD)

string format: date
birthCity
string
nullable
birthCountryCode
string
nullable
nationality
string
nullable
primaryEmail
required

Email obligatoire — NON unique, partageable entre profils (familles, décision 0030) ; un doublon potentiel est signalé via GET /check-duplicate, jamais bloquant à la création

string format: email
primaryPhone

Téléphone primaire (format E.164, ex. +33612345678)

string
nullable
preferredLanguage
string
nullable
customerType
string
nullable
Example generated
{
"identity": {
"firstName": "example",
"lastName": "example",
"birthDate": "2026-04-15",
"birthCity": "example",
"birthCountryCode": "example",
"nationality": "example"
},
"primaryEmail": "hello@example.com",
"primaryPhone": "example",
"preferredLanguage": "example",
"customerType": "example"
}

Profil créé

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

Données invalides (champs obligatoires manquants, format email/date)

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
}