Skip to content

GetCancellationPolicy

POST
/wink.partner.v1.Content/GetCancellationPolicy
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.

Media typeapplication/json

Request for GetCancellationPolicy.

No language_code: a policy is a set of rules with no stored prose to translate. See CancellationPolicyContent.

object
cancellationPolicyId

Cancellation policy to fetch, from RoomRate.cancellation_policy_id on a pricing result.

string
Examplegenerated
{
"cancellationPolicyId": "example"
}

The RPC completed with gRPC status OK.

Media typeapplication/json

Response for GetCancellationPolicy.

object
cancellationPolicy

The cancellation policy.

object
id

Stable policy identifier.

string
refundable

Whether the stay can be cancelled without charge before the deadline. The single field to branch on.

boolean
policyCode

Two-character summary: “R” refundable, “NR” non-refundable.

string
freeCancellationDaysBefore

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.

integer format: int32
advanceCancellationFreeOfCharge

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.

string
refundableCancellationCharge

What a refundable policy charges when the free window has closed, e.g. “FIFTY_PERCENT”.

string
noShowCharge

What is charged when the guest does not arrive at all, e.g. “SAME_AS_CANCELLATION_FEE”.

string
nonRefundableCancellationCharge

What a non-refundable policy charges on cancellation, e.g. “SEVENTY_PERCENT”.

string
nonRefundableDeadline

The point after which a non-refundable policy charges more, e.g. “SEVEN_DAYS_BEFORE_ARRIVAL”.

string
nonRefundableAfterDeadlineCancellationCharge

What a non-refundable policy charges once non_refundable_deadline has passed, e.g. “ONE_HUNDRED_PERCENT”.

string
Examplegenerated
{
"cancellationPolicy": {
"id": "example",
"refundable": true,
"policyCode": "example",
"freeCancellationDaysBefore": 1,
"advanceCancellationFreeOfCharge": "example",
"refundableCancellationCharge": "example",
"noShowCharge": "example",
"nonRefundableCancellationCharge": "example",
"nonRefundableDeadline": "example",
"nonRefundableAfterDeadlineCancellationCharge": "example"
}
}