Top

Currency & Exchange Rate

List currencies
GET /settings/currencies
List of configured currencies with pagination.
Get a currency
GET /settings/currencies/:currency_id
Get the details of a currency.
Create a currency
POST /settings/currencies
Create a currency for transactions.
Update a currency
PUT /settings/currencies/:currency_id
Update the details of a currency.
Delete a currency
DELETE /settings/currencies/:currency_id
Delete a currency. Currency that is associated to transactions cannot be deleted.
List exchange rates
GET /settings/currencies/:currency_id/exchangerates
List of exchange rates configured for the currency.
Get an exchange rate
GET /settings/currencies/:currency_id/exchangerates/:exchange_rate_id
Get the details of an exchange rate that has been associated to the currency.
Create an exchange rate
POST /settings/currencies/:currency_id/exchangerates
Create an exchange rate for the specified currency.
Upate an exchange rate
PUT /settings/currencies/:currency_id/exchangerates/:exchange_rate_id
Update the details of exchange rate for a currency.
Delete an exchange rate
DELETE /settings/currencies/:currency_id/exchangerates/:exchange_rate_id
Delete an exchange rate for the specified currency.

List currencies

GET  /settings/currencies

List of configured currencies with pagination.

Parameters

filter_by string Filter list of configured currencies excluding the base currency
Allowed Values: Currencies.ExcludeBaseCurrency

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "currencies": [
    {
      "currency_id": "460000000000105",
      "currency_code": "AUD",
      "currency_name": "AUD- Australian Dollar",
      "currency_symbol": "$",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000101",
      "currency_code": "CAD",
      "currency_name": "CAD- Canadian Dollar",
      "currency_symbol": "$",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000113",
      "currency_code": "CNY",
      "currency_name": "CNY- Yuan Renminbi",
      "currency_symbol": "CNY",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000109",
      "currency_code": "EUR",
      "currency_name": "EUR- Euro",
      "currency_symbol": "€",
      "price_precision": 2,
      "currency_format": "1.234.567,89",
      "is_base_currency": false,
      "exchange_rate": 1.23,
      "effective_date": "2013-09-04"
    },
    {
      "currency_id": "460000000000103",
      "currency_code": "GBP",
      "currency_name": "GBP- Pound Sterling",
      "currency_symbol": "£",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000099",
      "currency_code": "INR",
      "currency_name": "INR- Indian Rupee",
      "currency_symbol": "Rs.",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 1.00,
      "effective_date": "2013-07-30"
    },
    {
      "currency_id": "460000000000111",
      "currency_code": "JPY",
      "currency_name": "JPY- Yen",
      "currency_symbol": "¥",
      "price_precision": 0,
      "currency_format": "1,234,567",
      "is_base_currency": false,
      "exchange_rate": 0,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000097",
      "currency_code": "USD",
      "currency_name": "USD- US Dollar",
      "currency_symbol": "$",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": true,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "460000000000107",
      "currency_code": "ZAR",
      "currency_name": "ZAR- Rand",
      "currency_symbol": "R",
      "price_precision": 2,
      "currency_format": "1,234,567.89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Currencies"
  }
}

Get a currency

GET  /settings/currencies/:currency_id

Get the details of a currency.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "currency": {
    "currency_id": "460000000000097",
    "currency_code": "USD",
    "currency_name": "USD- US Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": true
  }
}

Create a currency

POST  /settings/currencies

Create a currency for transactions.

Request attributes

currency_code string
[100]
Standard code to identify the currency.
currency_symbol string
[4]
Standard symbol that the currency can be represented with.
price_precision int Number of decimal places for the currency.
currency_format string
[100]
Format in which the currency to be displayed.

Sample Request

{
  "currency_code": "USD",
  "currency_symbol": "$",
  "price_precision": 2,
  "currency_format": "1,234,567.89"
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The currency has been added.",
  "currency": {
    "currency_id": "460000000000097",
    "currency_code": "USD",
    "currency_name": "USD- US Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": true
  }
}

Update a currency

PUT  /settings/currencies/:currency_id

Update the details of a currency.

Request attributes

currency_code string
[100]
Standard code to identify the currency.
currency_symbol string
[4]
Standard symbol that the currency can be represented with.
price_precision int Number of decimal places for the currency.
currency_format string
[100]
Format in which the currency to be displayed.

Sample Request

{
  "currency_code": "USD",
  "currency_symbol": "$",
  "price_precision": 2,
  "currency_format": "1,234,567.89"
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Currency information has been saved.",
  "currency": {
    "currency_id": "460000000000097",
    "currency_code": "USD",
    "currency_name": "USD- US Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": true
  }
}

Delete a currency

DELETE  /settings/currencies/:currency_id

Delete a currency. Currency that is associated to transactions cannot be deleted.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The currency has been deleted."
}

List exchange rates

GET  /settings/currencies/:currency_id/exchangerates

List of exchange rates configured for the currency.

Parameters

from_date string
[yyyy-MM-dd]
Returns the exchange rate details from the given date or from previous closest match in the absence of the exchange rate on the given date.
is_current_date boolean To return the exchange rate only if available for current date.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "exchange_rates": [
    {
      "exchange_rate_id": "460000000038035",
      "currency_id": "460000000000109",
      "currency_code": "EUR",
      "effective_date": "2013-09-04",
      "rate": 1.23
    }
  ]
}

Get an exchange rate

GET  /settings/currencies/:currency_id/exchangerates/:exchange_rate_id

Get the details of an exchange rate that has been associated to the currency.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "exchange_rate": {
    "exchange_rate_id": "460000000038035",
    "currency_id": "460000000000109",
    "currency_code": "EUR",
    "effective_date": "2013-09-04",
    "rate": 1.23
  }
}

Create an exchange rate

POST  /settings/currencies/:currency_id/exchangerates

Create an exchange rate for the specified currency.

Request attributes

currency_id string ID of the currency for which exchange rate is created.
currency_code string
[100]
Standard code to identify the currency.
effective_date string
[yyyy-MM-dd]
Date which the exchange rate is applicable for the currency.
rate double Rate of exchange for the currency with respect to base currency.

Sample Request

{
      "currency_id": "460000000000389",
      "currency_code": "GBP",
      "effective_date": "2013-12-12",
      "rate": "40"
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The exchange rate has been added.",
  "exchange_rate": {
    "exchange_rate_id": "460000000038035",
    "currency_id": "460000000000109",
    "currency_code": "EUR",
    "effective_date": "2013-09-04",
    "rate": 1.23
  }
}

Upate an exchange rate

PUT  /settings/currencies/:currency_id/exchangerates/:exchange_rate_id

Update the details of exchange rate for a currency.

Request attributes

effective_date string
[yyyy-MM-dd]
Date in which the exchange rate is applicable for the currency.
rate double Rate of exchange for the currency with respect to base currency.

Sample Request

{
      "effective_date": "2013-12-12",
      "rate": "30"
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 110002,
      "message": "The exchange rate has been updated."
    }

Delete an exchange rate

DELETE  /settings/currencies/:currency_id/exchangerates/:exchange_rate_id

Delete an exchange rate for the specified currency.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Exchange rate successfully deleted"
}