GetCancellationPolicy
const url = 'https://example.com/wink.partner.v1.Content/GetCancellationPolicy';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cancellationPolicyId":"example"}'};
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://example.com/wink.partner.v1.Content/GetCancellationPolicy \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cancellationPolicyId": "example" }'Get one cancellation policy by id
As above, for a cancellation_policy_id from RoomRate. The pricing surfaces already tell you whether
an offer is refundable and until when; this tells you the terms behind that answer.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request for GetCancellationPolicy.
No language_code: a policy is a set of rules with no stored prose to translate. See
CancellationPolicyContent.
object
Cancellation policy to fetch, from RoomRate.cancellation_policy_id on a pricing result.
Examplegenerated
{ "cancellationPolicyId": "example"}Responses
Section titled “Responses”The RPC completed with gRPC status OK.
Response for GetCancellationPolicy.
object
The cancellation policy.
object
Stable policy identifier.
Whether the stay can be cancelled without charge before the deadline. The single field to branch on.
Two-character summary: “R” refundable, “NR” non-refundable.
Days before arrival by which a free cancellation must be made. Zero means the deadline falls ON the
arrival day — read advance_cancellation_free_of_charge for the hour, which is the only place that
distinction survives. Absent on a non-refundable policy, which has no free window to count down.
The free-cancellation window as the property set it, e.g. “SEVEN_DAYS_BEFORE_ARRIVAL” or
“UNTIL_EIGHTEEN_HUNDRED_HOURS_ON_DAY_OF_ARRIVAL”. The two day-of-arrival values both report
free_cancellation_days_before = 0 and differ only here.
What a refundable policy charges when the free window has closed, e.g. “FIFTY_PERCENT”.
What is charged when the guest does not arrive at all, e.g. “SAME_AS_CANCELLATION_FEE”.
What a non-refundable policy charges on cancellation, e.g. “SEVENTY_PERCENT”.
The point after which a non-refundable policy charges more, e.g. “SEVEN_DAYS_BEFORE_ARRIVAL”.
What a non-refundable policy charges once non_refundable_deadline has passed, e.g.
“ONE_HUNDRED_PERCENT”.
Examplegenerated
{ "cancellationPolicy": { "id": "example", "refundable": true, "policyCode": "example", "freeCancellationDaysBefore": 1, "advanceCancellationFreeOfCharge": "example", "refundableCancellationCharge": "example", "noShowCharge": "example", "nonRefundableCancellationCharge": "example", "nonRefundableDeadline": "example", "nonRefundableAfterDeadlineCancellationCharge": "example" }}