Skip to main content

Overview

The Promotion Groups API returns all active promotions for a specific property, grouped by promotion type. This is useful for displaying promotions in categorized sections on your booking interface.

Retrieving Promotion Groups

GET /v1/properties/{propertyId}/promotion-groups

Path Parameters

ParameterTypeRequiredDescription
propertyIdstringYesIdentifier of the property

Example Request

curl -X GET "https://api.elivaas.com/api/v1/properties/prop_456/promotion-groups" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Channel-Id: YOUR_CHANNEL_ID"

Example Response

{
  "COUPON": [
    {
      "id": "promo_001",
      "code": "SUMMER20",
      "title": "Summer Discount",
      "description": "Get 20% off on stays during summer season",
      "discountMethod": "PERCENTAGE",
      "discountPercentage": 20.0,
      "maximumDiscountAllowed": 5000,
      "status": "ACTIVE",
      "type": "COUPON",
      "rank": 1
    },
    {
      "id": "promo_005",
      "code": "WEEKEND10",
      "title": "Weekend Special",
      "description": "10% off on weekend stays",
      "discountMethod": "PERCENTAGE",
      "discountPercentage": 10.0,
      "status": "ACTIVE",
      "type": "COUPON",
      "weekendOnly": true,
      "rank": 3
    }
  ],
  "EARLY_BOOKER": [
    {
      "id": "promo_002",
      "code": "EARLY15",
      "title": "Early Bird Offer",
      "description": "Book 30 days in advance and get 15% off",
      "discountMethod": "PERCENTAGE",
      "discountPercentage": 15.0,
      "status": "ACTIVE",
      "type": "EARLY_BOOKER",
      "earlyBookerValueInDays": 30,
      "rank": 2
    }
  ],
  "FREE_NIGHT": [
    {
      "id": "promo_003",
      "code": "STAY3PAY2",
      "title": "Stay 3, Pay 2",
      "description": "Get one night free when you book 3 nights",
      "minimumNights": 3,
      "freeNights": 1,
      "status": "ACTIVE",
      "type": "FREE_NIGHT",
      "rank": 1
    }
  ]
}

Response Format

The response is a JSON object where:
  • Keys are promotion type strings (COUPON, EARLY_BOOKER, LAST_MINUTE, FREE_NIGHT, BASIC, or UNKNOWN)
  • Values are arrays of promotion objects (same schema as the Promotions Retrieve endpoint)
Promotions without a defined type are grouped under the UNKNOWN key.

Use Cases

  • Display categorized offers: Show coupons, early bird deals, and free night offers in separate sections on your booking page
  • Highlight specific promotion types: Feature early booker or last-minute deals prominently based on the user’s booking timeline
  • Filter by category: Allow users to browse promotions by type

Authentication

All requests must include the following headers:
  • Api-Key: Your API key for authentication
  • Channel-Id: Identifier for the channel making the request

Error Handling

The API returns standard HTTP status codes:
  • 200: Success
  • 401: Unauthorized
  • 404: Property not found
  • 500: Internal Server Error