Endpoints

Search

GET https://api.yelp.com/v3/businesses/search

The endpoint has been upgraded to return businesses which support Yelp Reservations.

The three parameters that must be passed in to find reservations are reservation_time, reservation_date, and reservation_covers.

Sample query that will return Thai Restaurants in San Francisco that accept Yelp reservations:
https://api.yelp.com/v3/businesses/search?location=San%20Francisco&term=Thai&attributes=reservation

Parameters

parameter namerequiredtypedescription
reservation_timeyesstringThe time of the requested reservation, format is HH:MM
reservation_dateyesstringThe date for the reservation, format is YYYY-mm-dd
reservation_coversyesnumberHow many people are attending the reservation (min. value is 1; max value is 10).
matches_party_size_paramnobooleanTrue (default): This search filters out results which don’t have any openings matching the reservation_covers params.
False:This search returns all results, and disregards the reservation_covers params.
attributenostringsubmit 'reservation' to return only reservable Yelp businesses.

Exceptions

codestatus codedescription
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %H:%M
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %Y-%m-%d
TOO_SMALL_VALIDATION_ERROR400Number too small: {value}
TOO_LARGE_VALIDATION_ERROR400Number too big: {value}

The response will mostly match our public search response, see https://www.yelp.com/developers/documentation/v3/business_search.

Searching for reservations adds an additional field, the "data" field. This will contain additional reservation times that are + or - 30 minutes from the requested reservation time.

Response

parameter nametypedescription
dataobjectAn object containing additional data on the search query
data.reservation_openingslistA list of additional reservation opening times.
data.reservation_openings[x]stringThe available open reservation time. This is of the format HH:MM and is in a 24-hour clock.

Sample response of with data field (public data trimmed for brevity):

# … trimmed
		{
			"id": "cuisine-of-nepal-san-francisco",
			"name": "Cuisine of Nepal",
			"image_url": ...,
			"is_closed": false,
			"url": ...,
			"review_count": 303,
			"categories": [...],
			"rating": 4.5,
			"coordinates": {...},
			"transactions": [
				"delivery",
				"pickup",
				"restaurant_reservation"
			],
			"price": "$$",
			"location": {...},
			"phone": "+14156472222",
			"display_phone": "(415) 647-2222",
			"distance": 2502.5961202999997,
			"attributes": {
				"gender_neutral_restrooms": true
			},
			"data": {
				"reservation_openings": [
					"13:30",
					"13:45",
					"14:00"
				]
			}
		},
# … trimmed

Openings endpoint

GET https://api.yelp.com/v3/bookings/{business-id}/openings

To get the available reservation times for a restaurant, you can give this endpoint the Business ID along with a few parameters. This endpoint will return times around the requested timeslot and across several days to provide the end user with some options.

In general, the openings endpoint will return times across 4 days - the day before, current day and 2 days after the requested date.

Currently, Yelp Reservations API does not support reservations which require a credit card. So, if "credit_card_required": true is returned, you should NOT proceed to the Holds endpoint. If you do, the Holds endpoint will return a null hold_id.

Parameters

parameter namerequiredtypedescription
timeyesstringThe time of the requested reservation, format is HH:MM
dateyesstringThe date for the reservation, format is YYYY-mm-dd
coversyesnumberHow many people are attending the reservation (min. value is 1; max value is 10).
get_covers_rangenobooleanIf true, include the covers_range dict in the response.

Exceptions

codestatus codedescription
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %H:%M
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %Y-%m-%d
TOO_SMALL_VALIDATION_ERROR400Number too small: {value}
TOO_LARGE_VALIDATION_ERROR400Number too big: {value}

Response

parameter nametypedescription
reservation_timeslistA list of objects that contain available reservation times.
reservation_times[x].datestringThe date for possible reservations, format is YYYY-mm-dd
reservation_times[x].timeslistA list of possible reservation times for the date provided.
reservation_times[x].times[x].credit_card_requiredbooleanWhether or not this reservation requires a credit card.
reservation_times[x].times[x].timestringThe time of the available reservation, format is HH:MM and is in a 24-hour clock.
reservation_times[x].times[x].urlstringIf the reservation requires a credit card, this URL will let the user book the reservation from our web interface.
covers_range.min_party_sizenumberThe minimum number of people that the business allows to attend a reservation.
covers_range.max_party_sizenumberThe maximum number of people that the business allows to attend a reservation.

Sample Request

curl -X GET \
'https://api.yelp.com/v3/bookings/victors-french-bistro-test-listing-san-francisco/openings?covers=2&date=2017-12-30&time=18%3A00' \
-H 'Authorization: Bearer {ACCESS_TOKEN}'

Sample Response

{
  "reservation_times": [
    {
      "date": "2017-09-22",
      "times": [
	   {
	     "credit_card_required": true,
	     "time": "14:45",
	     "url":  
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-22/1445/3/"
	   },
	   {
	     "credit_card_required": true,
	     "time": "15:00",
	     "url":  
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-22/1500/3/"
	   },
	   {
	     "credit_card_required": true,
	     "time": "15:15",
	     "url": 
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-22/1515/3/"
	   },
      ]
    },
    {
      "date": "2017-09-23",
      "times": [
	 {
	     "credit_card_required": true,
	     "time": "14:45",
	     "url": 
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-23/1445/3/"
	   },
	   {
	     "credit_card_required": true,
	     "time": "15:00",
	     "url": 
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-23/1500/3/"
	   },
	   {
	     "credit_card_required": true,
	     "time": "15:15",
	     "url": 
  "https://www.devc.yelpreservations.com/r/dorsia/reserve/2017-09-23/1515/3/"
	   },
      ]
    },
  ]
  "covers_range": {
    "min_party_size": 1,
    "max_party_size": 7
  }
}

Holds endpoint

POST https://api.yelp.com/v3/bookings/{business_id}/holds

This endpoint will place a temporary hold on the requested time slot so that the partner can request all the required reservation information from the user. Holds are only valid for 5 minutes and you must use the hold id returned from this endpoint to place the reservation or you will get a conflict.

Note: All parameters being sent into the holds endpoint needs to be sent as form data inside of the request body. They will not work as query parameters.

Parameters

parameter namerequiredtypedescription
timeyesstringThe time of the requested reservation, format is HH:MM.
dateyesstringThe date for the reservation, format is YYYY-mm-dd
coversyesnumberHow many people are attending the reservation.
unique_idyesstringThis should be the user's device id or a unique user id to help tie together actions of the user on the API. Multiple requests to the Holds endpoint by the same user should use the same unique_id.

Exceptions

codestatus codedescription
COVERS_VALUE_OUT_OF_RANGE400This restaurant only accepts online reservations between {minvalue} and {max_value} people. NOTE: The {min_value} and {max_value} will be dependent on the restaurant's accepted minimum and maximum values for their online reservations.
INVALID_DATE_TIME_RANGE400The date time range is invalid
INVALID_RESERVATION_PARAMETER400Bad request
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %H:%M
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %Y-%m-%d
TOO_SMALL_VALIDATION_ERROR400Number too small: {value}
TOO_LARGE_VALIDATION_ERROR400Number too big: {value}
BUSINESS_NOT_FOUND404The requested business could not be found.
DOES_NOT_TAKE_RESERVATIONS404The given business does not take reservations.
HOLD_SLOT_NOT_AVAILABLE409The requested hold time is not available. Please select a different time.

Response

parameter nametypedescription
cancellation_policystringThe restaurant’s cancellation policy.
credit_card_holdbooleanWhether or not a restaurant requires a credit card hold to place a reservation.
expires_atfloatWhen the hold expires, as a unix timestamp.
hold_idstringThe unique Hold ID to use when placing a reservation.
is_editablebooleanWhether or not changes can be made to the reservation.
last_cancellation_datefloatThe last cancellable date for the reservation, as a unix timestamp.
notesstringAny reservation notes from the restaurant.
reserve_urlstringThe URL at which to place a reservation in case the restaurant requires a credit card hold.

Sample Request

curl -X POST \
'https://api.yelp.com/v3/bookings/victors-french-bistro-test-listing-san-francisco/holds' \
  -H 'authorization: Bearer {ACCESS_TOKEN}' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'covers=2&date=2017-12-30&time=18%3A00&unique_id=tmL95Scg93sajOswiIl4kA'

Sample Response

{
	"cancellation_policy": "Cancel before it’s too late!",
	"credit_card_hold": false,
	"expires_at": 1506118155.568123,
	"hold_id": "KiXJLFFBnwW6NJbK34uKBQ",
	"is_editable": false,
	"last_cancellation_date": 1506106800.0,
	"notes": "Join us for Happy Hour.",
	"reserve_url": "https://www.yelp.com/reservations/aeJKOHWHK-z9ALQVTZj_Jw/checkout/2017-09-23/1200/3?hold_id=23774490"
}

Reservations endpoint

POST https://api.yelp.com/v3/bookings/{business_id}/reservations

With this endpoint, you can place a physical reservation at a restaurant with all the information provided. This endpoint will take an optional hold id if the partner previously placed a hold. If the restaurant requires a credit card hold, you will not be able to place a reservation and the API will return an error.

In this case, you should use the reserve_url provided in the hold endpoint or the opening endpoint to prompt the user for a reservation.

Note: All parameters being sent into the reservations endpoint needs to be sent as form data inside of the request body. They will not work as query parameters. Additionally, you will receive an error if you don’t pass the exact same reservation time, date and covers values as you supplied to the Holds endpoint.

Parameters

parameter namerequiredtypedescription
timeyesstringThe time of the requested reservation, format is HH:MM.
dateyesstringThe date for the reservation, format is YYYY-mm-dd
coversyesnumberHow many people are attending the reservation (min. value is 1; max value is 10).
first_nameyesstringThe first name of the person making the reservation.
last_nameyesstringThe last name of the person making the reservation.
phoneyesstringThe phone number to attach to the reservation.
emailyesstringThe email to attach to the reservation.
unique_idyesstringThis should be the user's device id or a unique user id to help tie together actions of the user on the API. Multiple requests to the Holds endpoint by the same user should use the same unique_id.
hold_idyesstringThe Hold ID returned from the Holds endpoint.
notesnostringThe additional party notes for the reservation.

Exceptions

codestatus codedescription
INVALID_RESERVATION_PARAMETER400One of the following:
- Time must be 0, 15, 30 or 45
- date too far out in the future
- date is in the past
- This restaurant accepts reservations {max_future_days} days in the future NOTE: The {max_future_days} will be dependent on the restaurant's setting
- This restaurant only accepts online reservations between {minvalue} and {max_value} people. NOTE: The {min_value} and {max_value} will be dependent on the restaurant's accepted minimum and maximum values for their online reservations.
- Bad request
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %H:%M
DATE_TIME_VALIDATION_ERROR400Invalid format, expected format is %Y-%m-%d
TOO_SMALL_VALIDATION_ERROR400Number too small: {value}
TOO_LARGE_VALIDATION_ERROR400Number too big: {value}
INVALID_HOLD_ID400The Hold ID you provided is not valid.
RESERVATIONS_PARAMS_DONT_MATCH_HOLDS_PARAMS400Input parameters must match the values provided to the Holds endpoint.
BUSINESS_NOT_FOUND404The requested business could not be found.
DOES_NOT_TAKE_RESERVATIONS404The business given does not take reservations.
HOLD_NOT_FOUND404No valid hold found corresponding to the hold ID you provided. A hold with this ID may have never existed, or it may have expired.
RESERVATION_SLOT_NO_LONGER_AVAILABLE409The time you requested to book a reservation for is no longer available. Please try to reserve a different time.
CREDIT_CARD_REQUIRED402This reservation requires a credit card hold. Please contact the restaurant or use the reservation URL provided

Response

parameter nametypedescription
confirmation_urlstringThe confirmation URL for the end user in case they need to change or cancel their reservation.
notesstringRestaurants may optionally provide some notes about the reservation.
reservation_idstringThe unique ID for this reservation.

Sample Request

curl -X POST \
'https://api.yelp.com/v3/bookings/victors-french-bistro-test-listing-san-francisco/reservations' \
  -H 'authorization: Bearer {ACCESS_TOKEN}' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'covers=2&date=2017-12-30&time=18%3A00&unique_id={UNIQUE_ID}&hold_id={HOLD_ID}&first_name={FIRST_NAME}&last_name={LAST_NAME}&email={EMAIL}&phone={PHONE}&notes={NOTES}'

Sample Response

{
	"confirmation_url": "https://www.yelp.com/reservations/dorsia-san-francisco-6/confirmed/36dbba9e-14a9-43f3-942d-7fdeddda74fc?checkout_success=1&adjust_creative=CPEhJkVcrc5wVgsRVvhEZQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_reservations&utm_source=CPEhJkVcrc5wVgsRVvhEZQ",
	"notes": "reservation password: leprechaun"
	"reservation_id": "e33b40ef-f6b1-4f17-987c-d850892564b",
}

Status endpoint

GET https://api.yelp.com/v3/bookings/reservation/{reservation_id}/status

Parameters

parameter namerequiredtypedescription
reservation_idyesstringThe Reservation ID returned from the Reservations endpoint.

Exceptions

codestatus codedescription
INVALID_RESERVATION_ID400The Reservation ID you provided is not valid.
RESERVATION_CANCELED400This reservation has been canceled.

Response

parameter nametypedescription
activebooleanWhether the reservation in active or not.
datestringThe date for the reservation, format is YYYY-mm-dd
timestringThe time of the requested reservation, format is HH:MM:SS.
coversnumberHow many people are attending the reservation (min. value is 1; max value is 10).

Sample Request

curl -X GET \
'https://api.yelp.com/v3/bookings/reservation/e33b40ef-f6b1-4f17-987c-d850892564b/status \
  -H 'authorization: Bearer {ACCESS_TOKEN}'

Sample Response

{
  "active": true,
  "date": "2017-12-30",
  "time": "11:00:00",
  "covers": 3
}

Cancel endpoint

POST https://api.yelp.com/v3/bookings/reservation/{reservation_id}/cancel

The cancel endpoint allows you to cancel a reservation using a reservation_id.

Parameters

parameter namerequiredtypedescription
reservation_idyesstringThe Reservation ID returned from the Reservations endpoint.

Exceptions

codestatus codedescription
INVALID_RESERVATION_ID404The Reservation ID you provided is not valid.
RESERVATION_ALREADY_CANCELED409This reservation has already been canceled.
RESERVATION_CANCEL_CONFLICT409The reservation could not be canceled due to a conflict.

Response

This endpoint returns an empty response.

Sample Request

curl -X POST \
'https://api.yelp.com/v3/bookings/reservation/e33b40ef-f6b1-4f17-987c-d850892564b/cancel \
  -H 'authorization: Bearer {ACCESS_TOKEN}'

Sample Response

{}