Create a new bank account balance

POST /bankaccounts/{id}/balances

Add a new balance entry for a specific bank account identified by its unique identifier. The balance entry includes the amount, timestamp, and currency code. The endpoint facilitates accurate tracking of the bank account's financial status over time.

Headers

Path parameters

  • id string Required
application/json

Body Required

Request model for creating a new bank account balance

  • amount number Required

    The amount of the balance.

  • timestamp string(date-time) Required

    The timestamp of the balance.

  • currency object Required

    The currency of the balance.

    It is recommended to avoid sending in the currency rate and rely on the automatic default exchange rate calculated by 24SevenOffice.

    Hide currency attributes Show currency attributes object
    • code string Required

      The currency code of the balance.

    • rate number

      The exchange rate of the currency. This rate is used when converting the balance to the currency used in 24SevenOffice.

      The automatic default exchange rate works like the following:

      • If the bank account balance currency is different from the currency stored in 24SevenOffice, the exchange rate is automatically looked up using the timestamp of the balance.
      • If the bank account balance currency is the same as the currency stored in 24SevenOffice, the exchange rate defaults to 1.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object

    Response model for a bank account balance

    • amount number

      The amount of the balance.

    • timestamp string(date-time)

      The timestamp of the balance.

    • currency object

      The currency of the balance.

      It is recommended to avoid sending in the currency rate and rely on the automatic default exchange rate calculated by 24SevenOffice.

      Hide currency attributes Show currency attributes object
      • code string Required

        The currency code of the balance.

      • rate number

        The exchange rate of the currency. This rate is used when converting the balance to the currency used in 24SevenOffice.

        The automatic default exchange rate works like the following:

        • If the bank account balance currency is different from the currency stored in 24SevenOffice, the exchange rate is automatically looked up using the timestamp of the balance.
        • If the bank account balance currency is the same as the currency stored in 24SevenOffice, the exchange rate defaults to 1.
POST /bankaccounts/{id}/balances
curl \
 -X POST https://rest.api.24sevenoffice.com/v1/bankaccounts/{id}/balances \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"amount":1100,"timestamp":"2024-06-01T12:00:00.000Z","currency":{"code":"NOK","rate":1}}'
Request examples
# Headers
Authorization: string

# Payload
{
  "amount": 1100,
  "timestamp": "2024-06-01T12:00:00.000Z",
  "currency": {
    "code": "NOK",
    "rate": 1
  }
}
Response examples (201)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string

# Payload
{
  "amount": 1100,
  "timestamp": "2024-06-01T12:00:00.000Z",
  "currency": {
    "code": "NOK",
    "rate": 1
  }
}