For the complete documentation index, see llms.txt. This page is also available as Markdown.

Opening Balances

Read, set, and delete the opening balances and bookkeeping start adjustments of the accounts in an entity's chart of accounts.

Opening balances belong to the accounts of one entity's chart of accounts, so every endpoint is nested under the entity uuid and addresses an account by its uuid. There is no separate opening balance id: an account has at most one opening balance state, and you read and write it through the account.

Listing returns only the accounts that have a main opening balance, an adjustment, or both, ordered by account code. Retrieving an account that has neither returns 404, the same as an account outside the entity.

The two parts of an opening balance

Each account's state has two independent parts. Either can exist without the other, and writing one never changes the other.

  • openingBalance. The main opening balance: one or more nonzero lines dated before the bookkeeping start date. balance is the sum of the lines.

  • adjustment. A single nonzero amount dated on the bookkeeping start date, for correcting the starting balance without rewriting the main one.

The bookkeeping start date is the linked financial account's bookkeepingStartDate when the account is tied to one, otherwise the entity's. A part that doesn't exist comes back as null.

Amounts use the account's natural sign: a positive amount increases the account, which is a debit for assets and expenses and a credit for liabilities, equity, and income. The offsetting side of each part is booked to its clearingAccountId, which must belong to the same entity and can't be the account itself.

Defaults

Every field except the amounts can be left out of a write.

Field
Main opening balance
Adjustment

date

The day before the bookkeeping start date. Any date you send must be before it.

The bookkeeping start date. Any date you send must equal it.

clearingAccountId

The entity's retained earnings (or owner's capital) account.

The account's current adjustment clearing account, then its main opening balance clearing account, then retained earnings (or owner's capital).

description

null

null

An entity with no retained earnings account and no clearingAccountId in the request returns 400.

What a write books

Kick books every write to the entity's cash ledger, and to its accrual ledger too when the entity has opened one through Ledgers. The resulting postings appear in the general ledger report, not on Journal Entries, which covers manual entries only.

The set routes create the part or replace it whole, so send every line of a main opening balance each time. They return the account's full state after the write. Entities Kick doesn't keep books for return 400.

The bulk route sets up to 100 accounts in one atomic transaction. Each item carries openingBalance, adjustment, or both, under the same rules as the single-account routes, and each account can appear once. If any item fails, nothing is saved. An unknown accountId in the body returns 400 rather than 404, because the account isn't part of the path.

Two requests writing the same account at the same time return 409 for the one that loses. Retry it.

Deleting

Deleting the adjustment removes it and its journal entries and keeps the main opening balance. Deleting the opening balance removes both parts and all their journal entries. There is no route that deletes only the main opening balance while keeping the adjustment.

Both deletes return 404 when there is nothing to delete, and 409 when the account is linked to a financial account that has been reconciled. Undo the reconciliation in Kick first.

  • An entity that has opening balances can't start an accounting migration.

  • Two accounts that both have opening balances can't be merged.

List opening balances

get

Returns the opening balance state of every account of the entity that has a main opening balance, an adjustment, or both. Results are ordered by account code and paged with limit/offset.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
Query parameters
limitinteger · min: 1 · max: 100OptionalDefault: 100
offsetinteger · nullableOptionalDefault: 0
Responses
200

200

application/json
get/platform/v1/entities/{entityId}/opening-balances
GET /api/platform/v1/entities/{entityId}/opening-balances HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "accountId": "123e4567-e89b-12d3-a456-426614174000",
      "adjustment": {
        "balance": 1,
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text"
      },
      "openingBalance": {
        "balance": 1,
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text",
        "lines": [
          {
            "balance": 1,
            "description": "text"
          }
        ]
      }
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total": 1
  }
}

Set opening balances in bulk

post

Creates or replaces the opening balances of up to 100 accounts in a single transaction. Each item carries a main opening balance, an adjustment, or both, with the same rules as the single-account routes; a part left out is untouched. The operation is atomic: if any item fails validation, nothing is saved. Returns 409 when another request writes one of the accounts at the same time.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 255Optional

A unique key that makes the request idempotent. Retrying with the same key within 24 hours replays the original response (marked with Idempotent-Replayed: true) instead of executing again.

Body
Responses
200

200

application/json
post/platform/v1/entities/{entityId}/opening-balances/bulk
POST /api/platform/v1/entities/{entityId}/opening-balances/bulk HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 365

{
  "openingBalances": [
    {
      "accountId": "123e4567-e89b-12d3-a456-426614174000",
      "adjustment": {
        "balance": 1,
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text"
      },
      "openingBalance": {
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text",
        "lines": [
          {
            "balance": 1,
            "description": "text"
          }
        ]
      }
    }
  ]
}
{
  "data": [
    {
      "accountId": "123e4567-e89b-12d3-a456-426614174000",
      "adjustment": {
        "balance": 1,
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text"
      },
      "openingBalance": {
        "balance": 1,
        "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "date": "YYYY-MM-DD",
        "description": "text",
        "lines": [
          {
            "balance": 1,
            "description": "text"
          }
        ]
      }
    }
  ]
}

Retrieve an account's opening balance

get

Returns the main opening balance and the adjustment of one account. Returns 404 when the account has neither.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
accountIdstring · uuidRequired
Responses
200

200

application/json
get/platform/v1/entities/{entityId}/opening-balances/{accountId}
GET /api/platform/v1/entities/{entityId}/opening-balances/{accountId} HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "accountOpeningBalance": {
    "accountId": "123e4567-e89b-12d3-a456-426614174000",
    "adjustment": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text"
    },
    "openingBalance": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text",
      "lines": [
        {
          "balance": 1,
          "description": "text"
        }
      ]
    }
  }
}

Set an account's opening balance

put

Creates or replaces the main opening balance of an account. Its date must be before the bookkeeping start date (the linked bank account's when there is one, otherwise the entity's) and every line must be nonzero. Kick books it to the cash ledger, and to the accrual ledger when the entity has one. The adjustment is left untouched. Returns 409 when another request writes the same account at the same time.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
accountIdstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 255Optional

A unique key that makes the request idempotent. Retrying with the same key within 24 hours replays the original response (marked with Idempotent-Replayed: true) instead of executing again.

Body
clearingAccountIdstring · uuidOptional

Account the offsetting side is booked to. Must belong to the entity and differ from the account itself. Defaults to the retained earnings (or owner's capital) account.

datestring · dateOptional

Calendar day the opening balance is booked on, as YYYY-MM-DD. Must be before the bookkeeping start date; defaults to the day before it.

Example: YYYY-MM-DD
descriptionstring · max: 500 · nullableOptional

Description of the clearing side of the balance.

Responses
200

200

application/json
put/platform/v1/entities/{entityId}/opening-balances/{accountId}
PUT /api/platform/v1/entities/{entityId}/opening-balances/{accountId} HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
  "date": "YYYY-MM-DD",
  "description": "text",
  "lines": [
    {
      "balance": 1,
      "description": "text"
    }
  ]
}
{
  "accountOpeningBalance": {
    "accountId": "123e4567-e89b-12d3-a456-426614174000",
    "adjustment": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text"
    },
    "openingBalance": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text",
      "lines": [
        {
          "balance": 1,
          "description": "text"
        }
      ]
    }
  }
}

Delete an account's opening balance

delete

Deletes the main opening balance and the adjustment of an account, along with their journal entries. Returns 404 when the account has neither and 409 when the linked bank account is reconciled.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
accountIdstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 255Optional

A unique key that makes the request idempotent. Retrying with the same key within 24 hours replays the original response (marked with Idempotent-Replayed: true) instead of executing again.

Responses
200

200

No content

delete/platform/v1/entities/{entityId}/opening-balances/{accountId}
DELETE /api/platform/v1/entities/{entityId}/opening-balances/{accountId} HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Set an account's opening balance adjustment

put

Creates or replaces the adjustment of an account: a single nonzero amount booked on the bookkeeping start date (the linked bank account's when there is one, otherwise the entity's). An account can have an adjustment without a main opening balance. Kick books it to the cash ledger, and to the accrual ledger when the entity has one. The main opening balance is left untouched. Returns 409 when another request writes the same account at the same time.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
accountIdstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 255Optional

A unique key that makes the request idempotent. Retrying with the same key within 24 hours replays the original response (marked with Idempotent-Replayed: true) instead of executing again.

Body
balancenumber · min: -999999999999 · max: 999999999999Required

Nonzero adjustment amount in the account's natural sign: positive increases the account.

clearingAccountIdstring · uuidOptional

Account the offsetting side is booked to. Must belong to the entity and differ from the account itself. Defaults to the current adjustment's clearing account, then the main opening balance's, then the retained earnings (or owner's capital) account.

datestring · dateOptional

Calendar day the adjustment is booked on, as YYYY-MM-DD. Must equal the bookkeeping start date, which is also the default.

Example: YYYY-MM-DD
descriptionstring · max: 500 · nullableOptional

Description of the adjustment.

Responses
200

200

application/json
put/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment
PUT /api/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "balance": 1,
  "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
  "date": "YYYY-MM-DD",
  "description": "text"
}
{
  "accountOpeningBalance": {
    "accountId": "123e4567-e89b-12d3-a456-426614174000",
    "adjustment": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text"
    },
    "openingBalance": {
      "balance": 1,
      "clearingAccountId": "123e4567-e89b-12d3-a456-426614174000",
      "date": "YYYY-MM-DD",
      "description": "text",
      "lines": [
        {
          "balance": 1,
          "description": "text"
        }
      ]
    }
  }
}

Delete an account's opening balance adjustment

delete

Deletes the adjustment of an account and its journal entries, keeping the main opening balance. Returns 404 when the account has no adjustment and 409 when the linked bank account is reconciled.

Authorizations
AuthorizationstringRequired

Organization access token issued by Kick, sent as Authorization: Bearer kick_org_....

Path parameters
entityIdstring · uuidRequired
accountIdstring · uuidRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 255Optional

A unique key that makes the request idempotent. Retrying with the same key within 24 hours replays the original response (marked with Idempotent-Replayed: true) instead of executing again.

Responses
200

200

No content

delete/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment
DELETE /api/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment HTTP/1.1
Host: use.kick.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?