Webhook booking.order.items.item "params"

edited January 22 in Developers
For our application we'll make use of the webhook function provided by Checkfront. When a user submits a booking, they need to specify some additional fields. In the API, when I reach for the /get/booking function, I'm able to fetch all the items with their 'params' associated. 

I couldn't find anything in the docs, except for that the 'items' array is provided in the webhook JSON response for the webhook. Will it include the 'param' array for the specific item(s) as well? It's hard to test when you're developing on a local environment and therefore cannot use the webhook URL yet in Checkfront... 

Comments

  • Brett_CheckfrontBrett_Checkfront Checkfront
    edited January 22

    Thank you for reaching out on our forums!

    Currently, our booking webhook does not include all of the parameters associated with a booking or item, as many bookings have enough parameters that it makes the webhook payload unwieldy. 

    Instead, we recommend that you followup your incoming webhook with an API call to the booking endpoint, using the booking ID that you received in the webhook payload. This accomplishes two things - 1) ensures the webhook payload is legitimate, and and came from a booking that exists in your Checkfront account and 2) allows you to use information that might not exist in the booking webhook such as the parameters or transactions.

    Regarding debugging the webhooks, you could use a service such as RequestBin (self-hosted), or something similar. Additionally, we are close to releasing an improvement to webhooks page which should make it substantially easier to debug and track outgoing webhooks. Keep your eyes peeled for this release :)

    I hope this helps, but let me know if there's anything else I can help you with - either by replying here or messaging us at support@checkfront.com

    All the best,
    Brett - Checkfront Support Team
  • Hi Brett! 

    Thank you very much for this extensive answer. The solution you'd recommend is already in place. I waited for the first webhook call, after that I'd save some data to the database and when that was done, an asynchronous event was fired to fetch the related data (asynchronous as the docs said: "must respond with an HTTP 200 class status code immediately upon receipt"). But when I saw that the 'items' itself where part of the webhook payload, I thought that maybe it was possible to save that information in one go. Unfortunately, that isn't possible, yet... ;-) 

    Thanks again for your time and answer.

    Jorick.
Sign In or Register to comment.