Tariffs


Get tariffs

Endpoint

GET https://yourdomain.com/bookyflow/api/tariffs/{{property_id}}

Path Parameters

Parameter Description
{{property_id}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "tariffs": {
      "1": {
        "104": {
          "263": {
            "rates_uid": 263,
            "rate_title": "Tariff",
            "rate_description": "",
            "validfrom": "2019/03/01",
            "validto": "2019/12/31",
            "roomrateperday": "80",
            "mindays": 1,
            "maxdays": 365,
            "minpeople": 1,
            "maxpeople": 100,
            "roomclass_uid": 1,
            "ignore_pppn": 0,
            "allow_ph": 1,
            "allow_we": 1,
            "weekendonly": 0,
            "validfrom_ts": 2019,
            "validto_ts": 2019,
            "dayofweek": 7,
            "minrooms_alreadyselected": 0,
            "maxrooms_alreadyselected": 100,
            "property_uid": 1,
            "tarifftype_id": 104
          },
          "264": {
            "rates_uid": 264,
            "rate_title": "Tariff",
            "rate_description": "",
            "validfrom": "2020/01/01",
            "validto": "2020/12/31",
            "roomrateperday": "0",
            "mindays": 0,
            "maxdays": 365,
            "minpeople": 1,
            "maxpeople": 100,
  ...
  (Response truncated for brevity)
}

Tariff add

Endpoint

POST https://yourdomain.com/bookyflow/api/tariffs/{{property_id}}/micromanage/

Notes If you receive the "Tariff save method not valid for this property" response, then the property is configured to save tariffs in either Normal or Advanced editing mode. The REST API only supports updating prices for micromanage mode.

When guests book, they select a combination of room ( or room type ) and tariff. This allows us to have multiple tariffs for the same room type, and is extremely flexible.

These settings determine if a tariff is valid to be shown in the booking form once the dates and guest numbers ( if guest types have been created ) have been selected.

Micromanage tariffs are groups of Advanced tariffs, neatly packaged up to allow users to create seamless sets of prices across multiple dates. They are grouped via an item called the tarifftypeid which is used to identify groups of tariffs as linked together.


  • tarifftypeid If you are creating a new tariff, this should be zero. On successful creation the API will return the new tariff type id.

  • maxdays Maximum days of the visit

  • minpeople Minimum number of people for this tariff to be valid.

  • maxpeople Maximum number of people for this tariff to be valid.

  • roomclass_uid The id of the room type that this tariff is for.

  • dayofweek Checking day of week allowed. If the booking starts on N day of the week, then this tariff is valid to be offered. 0 : Sunday 1 : Monday 2 : Tuesday : 3 Wednesday : 4 Thursday : 5 Friday : 6 Saturday : 7 Any day of week.

  • ignoreppn Properties can be configured to charge per person per night by default. This setting (1 or 0 ) allows certain tariffs to be priced at a flat rate instead of per person per night.

  • allow_we Allow bookings that span weekend days. For example, a tariff that has this option set to No (zero) would be a maximum of 5 nights long if the checkin date was a Monday. This allows you to have midweek only tariffs.

  • minrooms_alreadyselected

  • maxrooms_alreadyselected These two settings allow you to create room/tariff combinations that are only offered if the guest has already selected another room in the booking form. Most of the time you would leave these at the defaults of 0 & 100.

  • tariffinput[epoch] Prices for each date.

  • dates_mindays[epoch] Minimum days stay for each date.

Example POST body

  • tarifftypeid: "0"
  • rate_title: "Christmas 2019"
  • rate_description: "Christmas prices"
  • maxdays: "100"
  • minpeople: "2"
  • maxpeople: "4"
  • roomclass_uid: "1"
  • dayofweek: "7"
  • ignore_pppn: "0"
  • allow_we: "1"
  • weekendonly: "0"
  • minrooms_alreadyselected: "0"
  • maxrooms_alreadyselected: "100"
  • tariffinput[1577059200]: "25"
  • tariffinput[1577145600] : "50"
  • tariffinput[1577232000]: "65"
  • mindaysinput[1577059200]: "4"
  • mindaysinput[1577145600]: "3"
  • mindaysinput[1577232000]: "1"

Path Parameters

Parameter Description
{{property_id}} (Required parameter)

Form Data Parameters

Parameter Type Required Description
tarifftypeid text Yes
rate_title text Yes
rate_description text Yes
maxdays text Yes
minpeople text Yes
maxpeople text Yes
roomclass_uid text Yes
dayofweek text Yes
ignore_pppn text Yes
allow_we text Yes
weekendonly text Yes
minrooms_alreadyselected text Yes
maxrooms_alreadyselected text Yes
{{tariffs_tariffinput[DATE1]}} text Yes
{{tariffs_tariffinput[DATE2]}} text Yes
{{tariffs_tariffinput[DATE3]}} text Yes
{{tariffs_mindaysinput[DATE1]}} text Yes
{{tariffs_mindaysinput[DATE2]}} text Yes
{{tariffs_mindaysinput[DATE3]}} text Yes

Response Example

Status: OK (200)

{
  "data": {
    "tarifftypeid": 115
  },
  "meta": {
    "code": 200
  }
}

Tariff update

Endpoint

PUT https://yourdomain.com/bookyflow/api/tariffs/{{property_id}}/micromanage/

Notes If you receive the "Tariff save method not valid for this property" response, then the property is configured to save tariffs in either Normal or Advanced editing mode. The REST API only supports updating prices for micromanage mode.

When guests book, they select a combination of room ( or room type ) and tariff. This allows us to have multiple tariffs for the same room type, and is extremely flexible.

These settings determine if a tariff is valid to be shown in the booking form once the dates and guest numbers ( if guest types have been created ) have been selected.

Micromanage tariffs are groups of Advanced tariffs, neatly packaged up to allow users to create seamless sets of prices across multiple dates. They are grouped via an item called the tarifftypeid which is used to identify groups of tariffs as linked together.


  • tarifftypeid If you are creating a new tariff, this should be zero. On successful creation the API will return the new tariff type id.

  • maxdays Maximum days of the visit

  • minpeople Minimum number of people for this tariff to be valid.

  • maxpeople Maximum number of people for this tariff to be valid.

  • roomclass_uid The id of the room type that this tariff is for.

  • dayofweek Checking day of week allowed. If the booking starts on N day of the week, then this tariff is valid to be offered. 0 : Sunday 1 : Monday 2 : Tuesday : 3 Wednesday : 4 Thursday : 5 Friday : 6 Saturday : 7 Any day of week.

  • ignoreppn Properties can be configured to charge per person per night by default. This setting (1 or 0 ) allows certain tariffs to be priced at a flat rate instead of per person per night.

  • allow_we Allow bookings that span weekend days. For example, a tariff that has this option set to No (zero) would be a maximum of 5 nights long if the checkin date was a Monday. This allows you to have midweek only tariffs.

  • minrooms_alreadyselected

  • maxrooms_alreadyselected These two settings allow you to create room/tariff combinations that are only offered if the guest has already selected another room in the booking form. Most of the time you would leave these at the defaults of 0 & 100.

  • tariffinput[epoch] Prices for each date.

  • dates_mindays[epoch] Minimum days stay for each date.

Example PUT body

  • tarifftypeid: "115"
  • rate_title: "Christmas 2019"
  • rate_description: "Christmas prices"
  • maxdays: "100"
  • minpeople: "2"
  • maxpeople: "4"
  • roomclass_uid: "1"
  • dayofweek: "7"
  • ignore_pppn: "0"
  • allow_we: "1"
  • weekendonly: "0"
  • minrooms_alreadyselected: "0"
  • maxrooms_alreadyselected: "100"
  • tariffinput[1577059200]: "25"
  • tariffinput[1577145600] : "50"
  • tariffinput[1577232000]: "65"
  • mindaysinput[1577059200]: "4"
  • mindaysinput[1577145600]: "3"
  • mindaysinput[1577232000]: "1"

Request Headers

Header Value Required Description
Content-Type application/x-www-form-urlencoded Yes

Path Parameters

Parameter Description
{{property_id}} (Required parameter)

Form Data Parameters

Parameter Type Required Description
tarifftypeid text Yes
rate_title text Yes
rate_description text Yes
maxdays text Yes
minpeople text Yes
maxpeople text Yes
roomclass_uid text Yes
dayofweek text Yes
ignore_pppn text Yes
allow_we text Yes
weekendonly text Yes
minrooms_alreadyselected text Yes
maxrooms_alreadyselected text Yes
{{tariffs_tariffinput[DATE1]}} text Yes
{{tariffs_tariffinput[DATE2]}} text Yes
{{tariffs_tariffinput[DATE3]}} text Yes
{{tariffs_mindaysinput[DATE1]}} text Yes
{{tariffs_mindaysinput[DATE2]}} text Yes
{{tariffs_mindaysinput[DATE3]}} text Yes

Response Example

Status: OK (200)

{
  "data": {
    "tarifftypeid": 115
  },
  "meta": {
    "code": 200
  }
}

Delete Tariff

Endpoint

DELETE https://yourdomain.com/bookyflow/api/tariffs/{{property_id}}/{{tariffs_tarifftypeid}}

Path Parameters

Parameter Description
{{property_id}} (Required parameter)
{{tariffs_tarifftypeid}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "deletetariff": [
      {
        "message": "Tariff deleted",
        "property_uid": 1,
        "tarifftypeid": 115
      }
    ]
  },
  "meta": {
    "code": 200
  }
}