Créer un profil client (guest)
POST
/v1/guests
const url = 'https://example.com/v1/guests';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section intitulée « Authorizations »Request Body required
Section intitulée « Request Body required » 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
birthCountryCode
string
nationality
string
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
preferredLanguage
string
customerType
string
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"}Responses
Section intitulée « Responses »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}