18b6edf4-d4e6-4cb5-8f83-e9668782861f
# support
n
Call Id :18b6edf4-d4e6-4cb5-8f83-e9668782861f 1. on every response it is saying there is no availlable slot for booking , I already tested the tool, They give proper result. 2. I wrote the code in nest.js and try to call those using webhook api url. 3. I try to book 8, 9, and 10th April, 10:00 AM, but not booked on any of the date. 4. This is not working . I tried to do this on friday as well. That time too, it was not working
v
Hi there! 👋 I see you're having trouble with your booking system where it's consistently reporting no available slots, even though your tool gives proper results when tested independently. I'm unable to diagnose the exact issue without seeing your specific code implementation, but I can definitely help with some common troubleshooting steps for this type of problem. Based on the information I found, here are some potential reasons and solutions for your booking slot availability issue: ## 1. Check Your JSON Response Format One of the most common issues is incorrect JSON formatting in the response: - Ensure your JSON response matches the expected structure, including the correct
toolCallId
and
result
fields - The
result
field should contain the response data directly as a string, without nested JSON - Make sure the
toolCallId
in your response matches the one sent by VAPI in the initial request For example, this format is considered correct:
Copy code
json
{
  "results": [
    {
      "toolCallId": "call_29386782601936",
      "result": {
        "message": "The preferred appointment time is unavailable, I have the following timeslots",
        "slots": {
          "2025-01-14": [
            "2025-01-14T15:30:00-05:00",
            "2025-01-14T17:00:00-05:00",
            "2025-01-14T17:30:00-05:00"
          ]
        },
        "traceId": "40acdbde-31f5-477b-baf1-b432fd04d9a1"
      }
    }
  ]
}
## 2. Check Content-Type Headers According to the documentation, confirm that the
Content-Type
header of your webhook response is set to
application/json
. ## 3. Verify Network Connectivity Ensure there are no connectivity problems or misconfigurations in your webhook setup that might prevent the response from reaching VAPI. ## 4. Check Server Logs Examine your Nest.js server logs for any errors that might be preventing the webhook from processing correctly or sending back a response. ## 5. Test Your Endpoint Manually
Use a tool like Postman or cURL to manually send a test payload to your webhook URL to see if the issue persists. This can help isolate whether the problem is with the sending or receiving end. ## 6. Check for Timing Issues If your server takes too long to respond, VAPI might time out waiting for the response. Ensure your server is responding within the expected timeframe. ## 7. Verify Webhook Configuration Ensure that the webhook URL configured in VAPI is correctly pointing to your Nest.js application endpoint and that your route handling server URL events is a
POST
endpoint. Would you be able to check these items and let me know if any of them help resolve your issue or if you need more specific guidance? Sources: - [Debugging webhook API URL integrations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336399188665040968) - [Troubleshooting steps for webhook API URL integrations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321) - [Common issues with booking slots using APIs](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1325000684231196775) - [Reasons for incorrect booking slot availability](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1327481613004701779) - [Troubleshooting Nest.js applications interacting with APIs](https://docs.vapi.ai/server-url/developing-locally)
k
I just looked into your call logs for the shared call ID, and what's happening is you're returning the response for all of the tool calls in the wrong format, which is why it's not working. So, I'll suggest you check our documentation on how to return the tool calls in the right format, and then it will work. A small change, and things will work for you.