Discounts

Create or update a single discount for an apartment

post/v2/discount

Request

  • Base URL: https://provider-api-sandbox.holidu.com
  • URL: https://provider-api-sandbox.holidu.com/v2/discount
  • Auth: API key in header api-key

Query parameters

providerApartmentIdstring
providerstring
holiduApartmentIdinteger

Request body

idinteger

Discount id in Holidu system

providerDiscountIdstring

Provider's own external discount ID for reconciliation

status'ACTIVE' | 'INACTIVE' | 'DELETED' required

Discount Status

namestring

Name of the discount

discountType'EARLY_BIRD' | 'LAST_MINUTE' | 'LONG_STAY' | 'DEVICE_SPECIFIC' | 'NEW_LISTING' | 'LOYALTY' | 'OFFER' required

Type of discount

discountPercentnumber required

Percentage of discount

Example request

{
  "status": "ACTIVE",
  "name": "Pre Season Discount",
  "discountType": "EARLY_BIRD",
  "discountPercent": 12,
  "conditions": {
    "daysBeforeCheckIn": 60,
    "minStay": 5,
    "bookingSeason": [
      {
        "onlyApplicableFrom": "2020-08-01",
        "onlyApplicableUntil": "2021-04-30"
      }
    ],
    "travelSeason": [
      {
        "onlyApplicableFrom": "2020-08-01",
        "onlyApplicableUntil": "2021-04-30"
      }
    ]
  }
}

Response

Discount created or updated

idinteger

Discount id in Holidu system

providerDiscountIdstring

Provider's own external discount ID for reconciliation

status'ACTIVE' | 'INACTIVE' | 'DELETED' required

Discount Status

namestring

Name of the discount

discountType'EARLY_BIRD' | 'LAST_MINUTE' | 'LONG_STAY' | 'DEVICE_SPECIFIC' | 'NEW_LISTING' | 'LOYALTY' | 'OFFER' required

Type of discount

discountPercentnumber required

Percentage of discount

Example response

{
  "status": "ACTIVE",
  "name": "Pre Season Discount",
  "discountType": "EARLY_BIRD",
  "discountPercent": 12,
  "conditions": {
    "daysBeforeCheckIn": 60,
    "minStay": 5,
    "bookingSeason": [
      {
        "onlyApplicableFrom": "2020-08-01",
        "onlyApplicableUntil": "2021-04-30"
      }
    ],
    "travelSeason": [
      {
        "onlyApplicableFrom": "2020-08-01",
        "onlyApplicableUntil": "2021-04-30"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.