Booking the reservation
Once you have the time, party size, and section for the reservation, you are ready to book.
To book a reservation at a restaurant for 2 at October 15, 2017, 3:00PM UTC you would issue the following request:
curl --request POST \
--url https://sandbox.seatninja.com/v2/reservations/{restaurantId}/reservation \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{"customerInformation":{"id":"c0e86a76-7795-4047-b700-9d7163b5137d","firstName":"John","lastName":"Doe","phoneNumber":"5555555555","email":"[email protected]"},"time":"2017-10-15T22:00:00.000Z","partySize":2}'
If the restaurant had a patio section and the user wanted to sit there you would include the PartyFlag for that section. For getting a list of sections for a given restaurant see Sections. If the patio section had a party flag value of 8, then your request would look like the following.
curl --request POST \
--url https://sandbox.seatninja.com/v2/reservations/restaurantId/reservation \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{"customerInformation":{"id":"c0e86a76-7795-4047-b700-9d7163b5137d","firstName":"John","lastName":"Doe","phoneNumber":"5555555555","email":"[email protected]"},"time":"2017-10-15T22:00:00.000Z","partySize":2,"partyFlags":51}'
Updated almost 6 years ago