Cards, prop trading & accounting

Preview Journal Entry From Sheet

Reads invoice rows from the client's configured Google Sheet and builds preview journal-entry sync records.

POSThttps://api.toku.com/platform/preview-journal-entry-from-sheet

Not available to API keys.

curl --request POST \
  --url 'https://api.toku.com/platform/preview-journal-entry-from-sheet' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "clientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoiceType": "EOR_PEO"
}'
200 response
{
  "previews": [
    {
      "syncId": "string",
      "docNumber": "string",
      "currency": "string",
      "country": "string",
      "groupingMode": "PER_CURRENCY",
      "groupKey": "string",
      "groupLabel": "string",
      "retryCount": 0,
      "syncStatus": "PREVIEWED",
      "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
invoiceTypestringrequired

NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it

Available options: EOR_PEO, CONTRACTOR, W2_YEAR_END, HRIS_PAYROLL

Response

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

Available options: PER_CURRENCY, PER_COUNTRY, COMBINED

groupKeystringrequired
groupLabelstringrequired
retryCountintegerrequired
syncStatusstringrequired

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

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