Corporate Event
Step 1: How to check a valid corporate event
When a user go to a restaurant page, if it’s a corporate event, there will be query parameter cvid in the url, we’ll have to check if it’s valid or not by checking it using endpoint below
POST
`/corporates/events/validate`
payload: {
secretId: <cvid we got from url>
}
If the endpoint returns correct restaurant id, it means the corporate event is valid.
Step 2: Get Restaurant Packages
After checking the corporate event is valid or not, we’ll fetch the restaurant packages data. Don’t forget to add corporateEventId to the parameter.
GET
`/restaurant_packages.json`
params: {
restaurantId,
includeRestaurant,
corporateEventId: <cvid we got from url>,
isVisibleForStaff
}
Step 3: Hide Prices
If the corporate event is valid,
- Hide the price of the package in the package card.
- Hide the price of the package & the total price in the payment page.
- Hide the price of the package & the total price in the confirmation page.
Step 4: Booking
When a user make a booking, add corporateEventId to the payload.
corporateEventId: corporateEventStore.isValid
? corporateEventStore.eventId
: undefined,