Fees

  1. Overview
  2. List fees
  3. Change fees currency
  4. Get a single fee
  5. Create a new fee
  6. Update a fee
  7. Archive a fee

Overview

This resource represents the Fees (Services) that are the part of the Bookings as Bookings Fees - either as “standalone fees” (that don’t have any relationship to Rentals Fees) or the ones that have a relationship to Rentals Fees.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Fee
id Integer Read Fee’s id.
currency String Read Requested fee’s currency, defaults to original_currency. List of currencies codes described in enums section
downpayment_percentage Decimal Read Fee’s downpayment percentage.
exchange_rate Decimal Read The rate used to convert from the original_currency to currency.
headline Object Read Fee’s headline, list of locales described in enums section.
name Object Read Fee’s name, list of locales described in enums section.
kind String Read Fee’s kind, list of fee’s kinds described in enums section
original_currency String Read Fee’s original currency, list of currencies codes described in enums section
rate Decimal Read Fee’s rate.
rate_kind String Read Fee’s rate kind, list of fee’s rate kinds described in enums section.
maximum_possible_rate Decimal Read Fee’s maximum possible rate, calculated value won’t exceed amount present on this attribute. It is applied only for percentage kinds, list of kinds is described in enums section
notes String Read Fee’s notes
archived_at Time Read Fee’s archive time.
created_at Time Read Fee’s create time.
updated_at Time Read Fee’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the Fee  
id Integer Read Fee’s id.  
currency String Read/Write Requested fee’s currency, defaults to original_currency. List of currencies codes described in enums section Must be one of the currencies enum
downpayment_percentage Decimal Read/Write Fee’s downpayment percentage. Required, must be great than or equal to: 0, must be less than or equal to: 100
exchange_rate Decimal Read The rate used to convert from the original_currency to currency.  
headline Object Read/Write Fee’s headline, list of locales described in enums section. Maximum length: 75
name Object Read/Write Fee’s name, list of locales described in enums section. Required, cannot contain non-printing characters
kind String Read/Write Fee’s kind, list of fee’s kinds described in enums section Required must be one of the fee kinds
original_currency String Read Fee’s original currency, list of currencies codes described in enums section  
rate Decimal Read/Write Fee’s rate. Required, greater than or equal to: 0
rate_kind String Read/Write Fee’s rate kind, list of fee’s rate kinds described in enums section. Required, must be one of the fee rate kinds
maximum_possible_rate Decimal Read/Write Fee’s maximum possible rate, calculated value won’t exceed amount present on this attribute. Must be greater than or equal to: 0, applicable only for percentage kinds (list of kinds is described in enums section).
notes String Read/Write Fee’s notes Maximum length: 100
archived_at Time Read Fee’s archive time.  
created_at Time Read Fee’s create time.  
updated_at Time Read Fee’s update time.  

List fees

List all fees for a given account(s).

GET /fees

Response

{
  "links": {
    "fees.account": "http://www.bookingsync.com/api/v3/accounts/{fees.account}"
  },
  "fees": [
    {
      "id": 9,
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "exchange_rate": "1.0",
      "headline": {
        "en": "Fee headline"
      },
      "kind": "other",
      "maximum_possible_rate": null,
      "name": {
        "en": "Fee"
      },
      "original_currency": "EUR",
      "rate": "12.0",
      "rate_kind": "fixed",
      "created_at": "2015-03-18T09:33:45Z",
      "updated_at": "2015-03-18T09:33:45Z",
      "archived_at": null,
      "links": {
        "account": 1
      }
    }
  ]
}

Change fees currency

Coverts fee’s rate to defined currency.

Example:

GET /fees?exchange_to_currency=USD

Exchange Parameters

Name Type Default Description
exchange_to_currency String original currency Fees with exchanged rate value.

Get a single fee

Returns a single fee identified by ID.

GET /fees/:fee_id

Response

{
  "links": {
    "fees.account": "http://www.bookingsync.com/api/v3/accounts/{fees.account}"
  },
  "fees": [
    {
      "id": 9,
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "exchange_rate": "1.0",
      "headline": {
        "en": "Fee headline"
      },
      "kind": "other",
      "maximum_possible_rate": null,
      "name": {
        "en": "Fee"
      },
      "original_currency": "EUR",
      "rate": "12.0",
      "rate_kind": "fixed",
      "created_at": "2015-03-18T09:33:45Z",
      "updated_at": "2015-03-18T09:33:45Z",
      "archived_at": null,
      "links": {
        "account": 1
      }
    }
  ]
}

Create a new fee

Returns a newly created fee.

POST /fees

Example JSON request

{
  "fees": [
    {
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "headline_en": "Fee headline",
      "kind": "other",
      "name_en": "Fee",
      "rate": "12.0",
      "rate_kind": "fixed"
    }
  ]
}

Response

{
  "links": {
    "fees.account": "http://www.bookingsync.com/api/v3/accounts/{fees.account}"
  },
  "fees": [
    {
      "id": 9,
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "exchange_rate": "1.0",
      "headline": {
        "en": "Fee headline"
      },
      "kind": "other",
      "maximum_possible_rate": null,
      "name": {
        "en": "Fee"
      },
      "original_currency": "EUR",
      "rate": "12.0",
      "rate_kind": "fixed",
      "created_at": "2015-03-18T09:33:45Z",
      "updated_at": "2015-03-18T09:33:45Z",
      "archived_at": null,
      "links": {
        "account": 1
      }
    }
  ]
}

Update a fee

Returns an updated fee identified by ID.

PUT /fees/:fee_id

Example JSON request

{
  "fees": [
    {
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "headline_en": "Fee headline",
      "kind": "other",
      "name_en": "Fee",
      "rate": "12.0",
      "rate_kind": "fixed"
    }
  ]
}

Response

{
  "links": {
    "fees.account": "http://www.bookingsync.com/api/v3/accounts/{fees.account}"
  },
  "fees": [
    {
      "id": 9,
      "currency": "EUR",
      "downpayment_percentage": "0.0",
      "exchange_rate": "1.0",
      "headline": {
        "en": "Fee headline"
      },
      "kind": "other",
      "maximum_possible_rate": null,
      "name": {
        "en": "Fee"
      },
      "original_currency": "EUR",
      "rate": "12.0",
      "rate_kind": "fixed",
      "created_at": "2015-03-18T09:33:45Z",
      "updated_at": "2015-03-18T09:33:45Z",
      "archived_at": null,
      "links": {
        "account": 1
      }
    }
  ]
}

Archive a fee

Archived fees

Fees that were archived are no longer considered valid, but will be present on index and show actions. They can be identified by presence of archived_at timestamp.

Required OAuth scope: :rates_write

Returns empty response with ‘204 No Content’ status code on success.

DELETE /fees/:fee_id