v1

latestOpenAPI 3.0.12026-07-135618141.0 KB
Accounts

Update the display order of accounts in user

Updates the display order of accounts belonging to the user, by accepting an array of accounts in their new display order.

put/users/{id}/accounts

Path parameters

idinteger required

The unique identifier of the user.

Request body

Example request

{
  "accounts": [
    {
      "id": 42,
      "title": "Bank of Foo",
      "currency_code": "NZD",
      "type": "bank",
      "primary_transaction_account": {
        "id": 96027,
        "name": "Sample Credit",
        "number": "ASBCRD44554",
        "current_balance": 2694.39,
        "current_balance_date": "2015-07-03",
        "current_balance_in_base_currency": 4041.59,
        "current_balance_exchange_rate": 1.5,
        "safe_balance": 2694.39,
        "safe_balance_in_base_currency": 4041.59,
        "starting_balance": 3547.45,
        "starting_balance_date": "2015-03-15",
        "created_at": "2015-03-17T02:42:10Z",
        "updated_at": "2015-07-02T22:14:49Z",
        "institution": {
          "currency_code": "NZD",
          "title": "Bank of Foo",
          "updated_at": "2015-04-21T22:42:22Z",
          "created_at": "2015-04-21T22:42:22Z",
          "id": 57
        },
        "currency_code": "NZD",
        "type": "bank"
      },
      "primary_scenario": {
        "id": 42,
        "title": "Wedding",
        "interest_rate": 2.4,
        "interest_rate_repeat_id": 4,
        "type": "no-interest",
        "minimum-value": 4000,
        "maximum-value": 42,
        "starting_balance": 2450,
        "starting_balance_date": "2018-02-27",
        "closing_balance": 5431.2,
        "closing_balance_date": "2018-02-27",
        "current_balance": 5431.2,
        "current_balance_date": "2018-02-27",
        "current_balance_in_base_currency": 8146.8,
        "current_balance_exchange_rate": 1.5,
        "safe_balance": 5431.2,
        "safe_balance_in_base_currency": 8146.8,
        "created_at": "2015-04-21T22:42:22Z",
        "updated_at": "2015-04-21T22:42:22Z"
      },
      "transaction_accounts": [
        {
          "id": 96027,
          "name": "Sample Credit",
          "number": "ASBCRD44554",
          "current_balance": 2694.39,
          "current_balance_date": "2015-07-03",
          "current_balance_in_base_currency": 4041.59,
          "current_balance_exchange_rate": 1.5,
          "safe_balance": 2694.39,
          "safe_balance_in_base_currency": 4041.59,
          "starting_balance": 3547.45,
          "starting_balance_date": "2015-03-15",
          "created_at": "2015-03-17T02:42:10Z",
          "updated_at": "2015-07-02T22:14:49Z",
          "institution": {
            "currency_code": "NZD",
            "title": "Bank of Foo",
            "updated_at": "2015-04-21T22:42:22Z",
            "created_at": "2015-04-21T22:42:22Z",
            "id": 57
          },
          "currency_code": "NZD",
          "type": "bank"
        }
      ],
      "scenarios": [
        {
          "id": 42,
          "title": "Wedding",
          "interest_rate": 2.4,
          "interest_rate_repeat_id": 4,
          "type": "no-interest",
          "minimum-value": 4000,
          "maximum-value": 42,
          "starting_balance": 2450,
          "starting_balance_date": "2018-02-27",
          "closing_balance": 5431.2,
          "closing_balance_date": "2018-02-27",
          "current_balance": 5431.2,
          "current_balance_date": "2018-02-27",
          "current_balance_in_base_currency": 8146.8,
          "current_balance_exchange_rate": 1.5,
          "safe_balance": 5431.2,
          "safe_balance_in_base_currency": 8146.8,
          "created_at": "2015-04-21T22:42:22Z",
          "updated_at": "2015-04-21T22:42:22Z"
        }
      ],
      "created_at": "2018-02-27",
      "updated_at": "2018-02-27",
      "current_balance": 2694.39,
      "current_balance_date": "2018-02-27",
      "current_balance_in_base_currency": 4041.59,
      "current_balance_exchange_rate": 1.5,
      "safe_balance": 2694.39,
      "safe_balance_in_base_currency": 4041.59
    }
  ]
}

Response

Success

idinteger

The unique identifier of the account.

titlestring

The title of the account.

currency_codestring

The currency code for the account.

type'bank' | 'credits' | 'cash' | 'stocks' | 'mortgage' | 'loans' | 'vehicle' | 'property' | 'insurance' | 'other_asset' | 'other_liability'

The type of the account.

is_net_worthboolean

Whether the account is a net worth asset.

created_atstring

When the account was created.

updated_atstring

When the account was last updated.

current_balancenumber

The current balance of the account.

current_balance_datestring

The date of the current balance.

current_balance_in_base_currencynumber

The current balance of the account in the user's base currency.

current_balance_exchange_ratenumber

The exchange rate between the account's currency and the user's base currency, when different. If the currencies are the same, null is returned.

safe_balancenumber

The current safe balance, if safe balance is activated on the account. If safe balance is not activated, then null is returned.

safe_balance_in_base_currencynumber

The current safe balance in the user's base currency, if safe balance is activated on the account. If safe balance is not activated, then null is returned.

Example response

[
  {
    "id": 42,
    "title": "Bank of Foo",
    "currency_code": "NZD",
    "type": "bank",
    "primary_transaction_account": {
      "id": 96027,
      "name": "Sample Credit",
      "number": "ASBCRD44554",
      "current_balance": 2694.39,
      "current_balance_date": "2015-07-03",
      "current_balance_in_base_currency": 4041.59,
      "current_balance_exchange_rate": 1.5,
      "safe_balance": 2694.39,
      "safe_balance_in_base_currency": 4041.59,
      "starting_balance": 3547.45,
      "starting_balance_date": "2015-03-15",
      "created_at": "2015-03-17T02:42:10Z",
      "updated_at": "2015-07-02T22:14:49Z",
      "institution": {
        "currency_code": "NZD",
        "title": "Bank of Foo",
        "updated_at": "2015-04-21T22:42:22Z",
        "created_at": "2015-04-21T22:42:22Z",
        "id": 57
      },
      "currency_code": "NZD",
      "type": "bank"
    },
    "primary_scenario": {
      "id": 42,
      "title": "Wedding",
      "interest_rate": 2.4,
      "interest_rate_repeat_id": 4,
      "type": "no-interest",
      "minimum-value": 4000,
      "maximum-value": 42,
      "starting_balance": 2450,
      "starting_balance_date": "2018-02-27",
      "closing_balance": 5431.2,
      "closing_balance_date": "2018-02-27",
      "current_balance": 5431.2,
      "current_balance_date": "2018-02-27",
      "current_balance_in_base_currency": 8146.8,
      "current_balance_exchange_rate": 1.5,
      "safe_balance": 5431.2,
      "safe_balance_in_base_currency": 8146.8,
      "created_at": "2015-04-21T22:42:22Z",
      "updated_at": "2015-04-21T22:42:22Z"
    },
    "transaction_accounts": [
      {
        "id": 96027,
        "name": "Sample Credit",
        "number": "ASBCRD44554",
        "current_balance": 2694.39,
        "current_balance_date": "2015-07-03",
        "current_balance_in_base_currency": 4041.59,
        "current_balance_exchange_rate": 1.5,
        "safe_balance": 2694.39,
        "safe_balance_in_base_currency": 4041.59,
        "starting_balance": 3547.45,
        "starting_balance_date": "2015-03-15",
        "created_at": "2015-03-17T02:42:10Z",
        "updated_at": "2015-07-02T22:14:49Z",
        "institution": {
          "currency_code": "NZD",
          "title": "Bank of Foo",
          "updated_at": "2015-04-21T22:42:22Z",
          "created_at": "2015-04-21T22:42:22Z",
          "id": 57
        },
        "currency_code": "NZD",
        "type": "bank"
      }
    ],
    "scenarios": [
      {
        "id": 42,
        "title": "Wedding",
        "interest_rate": 2.4,
        "interest_rate_repeat_id": 4,
        "type": "no-interest",
        "minimum-value": 4000,
        "maximum-value": 42,
        "starting_balance": 2450,
        "starting_balance_date": "2018-02-27",
        "closing_balance": 5431.2,
        "closing_balance_date": "2018-02-27",
        "current_balance": 5431.2,
        "current_balance_date": "2018-02-27",
        "current_balance_in_base_currency": 8146.8,
        "current_balance_exchange_rate": 1.5,
        "safe_balance": 5431.2,
        "safe_balance_in_base_currency": 8146.8,
        "created_at": "2015-04-21T22:42:22Z",
        "updated_at": "2015-04-21T22:42:22Z"
      }
    ],
    "created_at": "2018-02-27",
    "updated_at": "2018-02-27",
    "current_balance": 2694.39,
    "current_balance_date": "2018-02-27",
    "current_balance_in_base_currency": 4041.59,
    "current_balance_exchange_rate": 1.5,
    "safe_balance": 2694.39,
    "safe_balance_in_base_currency": 4041.59
  }
]