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","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", "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
string format: date
birthCity
string
birthCountryCode
string
nationality
string
primaryEmail
string format: email
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", "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
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}