v1

latestOpenAPI 3.0.32026-07-2632131.4 MB
Taxes

Update tax

Update tax by id.

patch/taxes/{id}

Path parameters

idstring required
Example:df7hf01cnduhdb2125854dj8

The tax id

Query parameters

applyRequiredChangesToTaxesWithSameTypeboolean

When true, applies required changes to all taxes with the same type.

Request body

type'LOCAL_TAX' | 'CITY_TAX' | 'VAT' | 'GOODS_AND_SERVICES_TAX' | 'TOURISM_TAX' | 'OTHER' | 'STATE_TAX' | 'COUNTY_TAX' | 'OCCUPANCY_TAX' | 'TRANSIENT_OCCUPANCY_TAX' | 'HOME_SHARING_TAX' | 'HARMONIZED_SALES_TAX' | 'MINIMUM_ALTERNATE_TAX'
  1. The tax type.
  2. Each tax type can only be defined once on account/listing level.
units'PERCENTAGE' | 'FIXED'

Determines whether the tax amount should be treated as a fixed or percentage value

amountnumber
  1. the amount of the tax, could be a fixed value or percentage whether units is 'FIXED' or 'PERCENTAGE' respectively.
  2. when 'FIXED' then 'amount' has to be greater then 0
  3. when 'PERCENTAGE' then 'amount' has to be greater then 0 and smaller or equal to 100
quantifier'PER_NIGHT' | 'PER_GUEST' | 'PER_GUEST_PER_NIGHT' | 'PER_STAY'

Determines by what factor the tax amount will be multiplied

appliedToAllFeesboolean
  1. Relevant only when the units equals 'PERCENTAGE'
  2. When equals 'true', then the tax will be calculated on all fees and 'appliedOnFees' must contain all values
appliedOnFeesstring[]
isAppliedByDefaultboolean
  1. When set to 'true' and 'appliedByDefaultOnChannels' is not empty, then Guesty will prededuct the tax from the accommodation fare.
  2. can not be 'true' when 'appliedByDefaultOnChannels' is empty
appliedByDefaultOnChannelsstring[]
namestring

The name for the tax, which will be used accross guesty. there can be no two taxes with the same name. to remove a name of existing tax pass empty string

isInclusiveboolean

Example request

{
  "appliedOnFees": [
    "AF"
  ],
  "appliedByDefaultOnChannels": [
    "airbnb2"
  ],
  "conditionalOverrides": {
    "rules": [
      {
        "dateRange": {
          "from": "12-31",
          "to": "02-01"
        }
      }
    ]
  },
  "channelOverrides": [
    {
      "isAppliedByDefault": true,
      "appliedByDefaultOnChannels": [
        "manual"
      ]
    }
  ]
}

Response

The tax has been successfully updated.

_idstring
unitTypeIdstring
accountIdstring required
type'LOCAL_TAX' | 'CITY_TAX' | 'VAT' | 'GOODS_AND_SERVICES_TAX' | 'TOURISM_TAX' | 'OTHER' | 'STATE_TAX' | 'COUNTY_TAX' | 'OCCUPANCY_TAX' | 'TRANSIENT_OCCUPANCY_TAX' | 'HOME_SHARING_TAX' | 'HARMONIZED_SALES_TAX' | 'MINIMUM_ALTERNATE_TAX' required
units'PERCENTAGE' | 'FIXED' required
quantifier'PER_NIGHT' | 'PER_GUEST' | 'PER_GUEST_PER_NIGHT' | 'PER_STAY' required
appliedOnFeesstring[] required
appliedByDefaultOnChannelsstring[] required
isDeletedboolean
amountnumber required
namestring
appliedToAllFeesboolean required
isAppliedByDefaultboolean required
isInclusiveboolean

Example response

{
  "_id": "df7hf01cnduhdb2125854dj8",
  "unitTypeId": "623892d57f4f56afcb25587c",
  "accountId": "623892d57f4f56afcb25587c",
  "appliedOnFees": [
    "AF"
  ],
  "channelOverrides": [
    {
      "isAppliedByDefault": true,
      "appliedByDefaultOnChannels": [
        "manual"
      ]
    }
  ],
  "conditionalOverrides": {
    "rules": [
      {
        "dateRange": {
          "from": "12-31",
          "to": "02-01"
        }
      }
    ]
  }
}