[Beta] Basic Fees

Update listing basic fees

Changed on

Upsert replaces stored listing-default cleaningFee only when cleaningFee is sent; omitting it keeps the stored default. This PUT cannot clear only the listing default while keeping overrides — use DELETE on the listing to remove all basic fees for that listing. channelConfigurations is required: send [] to store no overrides (clears existing). Omitting channelConfigurations is 400. An override entry may omit cleaningFee (channel only); GET by channel then falls back to the listing default. Do not send _id or lastUpdated on write; they are server-owned. When shouldUpdateSubUnits is true, child listings are overwritten with the same payload (not a merge of each child's previous settings).

put/basic-fees/listings/{listingId}

Request

  • Base URL
    https://open-api.guesty.com/v1
  • URL
    https://open-api.guesty.com/v1/basic-fees/listings/{listingId}
  • Auth
    API key in header authorization

Path parameters

listingIdstring required
Example:5f8d0d55b54764421b7156c9

Listing id (for example 5f8d0d55b54764421b7156c9).

Query parameters

shouldUpdateSubUnitsboolean

When true, overwrites child listings with the same payload as this request (not a merge of each child's previous settings). Example: false.

Request body

Example request

{
  "cleaningFee": {
    "value": {
      "_id": "5f8d0d55b54764421b7156c9",
      "multiplier": "PER_STAY",
      "formula": 100,
      "valueType": "FIXED"
    }
  },
  "channelConfigurations": [
    {
      "cleaningFee": {
        "value": {
          "_id": "5f8d0d55b54764421b7156c9",
          "multiplier": "PER_STAY",
          "formula": 100,
          "valueType": "FIXED"
        }
      }
    }
  ]
}

Response

The basic fees have been successfully created or updated.

listingIdstring required

Listing id

accountIdstring required

Account id

Example response

{
  "listingId": "5f8d0d55b54764421b7156c9",
  "accountId": "5f8d0d55b54764421b7156c8",
  "cleaningFee": {
    "value": {
      "_id": "5f8d0d55b54764421b7156c9",
      "multiplier": "PER_STAY",
      "formula": 100,
      "valueType": "FIXED"
    }
  },
  "channelConfigurations": [
    {
      "cleaningFee": {
        "value": {
          "_id": "5f8d0d55b54764421b7156c9",
          "multiplier": "PER_STAY",
          "formula": 100,
          "valueType": "FIXED"
        }
      }
    }
  ]
}

Changes