Wiki

Clone wiki

API-2.0 / Booking_cancellation_policy

Method: GET

Path: /policy/cancellation

Returns "booking cancellation" policy. Can be used to display late cancellation fee, etc...

Cancellation policy attributes:

  • late_cancellation_fee equal or greater than 0
  • late_cancellation_percent between 0 and 100
  • both late_cancellation_fee and late_cancellation_percent cannot be greater than 0 at the same time
  • custom can be true or false: it is false for default policy and it is true for custom policy
  • unit present only when custom=true, possible values "hour" or "day"
  • quantity present only when custom=true, it is integer greater than 0
  • cancellation_reason_on can be true or false; if it is true user must provide reason of booking cancellation when cancelling booking

Default policy means:

  • late cancellation will not be applied if customer trying to cancel booking before 5pm on the previous day of service.
  • otherwise late cancellation will be applied

Custom policy means:

  • late cancellation will not be applied if more than quantity units left untill the booking's service date & time.
  • otherwise late cancellation will be applied.

Late cancellation:

  • if late_cancellation_fee greater than 0, it will be used as cancellation fee
  • if late_cancellation_percent greater than 0, it will be used to calculate fee for booking as % of the booking’s before-tax Amount
  • if both late_cancellation_fee and late_cancellation_percent equal to 0, late cancellation will not be applied

Example of response JSON (default policy, cancellation fee)

{
  "custom": false,
  "late_cancellation_fee": 10.0,
  "cancellation_reason_on": false
}

Example of response JSON (default policy, cancellation percentage)

{
  "custom": false,
  "late_cancellation_percent": 20.5,
  "cancellation_reason_on": true
}

Example of response JSON (custom policy, cancellation fee)

{
  "custom": true,
  "unit": "hour",
  "quantity": 8,
  "late_cancellation_fee": 10.0,
  "cancellation_reason_on": false 
}

Example of response JSON (custom policy, cancellation percentage)

{
  "custom": true,
  "unit": "hour",
  "quantity": 8,
  "late_cancellation_percent": 20.5,
  "cancellation_reason_on": false
}

Example request:

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

Replace BEARER_FROM_LOGIN with bearer from Login

curl -H "Content-Type: application/json" \
     -H 'Authorization: Bearer BEARER_FROM_LOGIN' \
     -X GET -k \
      https://acme-sandbox.l27.co/latest/policy/cancellation

Updated