Skip to main content
Everything a reviewer does on the Accounting page in Slash, you can do through the API.

Code an entry

Update an accounting entry with the value ids you found in Dimensions and values:
Only the dimensions you send change. Send null to clear one. Coding an entry doesn’t change its status, so you can code in several passes and approve it once at the end. If a value isn’t allowed, the error’s details.field points at it, for example dimensions.class. See Errors.

Split an entry

To code parts of a transaction differently, send lineItems with the full list of editable lines. Lines with an id are updated, lines without one are added, and lines you leave out are removed. The amounts must add up to the transaction total.
A bill entry takes its lines and amounts from the bill, so only the coding can change here. Each line needs the id of one of the entry’s lineItems (accounting_line_item_ prefix). lineItemLevelDimensions lists the dimensions coded per line; every other dimension is coded once for the whole bill.
Send custom field values in customFields, keyed by the field’s key, on the entry or on a line item depending on the field. Sending customFields replaces the existing values.

Approve and sync

Mark ready and sync check that every required dimension and custom field has a value. If not, they return entry_not_ready and list everything that’s missing. While an entry is pending_sync or syncing, changes return entry_sync_in_progress until the platform responds. Sync returns connection_not_syncable on a connection that isn’t linked to a platform Slash syncs with, such as a CSV export; those entries are handled from Slash.

Work in batches

Run a status action on many accounting entries applies one of the actions above to up to 100 entries:
Each entry is handled on its own, so one that isn’t ready doesn’t stop the rest. The response lists the result for each entry.

Attach receipts

Upload the file as a document with purpose=accounting_receipt, then add it with Attach a document to an accounting entry. It’s sent to the platform with the entry’s next sync. A bill’s entry takes its files from the bill: add them to the bill instead.

Track sync results

After a sync, fetch the entry with Get an accounting entry until its status is synced or failed. If it failed, lastSyncError explains why in a message you can show users, with a suggestion for fixing it; fix the coding and sync it again. To find the entries still waiting for review, list accounting entries with status=in_review. Entries come newest first. To find entries the platform rejected, use status=failed.