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 currency specified.
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 currencies excluding 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": "982000000004012",
      "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": "982000000004006",
      "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": 1.50,
      "effective_date": "2012-03-08"
    },
    {
      "currency_id": "982000000004024",
      "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": "982000000004018",
      "currency_code": "EUR",
      "currency_name": "EUR- Euro",
      "currency_symbol": "€",
      "price_precision": 2,
      "currency_format": "1.234.567,89",
      "is_base_currency": false,
      "exchange_rate": 0.00,
      "effective_date": ""
    },
    {
      "currency_id": "982000000004009",
      "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": "982000000004003",
      "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": 5.00,
      "effective_date": "2012-03-08"
    },
    {
      "currency_id": "982000000004021",
      "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": "982000000000190",
      "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": "982000000004015",
      "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": "982000000004006",
    "currency_code": "CAD",
    "currency_name": "CAD- Canadian Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": false
  }
}

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": "CAD",
  "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": "982000000004006",
    "currency_code": "CAD",
    "currency_name": "CAD- Canadian Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": false
  }
}

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": "CAD",
  "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": "982000000004006",
    "currency_code": "CAD",
    "currency_name": "CAD- Canadian Dollar",
    "currency_symbol": "$",
    "price_precision": 2,
    "currency_format": "1,234,567.89",
    "is_base_currency": false
  }
}

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 exchange rate details if available or the previous closest match for current date
is_current_date boolean Returns exchange rate details if available for current date.
Allowed Values: `true

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "exchange_rates": [
    {
      "exchange_rate_id": "982000000030181",
      "currency_id": "982000000004006",
      "currency_code": "CAD",
      "effective_date": "2012-03-08",
      "rate": 1.50
    }
  ]
}

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": "982000000030181",
    "currency_id": "982000000004006",
    "currency_code": "CAD",
    "effective_date": "2012-03-08",
    "rate": 1.50
  }
}

Create an exchange rate

POST  /settings/currencies/:currency_id/exchangerates

Create an exchange rate for the currency specified.

Request attributes

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

{
      "effective_date": "2013-12-01",
      "rate": "23"
    }

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": "982000000030181",
    "currency_id": "982000000004006",
    "currency_code": "CAD",
    "effective_date": "2012-03-08",
    "rate": 1.50
  }
}

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 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": "2012-03-08",
  "rate": 1.50
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The exchange rate has been updated.",
  "exchange_rate": {
    "exchange_rate_id": "982000000030181",
    "currency_id": "982000000004006",
    "currency_code": "CAD",
    "effective_date": "2012-03-08",
    "rate": 1.50
  }
}

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"
}