> For the complete documentation index, see [llms.txt](https://docs.kick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kick.co/api/api-reference/opening-balances.md).

# 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](https://docs.kick.co/api/api-reference/chart-of-accounts.md), 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](https://docs.kick.co/api/api-reference/ledgers.md). The resulting postings appear in the [general ledger report](https://docs.kick.co/api/api-reference/reports.md), not on [Journal Entries](https://docs.kick.co/api/api-reference/journal-entries.md), 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.

### Related limits

* An entity that has opening balances can't start an [accounting migration](https://docs.kick.co/api/api-reference/accounting-migration.md).
* Two accounts that both have opening balances can't be [merged](https://docs.kick.co/api/api-reference/chart-of-accounts.md).

## List opening balances

> 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\`.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances":{"get":{"description":"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`.","operationId":"openingBalances.list","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"offset","schema":{"default":0,"minimum":0,"nullable":true,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"accountId":{"format":"uuid","type":"string"},"adjustment":{"description":"Bookkeeping start adjustment, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Adjustment amount, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the adjustment is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on: the bookkeeping start date.","format":"date","type":"string"},"description":{"nullable":true,"type":"string"}},"required":["date","balance","clearingAccountId","description"],"type":"object"},"openingBalance":{"description":"Main opening balance, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Sum of the lines, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the balance is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the opening balance is booked on, as YYYY-MM-DD.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","nullable":true,"type":"string"},"lines":{"items":{"properties":{"balance":{"type":"number"},"description":{"nullable":true,"type":"string"}},"required":["balance","description"],"type":"object"},"type":"array"}},"required":["date","balance","lines","clearingAccountId","description"],"type":"object"}},"required":["accountId","openingBalance","adjustment"],"type":"object"},"type":"array"},"pagination":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}},"required":["limit","offset","total"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"List opening balances","tags":["openingBalances"]}}}}
```

## Set opening balances in bulk

> 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.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/bulk":{"post":{"description":"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.","operationId":"openingBalances.bulkSet","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"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.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"openingBalances":{"items":{"additionalProperties":false,"properties":{"accountId":{"description":"Chart of accounts account the balance belongs to.","format":"uuid","type":"string"},"adjustment":{"additionalProperties":false,"description":"Adjustment to create or replace.","properties":{"balance":{"description":"Nonzero adjustment amount in the account's natural sign: positive increases the account.","maximum":999999999999,"minimum":-999999999999,"type":"number"},"clearingAccountId":{"description":"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.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on, as YYYY-MM-DD. Must equal the bookkeeping start date, which is also the default.","format":"date","type":"string"},"description":{"description":"Description of the adjustment.","maxLength":500,"nullable":true,"type":"string"}},"required":["balance"],"type":"object"},"openingBalance":{"additionalProperties":false,"description":"Main opening balance to create or replace.","properties":{"clearingAccountId":{"description":"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.","format":"uuid","type":"string"},"date":{"description":"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.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","maxLength":500,"nullable":true,"type":"string"},"lines":{"description":"Lines that make up the opening balance.","items":{"additionalProperties":false,"properties":{"balance":{"description":"Nonzero amount in the account's natural sign: positive increases the account.","maximum":999999999999,"minimum":-999999999999,"type":"number"},"description":{"description":"Description of the line.","maxLength":500,"nullable":true,"type":"string"}},"required":["balance"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["lines"],"type":"object"}},"required":["accountId"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["openingBalances"],"type":"object"}}},"description":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"accountId":{"format":"uuid","type":"string"},"adjustment":{"description":"Bookkeeping start adjustment, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Adjustment amount, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the adjustment is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on: the bookkeeping start date.","format":"date","type":"string"},"description":{"nullable":true,"type":"string"}},"required":["date","balance","clearingAccountId","description"],"type":"object"},"openingBalance":{"description":"Main opening balance, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Sum of the lines, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the balance is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the opening balance is booked on, as YYYY-MM-DD.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","nullable":true,"type":"string"},"lines":{"items":{"properties":{"balance":{"type":"number"},"description":{"nullable":true,"type":"string"}},"required":["balance","description"],"type":"object"},"type":"array"}},"required":["date","balance","lines","clearingAccountId","description"],"type":"object"}},"required":["accountId","openingBalance","adjustment"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"409":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"409"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Set opening balances in bulk","tags":["openingBalances"]}}}}
```

## Retrieve an account's opening balance

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

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/{accountId}":{"get":{"description":"Returns the main opening balance and the adjustment of one account. Returns 404 when the account has neither.","operationId":"openingBalances.get","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accountOpeningBalance":{"properties":{"accountId":{"format":"uuid","type":"string"},"adjustment":{"description":"Bookkeeping start adjustment, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Adjustment amount, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the adjustment is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on: the bookkeeping start date.","format":"date","type":"string"},"description":{"nullable":true,"type":"string"}},"required":["date","balance","clearingAccountId","description"],"type":"object"},"openingBalance":{"description":"Main opening balance, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Sum of the lines, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the balance is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the opening balance is booked on, as YYYY-MM-DD.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","nullable":true,"type":"string"},"lines":{"items":{"properties":{"balance":{"type":"number"},"description":{"nullable":true,"type":"string"}},"required":["balance","description"],"type":"object"},"type":"array"}},"required":["date","balance","lines","clearingAccountId","description"],"type":"object"}},"required":["accountId","openingBalance","adjustment"],"type":"object"}},"required":["accountOpeningBalance"],"type":"object"}}},"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Retrieve an account's opening balance","tags":["openingBalances"]}}}}
```

## Set an account's opening balance

> 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.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/{accountId}":{"put":{"description":"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.","operationId":"openingBalances.set","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"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.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"clearingAccountId":{"description":"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.","format":"uuid","type":"string"},"date":{"description":"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.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","maxLength":500,"nullable":true,"type":"string"},"lines":{"description":"Lines that make up the opening balance.","items":{"additionalProperties":false,"properties":{"balance":{"description":"Nonzero amount in the account's natural sign: positive increases the account.","maximum":999999999999,"minimum":-999999999999,"type":"number"},"description":{"description":"Description of the line.","maxLength":500,"nullable":true,"type":"string"}},"required":["balance"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["lines"],"type":"object"}}},"description":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accountOpeningBalance":{"properties":{"accountId":{"format":"uuid","type":"string"},"adjustment":{"description":"Bookkeeping start adjustment, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Adjustment amount, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the adjustment is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on: the bookkeeping start date.","format":"date","type":"string"},"description":{"nullable":true,"type":"string"}},"required":["date","balance","clearingAccountId","description"],"type":"object"},"openingBalance":{"description":"Main opening balance, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Sum of the lines, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the balance is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the opening balance is booked on, as YYYY-MM-DD.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","nullable":true,"type":"string"},"lines":{"items":{"properties":{"balance":{"type":"number"},"description":{"nullable":true,"type":"string"}},"required":["balance","description"],"type":"object"},"type":"array"}},"required":["date","balance","lines","clearingAccountId","description"],"type":"object"}},"required":["accountId","openingBalance","adjustment"],"type":"object"}},"required":["accountOpeningBalance"],"type":"object"}}},"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"409":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"409"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Set an account's opening balance","tags":["openingBalances"]}}}}
```

## Delete an account's opening balance

> 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.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/{accountId}":{"delete":{"description":"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.","operationId":"openingBalances.delete","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"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.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"200":{"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"409":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"409"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Delete an account's opening balance","tags":["openingBalances"]}}}}
```

## Set an account's opening balance adjustment

> 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.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment":{"put":{"description":"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.","operationId":"openingBalances.setAdjustment","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"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.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"balance":{"description":"Nonzero adjustment amount in the account's natural sign: positive increases the account.","maximum":999999999999,"minimum":-999999999999,"type":"number"},"clearingAccountId":{"description":"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.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on, as YYYY-MM-DD. Must equal the bookkeeping start date, which is also the default.","format":"date","type":"string"},"description":{"description":"Description of the adjustment.","maxLength":500,"nullable":true,"type":"string"}},"required":["balance"],"type":"object"}}},"description":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accountOpeningBalance":{"properties":{"accountId":{"format":"uuid","type":"string"},"adjustment":{"description":"Bookkeeping start adjustment, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Adjustment amount, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the adjustment is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the adjustment is booked on: the bookkeeping start date.","format":"date","type":"string"},"description":{"nullable":true,"type":"string"}},"required":["date","balance","clearingAccountId","description"],"type":"object"},"openingBalance":{"description":"Main opening balance, null when the account has none.","nullable":true,"properties":{"balance":{"description":"Sum of the lines, in the account's natural sign.","type":"number"},"clearingAccountId":{"description":"Account the offsetting side of the balance is booked to.","format":"uuid","type":"string"},"date":{"description":"Calendar day the opening balance is booked on, as YYYY-MM-DD.","format":"date","type":"string"},"description":{"description":"Description of the clearing side of the balance.","nullable":true,"type":"string"},"lines":{"items":{"properties":{"balance":{"type":"number"},"description":{"nullable":true,"type":"string"}},"required":["balance","description"],"type":"object"},"type":"array"}},"required":["date","balance","lines","clearingAccountId","description"],"type":"object"}},"required":["accountId","openingBalance","adjustment"],"type":"object"}},"required":["accountOpeningBalance"],"type":"object"}}},"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"409":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"409"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Set an account's opening balance adjustment","tags":["openingBalances"]}}}}
```

## Delete an account's opening balance adjustment

> 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.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/opening-balances/{accountId}/adjustment":{"delete":{"description":"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.","operationId":"openingBalances.deleteAdjustment","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"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.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"200":{"description":"200"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"409":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"409"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Delete an account's opening balance adjustment","tags":["openingBalances"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kick.co/api/api-reference/opening-balances.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
