Memberships
Exposes Ventrata membership capabilities to OCTO.
Allow member benefits to be redeemed when making new bookings.
To use this capability add octo/memberships to your Octo-Capabilities header.
Member Login
The first step is to provide some interface for a member login, provide a button on your interface called "Member Login" which when clicked you provide a login form for the member, with 3 possible ways:
Email We'll then send a verification code to the customer's email which you'll need to repeat in the request to verify the guest's identity.
Mobile We'll then send a verification code to the customer's email which you'll need to repeat in the request to verify the guest's identity.
Reference If the booking exists we will then ask for a last name to verify the the guest's identity
Once you've picked an authentication method and collected the info, you make a request:
POST https://api.ventrata.com/octo/memberships/lookup
Request Body
string
The customer's email
mobile
string
The customer's mobile
reference
string
Any reference of the booking
verification
string
A verification code
You should send either email, mobile or reference.
Some example request/responses for each method are shown below:
The response will return 400 Bad Request if no memberships were found, otherwise we'll return a message with "verified": false you should then prompt for the verification code and repeat the request with this value.
Verification code for reference will be the last name of the guest. For email and mobile the verification value will be a 6 digit code sent to their email/mobile - whichever was provided.
Once you repeat the request, including the verification field with the verification code, it will verify the member and return a list of memberships that they have.
If multiple memberships were returned you should provide an interface to pick one, using title and/or contact to differentiate between them.
Product Benefits
Memberships can have multiple benefits, once you have logged in and selected a membership it's important you include a membership object to each request.
GET https://api.ventrata.com/octo/products/{id}
For example to the get product endpoint including the membership object as query parameters:
You should repeat the reference and verification you provided in the login step, and just add id to specify the membership you want to apply.
Memberships with product benefits will add additional units to the list, you can tell which units belong to the membership benefit by an additional membershipBenefitobject which is otherwise null. For example:
If you're rendering this on a page showing the available units to choose from, we recommend you grouping units by membershipBenefit.id and display the units in a highlighted box, for example:
Units with "membershipBenefit": null should go at the end as they are now, these are the regular units that weren't made available with the membership.
You would include these units within the unitItems array as you do normally, making sure you are including the membershipobject in the booking request as you do normally.
Offers Benefits
Memberships also provide discounts on availability when using the octo/offerscapability.
When you call POST /availability and POST /availability/calendar you should also send the membership object like so:
When using this alongside the octo/offers capability we'll add a membershipBenefit field to the offer object, like so:
Nothing needs to be done to select this offer, it's automatically applied as if you had entered an offerCode or are using a public promotion. The only thing to consider is if offer.membershipBenefit is set, you should display membershipBenefit.title/description in place of offer.title/description if you are displaying that at anywhere.
Booking / Order
Finally when it comes to creating the booking or order (if you're using the octo/cart capability) simply include the membership object as you have been doing in the steps above.
This will associate the booking to the membership and automatically apply any benefits available. For example:
We'll then include the membershipand membershipBenefit on the order/booking object so it's clear to see what has been applied.
Last updated
Was this helpful?