Fees

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

Parameters

Name Type Read/Write Description
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.
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
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
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
downpayment_percentage Decimal Read/Write ** Required** Fee’s downpayment percentage.
exchange_rate Decimal Read The rate used to convert from the original_currency to currency.
name Object Read/Write ** Required** Fee’s name, list of locales described in enums section.
kind String Read/Write 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/Write ** Required** Fee’s rate.
rate_kind String Read/Write ** Required** Fee’s rate kind, list of fee’s rate kinds described in enums section.
maximum_possible_rate Decimal Read/Write 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
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",
      "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",
      "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",
      "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",
      "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",
      "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",
      "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