---
title: "Update accounting entries in bulk"
method: PATCH
path: "/accountingentries/{companyId}"
tags: ["AccountingEntries"]
---

# Update accounting entries in bulk

`PATCH /accountingentries/{companyId}`

Updates one or more fields of several accounting entries, identified by `customId`, following the same rules as the single-entry update endpoint — including the `description` reset-when-omitted behavior. Entries whose `customId` does not match any existing entry are silently skipped; the call still returns `200` for the whole batch.

## Path parameters

- `companyId` string, required

## Request body

- BulkPatchAccountingEntriesRequestSchema
  - `data` AuxBulkPatchAccountingEntriesRequestSchema[], required — Accounting entries to update, identified by `customId`.
    - `accountingCode` string, nullable — Ledger account code the entry is posted to.
    - `counterpartAccountingCode` string, nullable — Ledger account code of the counterpart side of the entry, when applicable.
    - `accountingName` string, nullable — Display name of the ledger account (`accountingCode`).
    - `assetAmount` number, nullable — Outflow side of the entry, in `currency` (money leaving the account, e.g. a supplier payment). An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0. The sign is inverted on storage (0 always stays 0): a positive value you send is stored and returned as negative, following the convention that negative amounts are outflows.
    - `accountingAssetAmount` number, nullable — Outflow side expressed in the company accounting currency (`accountingCurrency`). Subject to the same sign convention as `assetAmount`.
    - `balance` number, nullable — Running balance of the ledger account (`accountingCode`) after this entry, typically calculated by Embat rather than provided by you.
    - `liabilityAmount` number, nullable — Inflow side of the entry, in `currency` (money entering the account, e.g. a customer collection), stored with the sign you send. An entry always has both sides: if you set only `assetAmount` or only `liabilityAmount`, the other one defaults to 0.
    - `accountingLiabilityAmount` number, nullable — Inflow side expressed in the company accounting currency (`accountingCurrency`).
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTC' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'ETH' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTC' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWG' | 'ZWL'
    - `accountingCurrency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTC' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'ETH' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTC' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWG' | 'ZWL'
    - `contactCustomId` string, nullable — Custom ID of the contact (client/supplier), used when `accountingCode` is a contacts ledger account.
    - `exchangeRate` number, nullable — Exchange rate applied between `currency` and `accountingCurrency`.
    - `additionalInfo` object, nullable — Free-form key/value metadata to attach to the entry. Sending an empty object (`{}`) has no effect and does not clear previously stored metadata.
    - `description` string, nullable — Free-text description of the entry. If omitted — on both creation and update — Embat sets (or resets) it to an auto-generated value: `"Asiento "` followed by `accountingEntryCode` if set, otherwise by `customId`. On `PATCH`, this means leaving `description` out overwrites any previously set custom description; resend the current value to keep it unchanged.
    - `documentId` string, nullable — Identifier of the source document (e.g. invoice) this entry relates to.
    - `transactionsIds` string[], nullable — Embat IDs of the bank transactions related to this entry.
    - `paymentId` string, nullable — Embat ID of the payment related to this entry.
    - `date` string, date-time, nullable — Accounting date of the entry. Send a plain date at midnight (e.g. `2024-01-15T00:00:00Z`) — sending a different time of day can shift the stored calendar date and is not fully normalized to midnight.
    - `attributes` AttributeValueRequestSchema[], nullable — Custom attribute values to attach to the entry. Duplicate values and attributes flagged as internal-only are omitted when the entry is returned.
      - `customId` string, required — Custom ID of the attribute (see the Attributes endpoints) being set.
      - `value` string, required — Display text of the value being set on this entity.
      - `valueCustomId` string, nullable — Custom ID of one of the attribute's predefined `values`, when the attribute is of type `list`. Leave unset for free-form `string`/`number` attributes.
      - `parentCustomId` string, nullable — Not used when attaching an attribute value to an entity.
    - `customId` string, required — Embat custom/auto-generated unique accounting entry ID. You can use it as your own custom ERP accounting entry ID.

## Response `200`

Successful Response

- BulkUpsertAccountingEntriesResponseSchema
  - `data` UpsertAccountingEntriesResponseSchema[], required — Result of the bulk creation/update, one entry per accounting entry.
    - `id` string, required — Embat resource ID
    - `customId` string, required — Client-provided custom ID

## Other responses

- `401` — Unauthorized. The bearer token is missing, invalid or expired.
- `404` — Not found. The requested resource or `companyId` does not exist.
- `422` — Validation Error
- `500` — Unexpected error. Contact support if it persists.

---

[API](https://skmtc.net/embat/apis/embat-api.md) · [All operations](https://skmtc.net/embat/apis/embat-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/embat/embat-api/revisions/36ca48bf4489/schema)
