Create a promotion bundle
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/extranet/promotion-bundle';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"name":"","enabled":true,"itemIdentifiers":[""],"modifierOverride":"","type":"PREMIUM","pricingType":"PER_STAY","descriptions":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/extranet/promotion-bundle \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "name": "", "enabled": true, "itemIdentifiers": [ "" ], "modifierOverride": "", "type": "PREMIUM", "pricingType": "PER_STAY", "descriptions": "" }'Create a new bundle of promotions. Returns HTTP 201 with the created bundle.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The unique identifier of the managing entity (property) to create the bundle for.
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Display name for this bundle of promotions.
Example
Early Bird - Long TermEnable or disable the bundle without deleting it.
Example
trueOptional: override the individual promotions’ discount/premium with a single value for the bundle.
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
Example
0.25A localized amount
object
Required only if overriding the combined discount with a single value.
Example
DISCOUNTRequired only if overriding the combined discount with a single value. Determines how it is applied: per night, per stay, or per guest.
Optional: custom localized descriptions for this bundle. If provided, these replace the aggregated descriptions from individual promotions.
object
Longer text description
Example
This is a longer description in the specified language.Indicate which language this description is written in.
Example
enWhether it was user or system generated.
Example
SYSTEMThe md5 hash of the name, description and language.
Responses
Section titled “ Responses ”Created
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
Hotel identifier.
Internal name of promotion ancillary.
Whether this promotion ancillary is enabled or not.
Promotions that go together to make up this ancillary.
object
Unique record identifier
Hotel identifier.
Internal name of promotion.
Set whether you want the price to go up or down when the rules of this promotion have been satisfied.
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
A localized amount
object
Whether this promotion is enabled or not.
This determines whether this discount should be applied per night, per stay or per person - per night
Localized descriptions describing promotion. At least one English entry is required.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Restrict promotion to specific cities. See Geo-IP city geoname data
object
City details (obtained via geonames) to restrict the promotion by guest location.
object
GeoNameLightweight identifiers taken from https://geonames.org.
Locale code
Continent code
Continent name
Country ISO code
Country name
City name
Timezone
Sub-division 1 code
Sub-division 1 name
Sub-division 2 code
Sub-division 2 name
Restrict promotion to specific continents. See Geo-IP continent geoname data
object
Continent code
Restrict promotion to specific countries. See Geo-IP country geoname data
object
Country to restrict on
object
Restrict promotion by requiring users to enter a promo code.
object
Promo code that guests must enter to access this promotion.
Restrict promotion to specific IP ranges.
object
Starting IP address of the range (inclusive).
Ending IP address of the range (inclusive).
Restrict promotion by restricting to how many rooms the user wants.
object
Minimum number of rooms in the booking for this promotion to apply.
Maximum number of rooms in the booking. Leave null or 0 for no upper limit.
Restrict promotion to either prepaid / non-prepaid rates.
object
True to apply only to prepaid rates, false to apply only to pay-at-property rates.
Restrict promotion to either refundable / non-refundable rates.
object
True to apply only to refundable rates, false to apply only to non-refundable rates.
Restrict promotion to specific time zones. See Geo-IP timezone geoname data
object
Bookers timezone
Restrict promotion to users who want to book a room close to the date.
object
Number of seconds before the arrival date when the promotion becomes active (last-minute bookings).
Restrict promotion to users who want to stay a certain number of days.
object
Minimum number of nights for promotion to apply. Set to 0 for no minimum.
Maximum number of nights. Set to 0 for no maximum.
Restrict promotion to users who want to book in advance.
object
Minimum days in advance of stay start date when the booking must be made. Set to 0 for no minimum.
Maximum days in advance of stay start date when the booking may be made. Set to 0 for no maximum.
Restrict promotion to specific stay dates the user wants to arrive.
object
Promotion applies when guest’s stay starts on or after this date (inclusive).
Promotion applies when guest’s stay starts on or before this date (inclusive).
Restrict promotion to specific dates the booking is made.
object
Promotion is available when the booking is made on or after this date (inclusive).
Promotion is available when the booking is made on or before this date (inclusive).
Restrict promotion to specific days of the week the promotion is available.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is arriving.
object
The days of the week when this rate is available for guests to arrive on
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is departing.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest has to stay.
object
The days of the week the user has to stay on to get this rate
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict on specific master rates.
Restrict on specific add-ons.
Restrict on specific rate plans.
Exclude this promotion from specific date ranges.
object
Start date when the promotion is not available (inclusive).
End date when the promotion is not available (inclusive).
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
A localized amount
object
Required if manual override modifier is not null
Determines whether this discount should be applied per night, per stay or per person - per night; Required if amount override is not null
Optional bundle-level descriptions. When populated, these replace the aggregated item descriptions in offerDetails — typically used with modifierOverride to describe the bundle as a whole.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Example
{ "id": "", "createdDate": "", "lastUpdate": "", "version": "", "hotelIdentifier": "", "name": "", "enabled": true, "items": [ "" ], "modifierOverride": { "type": "FIXED", "percent": "", "fixedAmount": "" }, "type": "PREMIUM", "pricingType": "PER_STAY", "descriptions": "", "aggregatedItemDescriptions": [ { "description": "", "language": "en", "creator": "SYSTEM", "md5ContentHash": "" } ]}Bad Request
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized
object
object
Forbidden
object
object
Internal Server Error
object
Example generated
{}