Top

Opening balance

Get opening balance
GET /settings/openingbalances
Get opening balance.
Create opening balance
POST /settings/openingbalances
Creates opening balance with the given information.
Update opening balance
PUT /settings/openingbalances
Updates the existing opening balance information
Delete opening balance
DELETE /settings/openingbalances
Delete the entered opening balance

Get opening balance

GET  /settings/openingbalances

Get opening balance.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "opening_balance": {
    "opening_balance_id": "460000000050041",
    "date": "2013-10-01",
    "accounts": [
      {
        "account_split_id": "460000000050045",
        "account_id": "460000000000358",
        "account_name": "Undeposited Funds",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 2000.00,
        "amount": 2000.00
      },
      {
        "account_split_id": "460000000050047",
        "account_id": "460000000000361",
        "account_name": "Petty Cash",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 354565.00,
        "amount": 354565.00
      },
      {
        "account_split_id": "460000000050049",
        "account_id": "460000000000364",
        "account_name": "Accounts Receivable",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 200.00,
        "amount": 200.00
      },
      {
        "account_split_id": "460000000050053",
        "account_id": "460000000000373",
        "account_name": "Accounts Payable",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 23.00,
        "amount": 23.00
      },
      {
        "account_split_id": "460000000050055",
        "account_id": "460000000000403",
        "account_name": "Advertising And Marketing",
        "debit_or_credit": "credit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 5645.00,
        "amount": 5645.00
      },
      {
        "account_split_id": "460000000050057",
        "account_id": "460000000000418",
        "account_name": "Travel Expense",
        "debit_or_credit": "credit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 3232.00,
        "amount": 3232.00
      },
      {
        "account_split_id": "460000000050059",
        "account_id": "460000000000445",
        "account_name": "Salaries and Employee Wages",
        "debit_or_credit": "credit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 456456.00,
        "amount": 456456.00
      },
      {
        "account_split_id": "460000000050061",
        "account_id": "460000000000448",
        "account_name": "Meals and Entertainment",
        "debit_or_credit": "credit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 35464.00,
        "amount": 35464.00
      },
      {
        "account_split_id": "460000000050063",
        "account_id": "460000000003001",
        "account_name": "Opening Balance Adjustments",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 60.00,
        "amount": 60.00
      },
      {
        "account_split_id": "460000000050051",
        "account_id": "460000000048001",
        "account_name": "Personal Account",
        "debit_or_credit": "debit",
        "exchange_rate": 1.00,
        "currency_id": "460000000000097",
        "currency_code": "USD",
        "bcy_amount": 142605.00,
        "amount": 142605.00
      },
      {
        "account_split_id": "460000000050065",
        "account_id": "460000000000364",
        "account_name": "Accounts Receivable",
        "debit_or_credit": "debit",
        "exchange_rate": 12.00,
        "currency_id": "460000000000109",
        "currency_code": "EUR",
        "bcy_amount": 1344.00,
        "amount": 112.00
      }
    ]
  }
}

Create opening balance

POST  /settings/openingbalances

Creates opening balance with the given information.

Request attributes

date* string
[yyyy-MM-dd]
Date on which the opening balance needs to be recorded.
account_split_id string ID of split account that you want to update.
account_id string ID of account for which you need to record opening balance.
debit_or_credit* string
[100]
Debit or Credit for which the amount needs to be recorded.
Allowed Values: debit and credit
exchange_rate double Exchange rate for the foreign currencies if involved.
currency_id string ID of account currency.
amount double Amount entered for a account.

Sample Request

{
      "date": "2013-10-01",
      "accounts": [
        {
          "account_id": 460000000000358,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 2000.0
        },
        {
          "account_id": 460000000000361,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 354565.0
        },
        {
          "account_id": 460000000000364,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 200.0
        },
        {
          "account_id": 460000000000373,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 23.0
        },
        {
          "account_id": 460000000000403,
          "debit_or_credit": "credit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 5645.0
        },
        {
          "account_id": 460000000000418,
          "debit_or_credit": "credit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 3232.0
        },
        {
          "account_id": 460000000000445,
          "debit_or_credit": "credit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 456456.0
        },
        {
          "account_id": 460000000000448,
          "debit_or_credit": "credit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 35464.0
        },
        {
          "account_id": 460000000003001,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 60.0
        },
        {
          "account_id": 460000000048001,
          "debit_or_credit": "debit",
          "exchange_rate": 1.0,
          "currency_id": 460000000000097,
          "amount": 142605.0
        },
        {
          "account_id": 460000000000364,
          "debit_or_credit": "debit",
          "exchange_rate": 12.0,
          "currency_id": 460000000000109,
          "amount": 112.0
        }
      ]
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The opening balances are saved!",
      "opening_balance": {
        "opening_balance_id": "460000000050041",
        "date": "2013-10-01",
        "accounts": [
          {
            "account_split_id": "460000000050045",
            "account_id": "460000000000358",
            "account_name": "Undeposited Funds",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 2000.0,
            "amount": 2000.0
          },
          {
            "account_split_id": "460000000050047",
            "account_id": "460000000000361",
            "account_name": "Petty Cash",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 354565.0,
            "amount": 354565.0
          },
          {
            "account_split_id": "460000000050049",
            "account_id": "460000000000364",
            "account_name": "Accounts Receivable",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 200.0,
            "amount": 200.0
          },
          {
            "account_split_id": "460000000050053",
            "account_id": "460000000000373",
            "account_name": "Accounts Payable",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 23.0,
            "amount": 23.0
          },
          {
            "account_split_id": "460000000050055",
            "account_id": "460000000000403",
            "account_name": "Advertising And Marketing",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 5645.0,
            "amount": 5645.0
          },
          {
            "account_split_id": "460000000050057",
            "account_id": "460000000000418",
            "account_name": "Travel Expense",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 3232.0,
            "amount": 3232.0
          },
          {
            "account_split_id": "460000000050059",
            "account_id": "460000000000445",
            "account_name": "Salaries and Employee Wages",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 456456.0,
            "amount": 456456.0
          },
          {
            "account_split_id": "460000000050061",
            "account_id": "460000000000448",
            "account_name": "Meals and Entertainment",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 35464.0,
            "amount": 35464.0
          },
          {
            "account_split_id": "460000000050063",
            "account_id": "460000000003001",
            "account_name": "Opening Balance Adjustments",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 60.0,
            "amount": 60.0
          },
          {
            "account_split_id": "460000000050051",
            "account_id": "460000000048001",
            "account_name": "Personal Account",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 142605.0,
            "amount": 142605.0
          },
          {
            "account_split_id": "460000000050065",
            "account_id": "460000000000364",
            "account_name": "Accounts Receivable",
            "debit_or_credit": "debit",
            "exchange_rate": 12.0,
            "currency_id": "460000000000109",
            "currency_code": "EUR",
            "bcy_amount": 1344.0,
            "amount": 112.0
          }
        ]
      }
    }

Update opening balance

PUT  /settings/openingbalances

Updates the existing opening balance information

Request attributes

opening_balance_id* string ID of opening balance.
date string
[yyyy-MM-dd]
Date on which the opening balance needs to be recorded.
account_split_id string ID of split account that you want to update.
account_id string ID of account for which you need to record opening balance.
debit_or_credit* string
[100]
Debit or Credit for which the amount needs to be recorded.
Allowed Values: debit and credit
exchange_rate double Exchange rate for the foreign currencies if involved.
currency_id string ID of account currency.
amount double Amount entered for a account.

Sample Request

{
  "opening_balance_id": "460000000050041",
  "date": "2013-10-01",
  "accounts": [
    {
      "account_split_id": "460000000050045",
      "account_id": "460000000000358",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 2000.00
    },
    {
      "account_split_id": "460000000050047",
      "account_id": "460000000000361",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 354565.00
    },
    {
      "account_split_id": "460000000050049",
      "account_id": "460000000000364",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 200.00
    },
    {
      "account_split_id": "460000000050053",
      "account_id": "460000000000373",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 23.00
    },
    {
      "account_split_id": "460000000050055",
      "account_id": "460000000000403",
      "debit_or_credit": "credit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 5645.00
    },
    {
      "account_split_id": "460000000050057",
      "account_id": "460000000000418",
      "debit_or_credit": "credit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 3232.00
    },
    {
      "account_split_id": "460000000050059",
      "account_id": "460000000000445",
      "debit_or_credit": "credit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 456456.00
    },
    {
      "account_split_id": "460000000050061",
      "account_id": "460000000000448",
      "debit_or_credit": "credit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 35464.00
    },
    {
      "account_split_id": "460000000050063",
      "account_id": "460000000003001",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 60.00
    },
    {
      "account_split_id": "460000000050051",
      "account_id": "460000000048001",
      "debit_or_credit": "debit",
      "exchange_rate": 1.00,
      "currency_id": "460000000000097",
      "amount": 142605.00
    },
    {
      "account_split_id": "460000000050065",
      "account_id": "460000000000364",
      "debit_or_credit": "debit",
      "exchange_rate": 12.00,
      "currency_id": "460000000000109",
      "amount": 112.00
    }
  ]
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The opening balances are saved!",
      "opening_balance": {
        "opening_balance_id": "460000000050041",
        "date": "2013-10-01",
        "accounts": [
          {
            "account_split_id": "460000000050045",
            "account_id": "460000000000358",
            "account_name": "Undeposited Funds",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 2000.0,
            "amount": 2000.0
          },
          {
            "account_split_id": "460000000050047",
            "account_id": "460000000000361",
            "account_name": "Petty Cash",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 354565.0,
            "amount": 354565.0
          },
          {
            "account_split_id": "460000000050049",
            "account_id": "460000000000364",
            "account_name": "Accounts Receivable",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 200.0,
            "amount": 200.0
          },
          {
            "account_split_id": "460000000050053",
            "account_id": "460000000000373",
            "account_name": "Accounts Payable",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 23.0,
            "amount": 23.0
          },
          {
            "account_split_id": "460000000050055",
            "account_id": "460000000000403",
            "account_name": "Advertising And Marketing",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 5645.0,
            "amount": 5645.0
          },
          {
            "account_split_id": "460000000050057",
            "account_id": "460000000000418",
            "account_name": "Travel Expense",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 3232.0,
            "amount": 3232.0
          },
          {
            "account_split_id": "460000000050059",
            "account_id": "460000000000445",
            "account_name": "Salaries and Employee Wages",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 456456.0,
            "amount": 456456.0
          },
          {
            "account_split_id": "460000000050061",
            "account_id": "460000000000448",
            "account_name": "Meals and Entertainment",
            "debit_or_credit": "credit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 35464.0,
            "amount": 35464.0
          },
          {
            "account_split_id": "460000000050063",
            "account_id": "460000000003001",
            "account_name": "Opening Balance Adjustments",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 60.0,
            "amount": 60.0
          },
          {
            "account_split_id": "460000000050051",
            "account_id": "460000000048001",
            "account_name": "Personal Account",
            "debit_or_credit": "debit",
            "exchange_rate": 1.0,
            "currency_id": "460000000000097",
            "currency_code": "USD",
            "bcy_amount": 142605.0,
            "amount": 142605.0
          },
          {
            "account_split_id": "460000000050065",
            "account_id": "460000000000364",
            "account_name": "Accounts Receivable",
            "debit_or_credit": "debit",
            "exchange_rate": 12.0,
            "currency_id": "460000000000109",
            "currency_code": "EUR",
            "bcy_amount": 1344.0,
            "amount": 112.0
          }
        ]
      }
    }

Delete opening balance

DELETE  /settings/openingbalances

Delete the entered opening balance

Sample Response

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