Skip to content

Last Minute Offers

Pete Lawrence edited this page May 6, 2015 · 3 revisions

Introduction

tabs allows a company to set up one or more last minute offers. eg. 10% discount if booking within 7 days of the start of the holiday.

Setting Up Last Minute Offers

To set up last minute offers, the agency will need to contact tabs support.

Viewing Last Minute Offers

To get a list of last minute offers, you can use the /offer/lastminute endpoint, or tabs\api\utility\Utility::getLastminuteoffers() function if you've purchased the API client.

An array of special offers will be returned, each containing the following fields:

type The type of discount being applied.

amount The amount of discount being applied.

daysToHolidayMin The minimum number of days that the offer is valid from

daysToHolidayMax The maximum number of days that the offer is valid until

description A description of the offer as entered within tabs

properties An array of property id's that the last minute offer applies to.

Available Properties

In order to get a list of properties that have a last minute offer on and are available, you will need to perform a separate availability search and perform an intersection operation.

Example

/offer/lastminute returns: { 'PROP1', 'PROP2', 'PROP3' }

/property/?filter=... returns: { 'PROP2', 'PROP3', 'PROP7' }

You would then perform an intersection on these two sets: { 'PROP2', 'PROP3' }

Clone this wiki locally