Skip to content

Mercury: Update multiple journal entries

Mercury books.bulkUpdateBooksJournalEntries: arguments, response, policy and SDK examples.

← Books operations · Get started

Operation mercury.bulkupdatebooksjournalentries

Provider route: PUT /books/journal-entries. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/mercury with npm, or alter-sdk-mercury with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { MercuryIntegration } from "@alter-ai/mercury";
async function execute(input: Parameters<MercuryIntegration["books"]["bulkUpdateBooksJournalEntries"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new MercuryIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.books.bulkUpdateBooksJournalEntries(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_mercury import MercuryIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = MercuryIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.books.bulk_update_books_journal_entries(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.booksIdstringOptionalThe Books instance to act on. Must be the token organization’s own instance, which it defaults to.
Format: uuid
bodyModelOptionalExpand Update multiple journal entries — request body — body

Referenced models: Update multiple journal entries — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
Update multiple journal entries — request body — body
FieldTypePresenceDescription and constraints
$objectRootRequest to update multiple journal entries in a single call.
Additional keys: not allowed
updatesarrayRequired within parentThe individual journal entry updates
updates[]ModelEach itemExpand Update multiple journal entries — request body — body updates item

Referenced models: Update multiple journal entries — request body — body updates item

Update multiple journal entries — request body — body updates item
FieldTypePresenceDescription and constraints
$objectRootRequest to update a single journal entry.
Additional keys: not allowed
datetimeJSONOptional
datetime (anyOf 1)JSONAlternative
datetime (anyOf 1) (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
datetime (anyOf 1) (allOf 2)JSONAll variants applyUpdated date and time
datetime (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeUpdated description
Format: size < 513
description (anyOf 2)nullAlternative
journalEntryIdstringRequired within parentThe ID of the journal entry to update
Format: base58 (max length 22)
lineEntryChangesJSONOptional
lineEntryChanges (anyOf 1)JSONAlternative
lineEntryChanges (anyOf 1) (allOf 1)ModelAll variants applyExpand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update
lineEntryChanges (anyOf 1) (allOf 2)JSONAll variants applyChanges to apply to line entries
lineEntryChanges (anyOf 2)nullAlternative
reviewStatusJSONOptional
reviewStatus (anyOf 1)JSONAlternative
reviewStatus (anyOf 1) (allOf 1)stringAll variants applyOne of: unreviewed, reviewed
reviewStatus (anyOf 1) (allOf 2)JSONAll variants applyNew review status for the journal entry. Omit to leave the existing review status unchanged.
reviewStatus (anyOf 2)nullAlternative

Referenced models: Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update

Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update
FieldTypePresenceDescription and constraints
$objectRootLine entry changes to apply to a journal entry: create, update, or delete.
Additional keys: not allowed
createJSONOptional
create (anyOf 1)arrayAlternativeNew line entries to add
create (anyOf 1)[]ModelEach itemExpand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item
create (anyOf 2)nullAlternative
deleteJSONOptional
delete (anyOf 1)arrayAlternativeIDs of line entries to remove
delete (anyOf 1)[]stringEach itemunique id for a line entry; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
delete (anyOf 2)nullAlternative
updateJSONOptional
update (anyOf 1)arrayAlternativeExisting line entries to modify
update (anyOf 1)[]ModelEach itemExpand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item
update (anyOf 2)nullAlternative

Referenced models: Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item, Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item

Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item
FieldTypePresenceDescription and constraints
$objectRootA new line entry to create within an existing journal entry.
Additional keys: not allowed
amountJSONRequired within parent
amount (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (allOf 2)JSONAll variants applyThe amount for this line entry
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyOne of: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether this line entry is a debit or credit
descriptionstringRequired within parentDescription of the line entry
Format: size < 4001
ledgerIdstringRequired within parentThe ledger this line entry is posted to
Format: base58 (max length 22)
sortOrderJSONOptional
sortOrder (anyOf 1)integerAlternativeOptional position within the journal entry. Omit to append at MAX(sort_order) + 1.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
sortOrder (anyOf 2)nullAlternative
tagIdsJSONOptional
tagIds (anyOf 1)arrayAlternativeOptional tags to associate with this line entry
tagIds (anyOf 1)[]stringEach itemunique id for a tag; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
tagIds (anyOf 2)nullAlternative
Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item
FieldTypePresenceDescription and constraints
$objectRootUpdates to apply to an existing line entry.
Additional keys: not allowed
amountJSONOptional
amount (anyOf 1)JSONAlternative
amount (anyOf 1) (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (anyOf 1) (allOf 2)JSONAll variants applyUpdated amount
amount (anyOf 2)nullAlternative
debitCreditJSONOptional
debitCredit (anyOf 1)JSONAlternative
debitCredit (anyOf 1) (allOf 1)stringAll variants applyOne of: debit, credit
debitCredit (anyOf 1) (allOf 2)JSONAll variants applyUpdated debit/credit designation
debitCredit (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeUpdated description
Format: size < 4001
description (anyOf 2)nullAlternative
idstringRequired within parentThe ID of the line entry to update
Format: base58 (max length 22)
ledgerIdJSONOptional
ledgerId (anyOf 1)stringAlternativeUpdated ledger
Format: base58 (max length 22)
ledgerId (anyOf 2)nullAlternative
sortOrderJSONOptional
sortOrder (anyOf 1)integerAlternativeUpdated position within the journal entry. Omit to leave unchanged.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
sortOrder (anyOf 2)nullAlternative
tagIdsJSONOptional
tagIds (anyOf 1)arrayAlternativeUpdated tags
tagIds (anyOf 1)[]stringEach itemunique id for a tag; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
tagIds (anyOf 2)nullAlternative

SDK function policy ID: mercury.bulkupdatebooksjournalentries. Catalog operation: mercury:bulkUpdateBooksJournalEntries. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.