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.
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"
}
]
}'{
"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
AuthorizationstringheaderrequiredBearer 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>requiredinvoicesobject[]requiredNOTE(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
invoiceTypestringrequiredAvailable options: EOR_PEO, CONTRACTOR, W2_YEAR_END, HRIS_PAYROLL
payPeriodstringrequiredcurrencystringrequiredcountrystringlinesobjectrequiredrawRowsanyrequiredsourceUrlstringrequiredAllowed: at least 1 characters
sourceTabstringrequiredAllowed: at least 1 characters
parsedAtstring<date-time> | stringrequiredResponse
200Successful response
previewsobject[]requiredShow child attributes
syncIdstringrequireddocNumberstringrequiredcurrencystringrequiredcountrystringrequiredgroupingModestringrequiredAvailable options: COMBINED, PER_COUNTRY, PER_CURRENCY
groupKeystringrequiredgroupLabelstringrequiredretryCountintegerrequiredsyncStatusstringrequiredAvailable options: FAILED, PREVIEWED, PUSHING, REVERSED, SUCCESS
qboJournalEntryIdstring | nullrequiredjournalEntryobjectrequiredShow child attributes
TxnDatestringrequiredCurrencyRefobjectrequiredShow child attributes
valuestringrequiredPrivateNotestringrequiredDocNumberstringrequiredLineobject[]requiredShow child attributes
AmountstringrequiredDetailTypeanyrequiredDescriptionstringrequiredJournalEntryLineDetailobjectrequiredShow child attributes
PostingTypestringrequiredAvailable options: Debit, Credit
AccountRefobjectrequiredShow child attributes
valuestringrequiredtotalDebitsstringrequiredtotalCreditsstringrequiredbalancedbooleanrequiredheldForReviewbooleanrequired