CompuDime API docs

Reference / Accounting export

GET /v1/accounting/journal-entries

List mapped journal entries by store-day live

KeyRequired. See Authentication.
Capabilityaccounting-data
Scopeaccounting.read
Price1 credit, per page of 100 rows returned. How pricing works.
EstimateAdd estimate=true for a free quote. With estimate=true the 200 body is EstimateResponse (a priced quote for exactly this request), not the schema documented under responses.200; nothing is reserved or dispatched.
PagingFollow nextCursor. See Paging.

Example

curl -s "https://api.compudime.com/v1/accounting/journal-entries" \
  -H "Authorization: Bearer $PUBLIC_API_KEY"

Parameters

NameInTypeDescription
fieldsquerystringComma-separated accounting journal entries fields to include (see x-compudime-field-catalog), or * for every field the key may see. Omitted: a flat-priced endpoint returns every field; once IT prices the endpoint by field count (includedFields in x-compudime-pricing), an omitted fields returns the standard set at the base price and each field beyond the included count adds extraFieldCost. An unknown or denied field is a free 400 field_not_allowed.
from requiredquerystring (date)First business day (YYYY-MM-DD, the store's calendar), inclusive. Required. A register log belongs to the business day the POS recorded on it, else the day it started (a log that closes after midnight belongs to the day it started).
to requiredquerystring (date)Last business day (YYYY-MM-DD), inclusive. Required; not before from and not after today. There is no limit on the span.
limitqueryintegerHow many store-days to return: any whole number of 1 or more; default 100 (one page). The store is read up to a quarter at a time, so a longer range is read in several reads, one after another, and answered at once. One answer carries at most 10,000 store-days (a safeguard on the size of one answer, not a limit on the range); a longer range ends with nextCursor. There is no time limit on reading: an answer that needs several reads keeps reading until it holds limit rows (at most 10,000) or the listing ends. While it reads, the response is already open: its body starts with spaces (legal JSON whitespace, sent every few seconds so no proxy closes an idle connection), and X-Credits-Charged and X-Credits-Remaining are not response headers but HTTP trailers, which reach HTTP/2 clients (on api.compudime.com and compudime-public-api.fly.dev alike) and are dropped over HTTP/1.1. The billing block in the body always says what the call cost (totalCredits per unit times quantity); /v1/usage/current gives the balance. When this API or the store is busy with other long answers, an answer may end after its first read with nextCursor instead. With format=csv the answer is written whole once read (no leading spaces, no trailers; X-Next-Cursor names the cursor). A page can hold fewer rows than limit while nextCursor is set: keep following nextCursor until it is empty. Priced by the pages of 100 store-days returned once the endpoint's meter is priced by the page. Default: 100. At least 1.
cursorquerystringnextCursor from the previous answer, verbatim, with the same from and to. Omit for the first page; an empty nextCursor means the range is done.
formatquerystringjson (default) or csv. The CSV is one row per journal line with the entry's header on every row (UTF-8 without a byte order mark, RFC 4180 quoting, CRLF line ends); fields does not apply to it; its billing is in the X-Credits-* headers and its next page's cursor in X-Next-Cursor. One of: json, csv. Default: json.
maxAdjustmentquerynumberThe largest rounding difference, in dollars, a ready entry may post to Sales/Adjustment. Default 1.00; 0 to 100.00, at most two decimals. Default: 1. At least 0. At most 100.
estimatequerybooleanWhen true, returns EstimateResponse instead of the normal body and never reserves credits: the request is authenticated, authorized and field-resolved exactly like a real call, then priced by billing (base cost plus extra-field credits for the resolved fields) and returned without dispatching to the store. Free of charge. Default: false.

Responses

StatusDescriptionBody
200One page of journal entries, live: each store-day's totals through the store's own account mapping, balanced or flagged. JSON, or CSV with format=csv. Needs the accounting-data permission on the API key (capability accounting-data, scope accounting.read): these reads carry cost of goods sold, which no other read returns. No key has it by default; CompuDime grants it per store and per key. There is no switch on the store machine.
Header X-Next-Cursor: On a CSV answer: the cursor of the next page; absent when the range is done.
AccountingJournalResponse
400from or to is missing or not a YYYY-MM-DD day, to is before from or after today, limit is not a whole number from 1, cursor is not one a previous answer of the same range issued, format is not json or csv, fields was sent with format=csv, or maxAdjustment is not 0 to 100.00 with at most two decimals (code bad_request); or a requested field is not allowed (code field_not_allowed). Rejected before billing.Problem
401Public API key is missing, invalid, or revoked.Problem
402The request was blocked by billing policy: no_api_plan (no plan funds this meter), billing_card_missing, billing_card_failed, usage_exhausted, overage_cap_reached, subscription_paused, sandbox_exhausted, or billing_blocked. A key the store pays for under its approval gets grant_cap_exceeded (the store's monthly limit for your calls) or payer_billing_blocked (the store cannot be charged right now; ask the store owner) instead: what is wrong with the store's billing is not shown to it.Problem
403capability_not_enabled: the API key does not carry the accounting-data permission (scope accounting.read), or the store is not enabled for it (rejected before billing).Problem
405The requested method is not allowed for this endpoint.Problem
422scope_not_applicable: the API key carries a row scope, and no row scope can be applied to the register's close-out totals (rejected before billing). agent_update_required: the store's CompuDime agent is older than these reads; the store must update it. accounting_unsupported: the store's POS database has no register log table these reads can use. accounting_mapping_missing: the store has no account mapping (TisWin3's QuickBooks sales mapping, QBSalesReceiptItems); GET /v1/accounting/mapping lists the keys to map. accounting_mapping_invalid: the stored mapping is not readable XML. The reservation is released, nothing is charged.Problem
429Too many requests from this API key (code rate_limited). Each key has its own request budget at the API edge, refilled continuously; it covers every authenticated endpoint, including the free ones, and is checked before anything is billed or sent to the store. Billed endpoints are also subject to the store plan's per-minute ceiling, which answers the same problem code. Wait at least Retry-After seconds before the next request with this key, then resume; if 429 answers again, back off exponentially (double the wait each time, up to a minute or so) and add random jitter so parallel workers do not retry in step. A 429 is never charged and reserves nothing.
Header Retry-After: Whole seconds to wait before retrying with this key: the time until the key's next request token at the edge (never less than 1), or 60 when the store plan's per-minute ceiling refused the call.
Problem
500The API edge encountered an internal error.Problem
502The store's POS could not complete the journal entries (code store_error): the agent answered an error, the store has not enabled per-item data for developers, or the agent or relay build predates this operation. The reservation is released.Problem
503The store's POS agent is offline (code store_offline), or a Public API dependency is unavailable. The reservation is released. Also answered, with code endpoint_disabled, while CompuDime has temporarily switched the endpoint off: the whole API, the endpoint's family (x-compudime-family) or this endpoint alone; the detail says which and why. It is checked before anything is validated, reserved or sent to the store, so it is never charged; it is retryable and carries Retry-After.
Header Retry-After: Sent with code endpoint_disabled: whole seconds to wait before asking again. A switch has no scheduled end, so this is a polling interval (60), not a promise.
Problem
504The store did not answer inside the read ceiling (code store_timeout). The reservation is released.Problem

Error bodies are problem JSON; every code is listed there.

Fields

Choose with fields=; see Choosing fields.

All fieldsbusinessDay, externalId, revision, status, entity, class, store, memo, revenueView, logs, lines, totals, adjustment, skipped, warnings, mapping
Standard setbusinessDay, externalId, revision, status, entity, class, store, memo, revenueView, logs, lines, totals, adjustment, skipped, warnings, mapping

Access level

What your integration's access level changes here.

LevelScopeEffect
ownaccounting.readThe level does not change this operation: own and all return the same data.
allaccounting.readThe level does not change this operation: own and all return the same data.