Using The Eat App Partner API to get availability and post reservations

This guide will help you understand how to check restaurant availability and post reservations using the API.

Welcome to our guide on using the Eat Partner APIs. This guide will help you understand how to check restaurant availability and post reservations using the API.

 

Please note: To use this API, you must have a valid auth token and be part of the eat app partner program.

Overview

The Eat Partner APIs use the JSONAPI response format and accept JSON in the request body for POST and PATCH endpoints. All APIs support Gzip encoding by including Accept-Encoding: 'gzip' in the headers and require Content-Type: 'application/json' in the headers.

 

Please refer to our API Documentation to get started. Below are the basics on how to get integrated if you want a TLDR of how our Partners API works. 

Happy integrating!

Partner Portal

You can review reservations and guest information in HTML format using the Partner Portal:

Log in with your provided email and password to access these features. You can also update your partnership status through the portal, or message info@eatapp.co to become a partner. 

Regions

View available regions on the Partner Portal. Once our team activates a partnership with a restaurant in a specific region, you can query other API listings related to that region.

Getting Availability

To get restaurant availability, use the following endpoint:

Endpoint:

bash
GET https://api.eat-sandbox.co/partners/v2/availability

 

Headers:

http
Authorization: Bearer <api_token>
Content-Type: application/json
Accept-Encoding: gzip

 

Example Request:

curl
curl --location 'https://api.eat-sandbox.co/partners/v2/availability' \
--header 'Authorization: Bearer <api_token>' \
--header 'Content-Type: application/json' \
--header 'Accept-Encoding: gzip'

 

Response:

{
"data": [
{
"id": "1234",
"type": "availability",
"attributes": {
"restaurant_id": "abcd",
"date": "2023-05-16",
"time_slots": [
"19:00",
"19:30",
"20:00"
],
"preferences": [
{
"preference_id": "1",
"name": "Window seat",
"time_slots": ["19:00", "20:00"]
},
{
"preference_id": "2",
"name": "Outdoor",
"time_slots": ["19:30"]
}
]
}
}
]
}

Posting Reservations

To post a reservation, use the following endpoint:

Endpoint:

bash
POST https://api.eat-sandbox.co/partners/v2/reservations

 

Headers:

http
Authorization: Bearer <api_token>
Content-Type: application/json
Accept-Encoding: gzip

 

Request Body:

json
{
"data": {
"type": "reservation",
"attributes": {
"restaurant_id": "abcd",
"date": "2023-05-16",
"time": "19:00",
"guests": 2,
"preference_id": "1",
"guest": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+971555535611",
"email": "jane.doe@example.com"
}
}
}
}

 

Example Request:

curl
curl --location 'https://api.eat-sandbox.co/partners/v2/reservations' \
--header 'Authorization: Bearer <api_token>' \
--header 'Content-Type: application/json' \
--header 'Accept-Encoding: gzip' \
--data-raw '{
"data": {
"type": "reservation",
"attributes": {
"restaurant_id": "abcd",
"date": "2023-05-16",
"time": "19:00",
"guests": 2,
"preference_id": "1",
"guest": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+971555535611",
"email": "jane.doe@example.com"
}
}
}
}'

 

Response:

json
{
"data": {
"id": "5678",
"type": "reservation",
"attributes": {
"restaurant_id": "abcd",
"date": "2023-05-16",
"time": "19:00",
"guests": 2,
"preference_id": "1",
"guest": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+971555535611",
"email": "jane.doe@example.com"
}
}
}
}

 

For further assistance, please refer to our API Documentation or contact our team at support@eatapp.co.