๐Ÿงช Experimental KB โ€” Official knowledge hub: community.kaptio.com

Promotion Search API Returns No Results - Required Parameters

Customer reported that the Promotion Search API was returning no results when making API calls, despite having valid promotions configured in the system.

promotion-search api ktapi required-parameters empty-results

Problem

Customer reported that the Promotion Search API was returning no results when making API calls, despite having valid promotions configured in the system.

What We Found

The API request was missing two required parameters: booking_date and service_level_ids. Without these parameters, the Promotion Search API returns empty results even when promotions exist that should match the query.

Solution

  1. Add the booking_date parameter to the API request (format: YYYY-MM-DD)
  2. Add the service_level_ids parameter as an array of Service Level IDs
  3. Verify the request payload includes all required parameters: booking_date, channel_id, guests, date_from_range_start, date_from_range_end, and service_level_ids
  4. Test the API call - should return applicable promotions

Notes

  • The booking_date and service_level_ids parameters may not be obviously required from API documentation but are essential for the Promotion Search endpoint to return results
  • Example working request payload:
    {
      "booking_date": "2025-08-08",
      "channel_id": "a6H0f000000fzsXEAQ",
      "guests": 1,
      "date_from_range_start": "2025-07-17",
      "date_from_range_end": "2025-11-24",
      "include_departure_days": false,
      "service_level_ids": ["a8b4R000001wy6aQAA", "..."]
    }
  • After adding the missing parameters, the API returned 4 applicable promotions for the customer

Warnings

โš ๏ธ The API will return empty results (not an error) when required parameters are missing - this can be misleading during troubleshooting


Source: KHELP-12076

Was this article helpful?