Cards, prop trading & accounting

Preview Journal Entry

Builds preview journal-entry sync records from caller-supplied invoice data for one invoice type and pay period.

POSThttps://api.toku.com/hris/preview-journal-entry

Not available to API keys.

curl --request POST \
  --url 'https://api.toku.com/hris/preview-journal-entry' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "clientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    {
      "invoiceType": "EOR_PEO",
      "payPeriod": "string",
      "currency": "string",
      "country": "string",
      "lines": {},
      "sourceUrl": "string",
      "sourceTab": "string",
      "parsedAt": "2026-01-01T00:00:00Z"
    }
  ]
}'
200 response
{
  "previews": [
    {
      "syncId": "string",
      "docNumber": "string",
      "currency": "string",
      "country": "string",
      "groupingMode": "COMBINED",
      "groupKey": "string",
      "groupLabel": "string",
      "retryCount": 0,
      "syncStatus": "FAILED",
      "qboJournalEntryId": "string",
      "journalEntry": {
        "TxnDate": "string",
        "CurrencyRef": {
          "value": "string"
        },
        "PrivateNote": "string",
        "DocNumber": "string",
        "Line": [
          {
            "Amount": "string",
            "Description": "string",
            "JournalEntryLineDetail": {
              "PostingType": "Debit",
              "AccountRef": {
                "value": "string"
              }
            }
          }
        ]
      },
      "totalDebits": "string",
      "totalCredits": "string",
      "balanced": true,
      "heldForReview": true
    }
  ]
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

clientIdstring<uuid>required
invoicesobject[]required

NOTE(ck): z.instanceof(Decimal) has no contract form; TGA still checks it NOTE(ck): a .transform() rule on a nested schema is not mirrored here; TGA still enforces it NOTE(ck): a .transform() rule is not mirrored here; TGA still enforces it

Allowed: at least 1 items

Show child attributes
invoiceTypestringrequired

Available options: EOR_PEO, CONTRACTOR, W2_YEAR_END, HRIS_PAYROLL

payPeriodstringrequired
currencystringrequired
countrystring
linesobjectrequired
rawRowsanyrequired
sourceUrlstringrequired

Allowed: at least 1 characters

sourceTabstringrequired

Allowed: at least 1 characters

parsedAtstring<date-time> | stringrequired

Response

200Successful response
previewsobject[]required
Show child attributes
syncIdstringrequired
docNumberstringrequired
currencystringrequired
countrystringrequired
groupingModestringrequired

Available options: COMBINED, PER_COUNTRY, PER_CURRENCY

groupKeystringrequired
groupLabelstringrequired
retryCountintegerrequired
syncStatusstringrequired

Available options: FAILED, PREVIEWED, PUSHING, REVERSED, SUCCESS

qboJournalEntryIdstring | nullrequired
journalEntryobjectrequired
Show child attributes
TxnDatestringrequired
CurrencyRefobjectrequired
Show child attributes
valuestringrequired
PrivateNotestringrequired
DocNumberstringrequired
Lineobject[]required
Show child attributes
Amountstringrequired
DetailTypeanyrequired
Descriptionstringrequired
JournalEntryLineDetailobjectrequired
Show child attributes
PostingTypestringrequired

Available options: Debit, Credit

AccountRefobjectrequired
Show child attributes
valuestringrequired
totalDebitsstringrequired
totalCreditsstringrequired
balancedbooleanrequired
heldForReviewbooleanrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits