Μετάβαση στο περιεχόμενο

Taxes

Reusable tax definitions

The tax object

Attributes

iduuid

Unique identifier

organization_iduuid
organizations.id

Identifier of the organization this tax is defined in

created_atread-onlytimestamp with time zone

Creation timestamp

updated_atread-onlytimestamp with time zone

Last modification timestamp

before_couponsboolean

Whether the tax is calculated on the price before coupons, which can then pay for it, as for a service fee

ftsread-onlytsvector | null

Full text search index

labelMultiLanguageString

Localized label of the tax

percentagenumeric

Percentage of the tax

restrictionsArray<BooleanExpression>

Conditions that must all hold for the tax to apply to a booking, such as a maximum stay length; empty applies it always

typeTaxType

Type of the tax

Related resources

Embed related resources in the response with the select parameter, for example select=*,organizations(*). Resources related through more than one column need the column as a hint, like table!column(*).

organizations(*)object | null
organizations

The organization referenced by organization_id.

line_item_taxes(*)array
line_item_taxes

The line item taxes referencing this tax through line_item_taxes.tax_id.

The tax object
JSON
{
  "id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-11-30T11:02:01.147Z",
  "updated_at": "2026-11-30T11:02:01.147Z",
  "before_coupons": false,
  "label": {},
  "percentage": 0,
  "restrictions": {},
  "type": "on-top"
}
Including related resources
curl "https://api.bookingmood.com/v1/taxes?limit=10&select=*,organizations(*),line_item_taxes(*)" \
  -H "Authorization: Bearer YOUR_API_KEY"

List taxes

Requiresproducts:read

Filters

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this tax is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

before_couponsFilter<boolean>

Whether the tax is calculated on the price before coupons, which can then pay for it, as for a service fee

ftsFilter<tsvector | null>

Full text search index

labelFilter<MultiLanguageString>

Localized label of the tax

percentageFilter<numeric>

Percentage of the tax

restrictionsFilter<Array<BooleanExpression>>

Conditions that must all hold for the tax to apply to a booking, such as a maximum stay length; empty applies it always

typeFilter<TaxType>

Type of the tax

Responses

200

A list of taxes with the selected columns

206

Partial Content

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

403

The API key or access token doesn't have the scope this request needs.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
GET/taxes
curl "https://api.bookingmood.com/v1/taxes?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:02:01.147Z",
    "updated_at": "2026-11-30T11:02:01.147Z",
    "before_coupons": false,
    "label": {},
    "percentage": 0,
    "restrictions": {},
    "type": "on-top"
  }
]

Create taxes

Requiresproducts:write

Body

Partial<Tax> | Array<Partial<Tax>>

Read-only attributes are set by the database and can't be written.

Responses

201

The newly created taxes with the selected columns

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key or access token doesn't have the scope this request needs, or no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
POST/taxes
curl "https://api.bookingmood.com/v1/taxes" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "before_coupons": false,
    "label": {},
    "percentage": 0,
    "restrictions": {},
    "type": "on-top"
  }'
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:02:01.147Z",
    "updated_at": "2026-11-30T11:02:01.147Z",
    "before_coupons": false,
    "label": {},
    "percentage": 0,
    "restrictions": {},
    "type": "on-top"
  }
]

Delete taxes

Requiresproducts:write

Filters

Without filters, this request deletes all taxes you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this tax is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

before_couponsFilter<boolean>

Whether the tax is calculated on the price before coupons, which can then pay for it, as for a service fee

ftsFilter<tsvector | null>

Full text search index

labelFilter<MultiLanguageString>

Localized label of the tax

percentageFilter<numeric>

Percentage of the tax

restrictionsFilter<Array<BooleanExpression>>

Conditions that must all hold for the tax to apply to a booking, such as a maximum stay length; empty applies it always

typeFilter<TaxType>

Type of the tax

Responses

200

The deleted taxes with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

403

The API key or access token doesn't have the scope this request needs, or no permission for this change, for example when writing rows of another organization.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
DELETE/taxes
curl -X DELETE "https://api.bookingmood.com/v1/taxes?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:02:01.147Z",
    "updated_at": "2026-11-30T11:02:01.147Z",
    "before_coupons": false,
    "label": {},
    "percentage": 0,
    "restrictions": {},
    "type": "on-top"
  }
]

Update taxes

Requiresproducts:write

Filters

Without filters, this request updates all taxes you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this tax is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

before_couponsFilter<boolean>

Whether the tax is calculated on the price before coupons, which can then pay for it, as for a service fee

ftsFilter<tsvector | null>

Full text search index

labelFilter<MultiLanguageString>

Localized label of the tax

percentageFilter<numeric>

Percentage of the tax

restrictionsFilter<Array<BooleanExpression>>

Conditions that must all hold for the tax to apply to a booking, such as a maximum stay length; empty applies it always

typeFilter<TaxType>

Type of the tax

Body

Partial<Tax>

Read-only attributes are set by the database and can't be written.

Responses

200

The updated taxes with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key or access token doesn't have the scope this request needs, or no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
PATCH/taxes
curl -X PATCH "https://api.bookingmood.com/v1/taxes?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "before_coupons": false }'
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:02:01.147Z",
    "updated_at": "2026-11-30T11:02:01.147Z",
    "before_coupons": false,
    "label": {},
    "percentage": 0,
    "restrictions": {},
    "type": "on-top"
  }
]