Prepare a draft QuickBooks write-back batch (#2642)
Changed onStores, for review, the exact QuickBooks request of every selected item with its SHA-256, a stable Intuit requestid, and the batch manifest hash that approve and post must present. Nothing is sent to QuickBooks. Named journalEntryIds are kept even when blocked (as blocked items with their reason); a dateFrom/dateTo range adds only eligible entries. sparseUpdates correct an object pulled from QuickBooks (Purchase or Deposit): glAccountId is reverse-mapped to its single QuickBooks account, classId is a QuickBooks Class Id, memo sets the private note. Amounts, dates and the bank/card account are never changed. bankFeedTransactionIds (#3903) names native bank-feed rows to push while automatic posting is held: each is matched against the latest QuickBooks read first (any bank-side object, including a hand-keyed JournalEntry line, on the same bank/card account with the same direction and amount within three days); one match is linked in Median with no write and listed in linkedTransactionIds, several hold the row as blocked, and otherwise the batch carries a create_transaction Purchase or Deposit. 422 QUICKBOOKS_WRITEBACK_BANK_FEED_NOT_ELIGIBLE (nothing prepared) when a named row is not a candidate: not found for this company, personal, deleted, before the cutoff, on an unmapped bank account, already in QuickBooks, or held by another batch. 422 QUICKBOOKS_WRITEBACK_SOURCE_READ_STALE (nothing prepared) when the latest complete QuickBooks read started before the newest named row's bank day ended (UTC). The batch stays a draft; QuickBooks is written only by approve and post, which refuses with 409 QUICKBOOKS_WRITEBACK_CHANGED_SINCE_APPROVAL, creating nothing, when a newer read holds an object that could be a named row (objects the batch created itself never count; a batch already posting instead fails that row's item, posts the rest and ends failed, leaving the row free to prepare again). 422 QUICKBOOKS_WRITEBACK_NOTHING_ELIGIBLE when no item is eligible; 409 when an entry is already held by another batch.
Request
- Base URLhttps://api.medianfi.com/api/v1
- Auth
- HTTP bearer
- or API key in header X-API-Key
Path parameters
Request body
Native bank-feed transactions to match or push (#3903)
Prepares a reviewed create draft for exactly one bankFeedTransactionIds entry. Omit journalEntryIds, dates and sparseUpdates. No existing object is linked. Changed evidence returns 409 QUICKBOOKS_WRITEBACK_CHANGED_SINCE_APPROVAL.
Response
The draft batch with its items
Changes
- breaking
added 'if' subschema to the request body
- breaking
added 'then' subschema to the request body
- info
added the new optional request property
reviewedBankJournalEntryId
- breaking