Verify a Guest by e-mail
The Guest Verification Flow is designed to verify a guest's identity and automatically populate their information fields upon successful verification.
Flow Steps
1. Retrieve the organization's guest verification settings.
The system needs to determine which fields are required for verification. This is done by retrieving the current GuestVerificationSpecification. The e-mailadres will not be returned in the response, but is always required! Depending on the response, you might need to ask the user for more information than just the e-mailadres.
GET /api/guest_verification_specifications/currentRequest Parameters:
- organization (integer) *required, the organization id.
Response:
The response will include a list of required fields (or an empty list), which can include:
birthDate, the guest's birth date.membership, the guest's membership code.
{
"id": 0,
"guestFields": [
"birthDate"
]
}If no GuestVerificationSpecification are found for the organization, then the response will be null.
2. Send Verification E-mail
Once the required fields are obtained, a verification email should be sent to the guest.
Endpoint :
POST /api/guest_verifications/sendRequest Parameters:
- organization (integer) *required, the organization id.
- reservation (integer) *required, the current session reservation id.
- token (string) *required, the reservation's token.
Request Body:
The request body has at least the required field "email". The data property should be filled with the fields obtained from the GuestVerificationSpecification. If the GuestVerificationSpecification response was null, you can either leave data property empty or remove it completely.
{
"email": "[email protected]",
"data": {
"birthDate": "1992-07-02T00:00:00Z",
"membership": "1"
}
}Response:
If the email was successfully sent, then the response will be null. Otherwise, you will receive an error message with what went wrong. If a matching guest is found, the guest will receive an email containing a six-digit numeric verification code. If no matching guest is found, the email will inform the user that no existing guest could be found.
3. Verify the Guest
The guest submits the verification code received via email.
POST /api/guest_verifications/verifyRequest Body:
{
"email": "[email protected]",
"code": "123456"
}Response:
If the code is incorrect, a 404 Not Found error is returned. If the code is correct, the response will contain the guest entity, including the verified guest’s information fields.
Summary
By following these steps, the system ensures that the guest's identity is verified, and their information is accurately retrieved and autofilled.
Updated 13 days ago