Create Rate Plan
const url = 'https://api.wink.travel/api/managing-entity/hotel-1/extranet/rate-plan';const options = { method: 'POST', headers: {'Wink-Version': '2.0', 'Content-Type': 'application/json'}, body: '{"name":"","prepaid":false,"enabled":false,"breakfast":false,"brunch":false,"lunch":false,"dinner":false,"allInclusive":false,"allInclusivePlusAlcohol":false,"sellStartDate":"","sellEndDate":"","stayStartDate":"","stayEndDate":"","loyaltyPointsAccrue":false,"maxAdvanceBookingOffset":"","minAdvanceBookingOffset":"","minTotalOccupancy":"","maxTotalOccupancy":"","minLOS":"","maxLOS":"","minAge":"","maxAge":"","ratePlanLevelFees":[""],"availableDaysOfWeek":{"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"disabled":false},"arrivalDaysOfWeek":{"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"disabled":false},"departureDaysOfWeek":{"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"disabled":false},"requiredDaysOfWeek":{"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"disabled":false},"earlyCheckInCharge":{"type":"FIXED","percent":"","fixedAmount":""},"lateCheckOutCharge":{"type":"FIXED","percent":"","fixedAmount":""},"cancellationPolicyIdentifier":"","cancellationPolicyExceptions":"","singleOccupancyRateModifier":{"type":"FIXED","percent":"","fixedAmount":""},"extraPaxRateModifier":{"type":"FIXED","percent":"","fixedAmount":""},"extraChildRateModifier":{"type":"FIXED","percent":"","fixedAmount":""}}'};
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/hotel-1/extranet/rate-plan \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "name": "", "prepaid": false, "enabled": false, "breakfast": false, "brunch": false, "lunch": false, "dinner": false, "allInclusive": false, "allInclusivePlusAlcohol": false, "sellStartDate": "", "sellEndDate": "", "stayStartDate": "", "stayEndDate": "", "loyaltyPointsAccrue": false, "maxAdvanceBookingOffset": "", "minAdvanceBookingOffset": "", "minTotalOccupancy": "", "maxTotalOccupancy": "", "minLOS": "", "maxLOS": "", "minAge": "", "maxAge": "", "ratePlanLevelFees": [ "" ], "availableDaysOfWeek": { "mon": false, "tue": false, "wed": false, "thu": false, "fri": false, "sat": false, "sun": false, "disabled": false }, "arrivalDaysOfWeek": { "mon": false, "tue": false, "wed": false, "thu": false, "fri": false, "sat": false, "sun": false, "disabled": false }, "departureDaysOfWeek": { "mon": false, "tue": false, "wed": false, "thu": false, "fri": false, "sat": false, "sun": false, "disabled": false }, "requiredDaysOfWeek": { "mon": false, "tue": false, "wed": false, "thu": false, "fri": false, "sat": false, "sun": false, "disabled": false }, "earlyCheckInCharge": { "type": "FIXED", "percent": "", "fixedAmount": "" }, "lateCheckOutCharge": { "type": "FIXED", "percent": "", "fixedAmount": "" }, "cancellationPolicyIdentifier": "", "cancellationPolicyExceptions": "", "singleOccupancyRateModifier": { "type": "FIXED", "percent": "", "fixedAmount": "" }, "extraPaxRateModifier": { "type": "FIXED", "percent": "", "fixedAmount": "" }, "extraChildRateModifier": { "type": "FIXED", "percent": "", "fixedAmount": "" } }'Create a new rate plan
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Create a new rate plan and associate it with this property identifier.
Example
hotel-1Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Provides the name of the rate plan.
Example
BAR 1When true, indicates if the rate is a prepaid rate.
Example
falseWhether rate plan is active or not.
Example
falseWhen true, indicates breakfast is included.
Example
falseWhen true, indicates brunch is included.
Example
falseWhen true, indicates lunch is included.
Example
falseWhen true, indicates dinner is included.
Example
falseEverything included except alcohol
Example
falseEverything included with alcohol
Example
falseSet a start date for when to start selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.
Set an end date for when to finish selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.
Set a start date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.
Set an end date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.
Property honors loyalty points with this rate plan.
Example
falseMaximum days before the arrival date for which this rate plan may be booked.
Example
10Minimum days before the arrival date for which this rate plan may be booked.
Example
3Defines the minimum number of total occupants required for this rate plan.
Example
4Defines the maximum number of total occupants required for this rate plan.
Example
4Indicates the minimum length of stay required for this rate plan.
Example
3Indicates the maximum length of stay.
Example
5The minimum age to qualify for this rate plan.
Example
26The maximum age to qualify for this rate plan.
Example
50This can be a one-time fee such as a cleaning fee
object
List of localized descriptions for this fee.
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.
Rate plan level fixed fee amount in property currency
object
Rate plan fee type
Example
PER_DAYobject
Set to true to enable Monday.
Example
trueSet to true to enable Tuesday.
Example
trueSet to true to enable Wednesday.
Example
trueSet to true to enable Thursday.
Example
trueSet to true to enable Friday.
Example
trueSet to true to enable Saturday.
Example
trueSet to true to enable Sunday.
Example
trueConvenience property to quickly determine if this existing object has any active days enabled.
Example
trueobject
Set to true to enable Monday.
Example
trueSet to true to enable Tuesday.
Example
trueSet to true to enable Wednesday.
Example
trueSet to true to enable Thursday.
Example
trueSet to true to enable Friday.
Example
trueSet to true to enable Saturday.
Example
trueSet to true to enable Sunday.
Example
trueConvenience property to quickly determine if this existing object has any active days enabled.
Example
trueobject
Set to true to enable Monday.
Example
trueSet to true to enable Tuesday.
Example
trueSet to true to enable Wednesday.
Example
trueSet to true to enable Thursday.
Example
trueSet to true to enable Friday.
Example
trueSet to true to enable Saturday.
Example
trueSet to true to enable Sunday.
Example
trueConvenience property to quickly determine if this existing object has any active days enabled.
Example
trueobject
Set to true to enable Monday.
Example
trueSet to true to enable Tuesday.
Example
trueSet to true to enable Wednesday.
Example
trueSet to true to enable Thursday.
Example
trueSet to true to enable Friday.
Example
trueSet to true to enable Saturday.
Example
trueSet to true to enable Sunday.
Example
trueConvenience property to quickly determine if this existing object has any active days enabled.
Example
trueobject
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
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
The cancellation policy for this rate plan.
Example
cancellation-policy-1Allows a property to dynamically use another cancellation policy for a specific date range
object
List of cancellation policy exceptions
object
Cancellation policy
Start date for when this cancellation policy should start to override the default cancellation policy.
End date for when this cancellation policy should end overriding the default cancellation policy.
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
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
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
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
Provides the name of the rate plan.
When true, indicates if the rate is a prepaid rate.
Whether rate plan is active or not.
When true, indicates breakfast is included.
When true, indicates brunch is included.
When true, indicates lunch is included.
When true, indicates dinner is included.
Everything included except alcohol
Everything included with alcohol
Set a start date for when to start selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.
Set an end date for when to finish selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.
Set a start date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.
Set an end date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.
Property honors loyalty points with this rate plan.
Maximum days before the arrival date for which this rate plan may be booked.
Minimum days before the arrival date for which this rate plan may be booked.
Defines the minimum number of total occupants required for this rate plan.
Defines the maximum number of total occupants required for this rate plan.
Indicates the minimum length of stay required for this rate plan.
Indicates the maximum length of stay.
The minimum age to qualify for this rate plan.
The maximum age to qualify for this rate plan.
This can be a one-time fee such as a cleaning fee
object
List of localized descriptions for this fee.
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.
Rate plan level fixed fee amount in property currency
object
Rate plan fee type
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.
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.
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.
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.
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
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
The cancellation policy for this rate plan.
object
Unique cancellation policy identifier
Property this cancellation is associated with
Whether this cancellation policy is refundable or not
When the cancellation policy is refundable, this flag can be set and indicates there is more rules involved than just a no-questions-asked refundable.
If advanceCancellationFreeOfCharge rules is not honored, this property explains what the guest will be charged.
In case the ‘Refundable cancellation charge’ is set, a different no show charge can be applied.
When the cancellation policy is non-refundable, this flag can be set and indicates there is more rules involved to calculate what the guest will owe in case of a cancellation.
The non-refundable charge might can have a deadline. If that deadline passes, the guest might be charged more.
If the guest does not honor the non-refundable deadline rule, this charge dictates what she owes after the deadline passes.
Allows a property to dynamically use another cancellation policy for a specific date range
object
List of cancellation policy exceptions
object
Cancellation policy
Cancellation policy
object
Unique cancellation policy identifier
Property this cancellation is associated with
Whether this cancellation policy is refundable or not
When the cancellation policy is refundable, this flag can be set and indicates there is more rules involved than just a no-questions-asked refundable.
If advanceCancellationFreeOfCharge rules is not honored, this property explains what the guest will be charged.
In case the ‘Refundable cancellation charge’ is set, a different no show charge can be applied.
When the cancellation policy is non-refundable, this flag can be set and indicates there is more rules involved to calculate what the guest will owe in case of a cancellation.
The non-refundable charge might can have a deadline. If that deadline passes, the guest might be charged more.
If the guest does not honor the non-refundable deadline rule, this charge dictates what she owes after the deadline passes.
Start date for when this cancellation policy should start to override the default cancellation policy.
End date for when this cancellation policy should end overriding the default cancellation policy.
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
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
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
Example
nullBad 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
{}