Create
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/extranet/cancellation-policy';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
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/cancellation-policy \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullCreates a new cancellation policy for the given property from the supplied request and returns the persisted policy.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”UUID of the managing entity (property owner) to associate the new cancellation policy with.
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Cancellation policy definition including the policy name, refund rules and applicable time windows before check-in
Request payload for creating or updating a cancellation policy, specifying refundability rules and applicable charge percentages
object
Whether this cancellation policy is refundable or not
Example
falseWhen the cancellation policy is refundable, this flag can be set and indicates there is more rules involved than just a no-questions-asked refundable.
Example
UNTIL_EIGHTEEN_HUNDRED_HOURS_ON_DAY_OF_ARRIVALIf advanceCancellationFreeOfCharge rules is not honored, this property explains what the guest will be charged.
Example
FIFTY_PERCENTIn case the ‘Refundable cancellation charge’ is set, a different no show charge can be applied.
Example
SAME_AS_CANCELLATION_FEEWhen 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.
Example
SEVENTY_PERCENTThe non-refundable charge might can have a deadline. If that deadline passes, the guest might be charged more.
Example
SEVEN_DAYS_BEFORE_ARRIVALIf the guest does not honor the non-refundable deadline rule, this charge dictates what she owes after the deadline passes.
Example
ONE_HUNDRED_PERCENTExample
{ "refundable": false, "advanceCancellationFreeOfCharge": "UNTIL_EIGHTEEN_HUNDRED_HOURS_ON_DAY_OF_ARRIVAL", "refundableCancellationCharge": "FIFTY_PERCENT", "noShowCharge": "SAME_AS_CANCELLATION_FEE", "nonRefundableCancellationCharge": "SEVENTY_PERCENT", "nonRefundableDeadline": "SEVEN_DAYS_BEFORE_ARRIVAL", "nonRefundableAfterDeadlineCancellationCharge": "ONE_HUNDRED_PERCENT"}Responses
Section titled “ Responses ”Cancellation policy created successfully.
Cancellation policy document that defines the refundability rules and charge percentages applied when a guest cancels or does not show up for a booking
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.
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.
Example
Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable