Fetching price through API and displaying it - is there a better way?

It took 70 lines of code just to get the price. I had to query each property for the first available booking day and then query it on that day to get the price, and because each query is dependent on the other, it seem very inefficient.

Am I doing it wrong?

Comments

  • Hi splenda,

    Thanks for reaching out on the Checkfront forums!

    To retrieve a price on an item you'll need to make sure you're fetching a rated response. In order to get a rated response, you'll need to pass a date. For example, if you were to send a GET request to the endpoint "item/{id}?start_date={date}" then you would be able to retrieve the price from the response. 

    Mitch
    Checkfront support team
Sign In or Register to comment.