1

I'm wanting to use the Yelp reservations API to see what times you can make reservations at a restaurant for. Every time I query the API it returns the following:

{'error': {'code': 'NOT_FOUND', 'description': 'Resource could not be found.'}}

I'm using the following endpoint:

https://api.yelp.com/v3/bookings/QR7JDps9RqH2430JSzasrg/openings

And using the following code (Python 3):

import requests

API_KEY = '<My key>'
ENDPOINT ='https://api.yelp.com/v3/bookings/QR7JDps9RqH2430JSzasrg/openings'
HEADERS = {'Authorization': 'Bearer %s' % API_KEY}

PARAMETERS = {
  'time': '17:30',   
  'date': '2019-08-06',
  'covers': 2,
}

response = requests.get(url=ENDPOINT,params=PARAMETERS,headers=HEADERS)
data = response.json()

print(data)

This is the docs I'm going off of for further context.

What am I doing wrong?

Thanks for the help.

Landon G
  • 739
  • 2
  • 7
  • 23

0 Answers0