vincitable url https://reserve.vincitables.dev/bookingserver.php
localhost url http://localhost:8000
# All Booking Server APIs Endpoints

# (a) CheckAvailability
curl --user username:password -X POST http://localhost:8000/v3/CheckAvailability -d '{"slot":{"merchant_id":"default-2","service_id":"reservation","start_sec":"1618845600","duration_sec":"1800","resources":{"room_id":"A-dining-room","party_size":2},"confirmation_mode":"CONFIRMATION_MODE_SYNCHRONOUS"}}'

# (b) BatchAvailabilityLookup 
curl --user "username:password" -X POST http://localhost:8000/v3/BatchAvailabilityLookup -H "Content-Type: application/json" --data '{"merchant_id":"default-2","slot_time":[{"service_id":"reservation","start_sec":"1618862400","duration_sec":"1800","resource_ids":{"room_id":"23","party_size":2}}]}'

# (c) CreateBooking   
curl -X POST http://localhost:8000/bookingserver.php/v3/CreateBooking --user username:password -d '{"slot":{"merchant_id":"default-2","service_id":"reservation","start_sec":"1618862400","duration_sec":"180","resources":{"room_id":"23","party_size":2},"confirmation_mode":"CONFIRMATION_MODE_SYNCHRONOUS"},"user_information":{"user_id":"0","given_name":"Jane","family_name":"Doe","telephone":"+351 938 477 950","email":"test@example.com"},"payment_information":{"prepayment_status":"PREPAYMENT_NOT_PROVIDED"},"idempotency_token":"34527gdeea"}'

{"slot":{"merchant_id":"default-2","service_id":"reservation","start_sec":"1616698800","duration_sec":"180","resources":{"room_id":"23","party_size":7},"confirmation_mode":"CONFIRMATION_MODE_SYNCHRONOUS"},"user_information":{"user_id":"0","given_name":"Jane","family_name":"Doe","telephone":"+1 800-789-7890","email":"test@example.com"},"payment_information":{"prepayment_status":"PREPAYMENT_NOT_PROVIDED"},"idempotency_token":"122884"}

# (d) UpdateBooking 
# (1) to update duration and datetime
curl --user "username:password" -X POST http://localhost:8000/v3/UpdateBooking -H "Content-Type: application/json" --data '{"booking":{"booking_id":"36069-default", "slot":{"start_sec":"1618862400", "duration_sec":"1800", "resource_ids": {"party_size":"4"}}}}'
# (2) to cancel it
curl --user "username:password" -X POST http://localhost:8000//bookingserver.php/v3/UpdateBooking -H "Content-Type: application/json" --data '{"booking":{"booking_id":"36069-default", "status": "CANCELED", "slot":{"start_sec":"1618862400", "duration_sec":"180"}}}'

# (e) GetBookingStatus
curl --user "username:password" -X POST http://localhost:8000/v3/GetBookingStatus -H "Content-Type: application/json" --data '{"booking_id":"35914-default"}'

# (f) ListBookings
curl --user "username:password" -X POST http://localhost:8000/v3/ListBookings -H "Content-Type: application/json" --data '{"user_id": 0}'


# Real Time Update Booking APIs

# (a) updateBooking Request 
curl -X POST https://booking-server-php.herokuapp.com/real_time_updates.php/rtu/BookingNotification/UpdateBooking?updateMask=startTime,duration,partySize -H "Content-Type: application/json" --data '{"bookingId":"35887-default", "startTime": "2021-03-22T20:00:00Z", "duration": "3600s", "partySize": "2"}'
# (b) CancelBooking Request
curl -X POST https://booking-server-php.herokuapp.com/real_time_updates.php/rtu/BookingNotification/UpdateBooking?updateMask=status -H "Content-Type: application/json" --data '{"bookingId":"35885-default", "status": "CANCELED"}'

https://api.vincitables.dev/1.0/google/getBooking
curl -X POST https://api.vincitables.dev/1.0/google/getBooking -d suffix="default" -d id="35909"

# (b) Request to Vincitable API to get table_list of available tables
curl -X POST https://api.vincitables.dev/1.0/bookings/searchAvailableTables -d suffix="default" -d restaurant=2 -d day="2021-04-19" -d time="20:00" -d party_size=2 -d duration=120 -d widget=1

# (c) create customer in by0vj_entities
curl -X POST https://api.vincitables.dev/1.0/customer/upsert.php -d suffix="default" -d entity=0 -d first_name="usman" -d last_name="haider" -d campaign_email="on" -d campaign_sms="on" -d email="usmanhaider@gmail.com"


# (c) create customer with google_user_id
curl -X POST https://api.vincitables.dev/1.0/customer/upsert.php -d suffix="default" -d entity=0 -d first_name="usman" -d last_name="google" -d email="usmanhaider+google@gmail.com" -d google_user_id="1234"


# (d) create booking for customer id returned by by customer request
curl -X POST https://api.vincitables.dev/1.0/bookings/upsert.php -d id_account=1 -d suffix="default" -d unit=2 -d entity=53727961 -d day="2021-04-07" -d time="20:00:00" -d duration=30 -d pax="2" -d mobile_country=15 -d table=11 -d google=1 -d idempotency_token=1232121341241241
-d mobile="938 477 950" -d name="Pedro" -d email="componentslab@gmail.com"

# (d) update booking
 curl -X POST https://api.vincitables.dev/1.0/bookings/upsert.php -d id_account=1 -d suffix="default" -d unit=2 -d entity=53727961 -d unit=2 -d day="2021-04-04" -d time="22:00" -d duration="30" -d pax=4 -d reference="LVC294ECBF2"

curl -X POST https://api.vincitables.dev/1.0/bookings/cancel.php -d suffix="default" -d reference="DS190560785" -d acc=1 -d unit=19 -d user="53727964" -d cancel_reason=""








{"reference":"LVC27615454","id":"35904","channel_code":"ONLINE","booking_reasons":"0","special_requests":"","promotion_id":"0","visit_date":"2021-04-23","visit_time":"23:00:00","pax":"2","table":"11","booking_duration":"60","booking_status":"BK","comments":"","restaurant":"2","promotion_total":"0.00","promotion_deposit":"0.00","entity_comments":"","entity":"53727960","first_name":"google","last_name":"user","campaign_email":"0","campaign_sms":"0","email":null,"tel_country_code":null,"mob_country_code":null,"telephone":null,"mobile":null,"area":"1","area_name":"RESTAURANTE","promo_name":null,"promo_description":null,"customer_name":"","customer_email":"","customer_mobile_country":"","google_customer_id":"0","table_number":"11","timediffseconds":"2718957"}