Skip to main content

Overview

The BookingShake API uses standard HTTP status codes to indicate the success or failure of requests. Error responses include a JSON object with a descriptive message field to help you understand what went wrong.

HTTP Status Codes

Error Response Format

All errors follow a consistent JSON structure:

Common Errors

Authentication Errors

HTTP Status: 400 Bad RequestCause: The Authorization header is missing from the request.Solution: Include the Bearer token in the Authorization header:
Example:
HTTP Status: 400 Bad RequestCause: The API key provided is incorrect, expired, or revoked.Solution:
  • Verify you copied the complete API key without extra spaces
  • Ensure you’re using the correct API key from Settings > Integrations
  • Generate a new API key if needed
Troubleshooting:
  1. Log in to BookingShake dashboard
  2. Go to Settings > Integrations
  3. Copy the API key again
  4. Try the request with the fresh key

Request Body Errors

HTTP Status: 400 Bad RequestCause: The request body is empty or not included in a POST request.Solution: Include a valid JSON body with your POST request:
HTTP Status: 400 Bad RequestCause: The request body is not valid JSON or cannot be parsed.Solution:
  • Ensure your JSON is properly formatted
  • Check for missing commas, quotes, or brackets
  • Validate your JSON using a JSON validator
Common Issues:

Missing Required Fields

HTTP Status: 400 Bad RequestCause: The bookings array is missing from the request body.Solution: Include at least one booking in the bookings array:
HTTP Status: 400 Bad RequestCause: The bookings array contains more than 20 entries.Solution: Split your bookings into multiple requests of 20 or fewer. If you need to create more bookings, send them in successive calls (mind the /events/create rate limit of 10 requests/minute).
HTTP Status: 400 Bad RequestCause: The contact object is missing from the request body.Solution: Include contact information with required fields:
HTTP Status: 400 Bad RequestCause: The pax (number of attendees) field is missing from a booking.Solution: Include the pax field in each booking:

Format Validation Errors

HTTP Status: 400 Bad RequestCause: The date is not in the correct DD-MM-YYYY format.Solution: Use the DD-MM-YYYY format:Examples:
  • ✅ Correct: "15-03-2025", "01-12-2024", "31-01-2025"
  • ❌ Incorrect: "2025-03-15", "03/15/2025", "15.03.2025"
HTTP Status: 400 Bad RequestCause: The time is not in the correct HH:mm format (24-hour).Solution: Use the HH:mm format with 24-hour time:Examples:
  • ✅ Correct: "14:00", "09:30", "23:45"
  • ❌ Incorrect: "2:00 PM", "14:00:00", "14h00"
HTTP Status: 400 Bad RequestCause: The end time is not in the correct HH:mm format.Solution: Same as start_time - use HH:mm format (24-hour).

Authorization Errors

HTTP Status: 403 ForbiddenCause: You’re trying to access or use a contact_id that doesn’t belong to your venue or venue group.Solution:
  • Ensure the contact_id belongs to your venue
  • Use the correct venue API key
  • Create a new contact instead of referencing an existing one
Example:
If you need to link to an existing contact, make sure the contact was created under your venue or is part of your venue group.

Rate Limiting Errors

HTTP Status: 429 Too Many RequestsCause: You’ve exceeded the rate limit for the endpoint (e.g., 10 requests/minute for /events/create or 60 requests/minute for GET endpoints).Response Headers:
Response Body:
Solution:
  1. Wait for the duration specified in the Retry-After header (in seconds)
  2. Implement exponential backoff for retries
  3. Monitor X-RateLimit-Remaining header to avoid hitting limits
  4. Cache GET endpoint responses (sources, spaces, status, fields)
  5. Batch multiple bookings in a single /events/create request
See also: Rate Limiting Guide for detailed information and code examples.

Resource Validation Errors

HTTP Status: 400 Bad RequestCause: The space_id provided does not exist or is not valid for your venue.Solution:
  1. Retrieve available spaces first:
  1. Use a valid space_id from the response:
  1. Or omit the space_id to use the default space.
HTTP Status: 400 Bad RequestCause: The source_slug or source_id provided does not exist.Solution:
  1. Retrieve available sources:
  1. Use a valid source identifier from the response.

Product Validation Errors

When including products to create draft quotations, these validation errors may occur:
HTTP Status: 400 Bad RequestCause: A product in the products array is missing the required title field.Solution: Ensure every product has a title:
HTTP Status: 400 Bad RequestCause: A product is missing the quantity field.Solution: Include a positive integer quantity for each product:
HTTP Status: 400 Bad RequestCause: A product is missing the price_without_tax field.Solution: Include the price in cents/centimes (not euros/dollars):
Important: Prices must be in cents, not euros/dollars.
  • €100.00 = 10000 cents
  • €35.50 = 3550 cents
HTTP Status: 400 Bad RequestCause: A product is missing the vat (VAT rate) field.Solution: Include the VAT rate in basis points (not percentage):
Important: VAT must be in basis points (1/100th of a percent), not percentages.
  • 20% = 2000 basis points
  • 10% = 1000 basis points
  • 5.5% = 550 basis points
  • Valid range: 0 to 10000 (0% to 100%)
HTTP Status: 400 Bad RequestCause: The VAT value is outside the valid range (0-10000 basis points).Solution: Ensure VAT is between 0 and 10000:
Common mistakes:
  • Using 20 instead of 2000 for 20% VAT ❌
  • Using negative values ❌
  • Using values over 10000 ❌

Server Errors

HTTP Status: 500 Internal Server ErrorCause: An unexpected error occurred on the server.What to do:
  1. Wait a moment and retry your request
  2. If the error persists, contact support at support@bookingshake.com
  3. Include the following information:
    • Timestamp of the request
    • Request method and endpoint
    • Request body (sanitize any sensitive data)
    • Any correlation ID if provided in the response

Error Handling Best Practices

1. Always Check Status Codes

2. Validate Input Before Sending

Validate data client-side before making API requests to catch errors early:

3. Implement Retry Logic

For 500 errors, implement exponential backoff retry logic:

4. Log Errors for Debugging

Always log errors with sufficient context:

Need More Help?

Quickstart Guide

Review the quickstart guide for working examples

Contact Support

Get help from our support team