> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview Journal Entry From Sheet

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

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /platform/preview-journal-entry-from-sheet
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /platform/preview-journal-entry-from-sheet:
    post:
      operationId: previewJournalEntryFromSheet
      summary: Preview Journal Entry From Sheet
      description: >-
        Reads invoice rows from the client's configured Google Sheet and builds
        preview journal-entry sync records.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewJournalEntryFromSheetRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewJournalEntryFromSheetResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    PreviewJournalEntryFromSheetRequest:
      type: object
      properties:
        clientId:
          type: string
          format: uuid
        invoiceType:
          type: string
          enum:
            - EOR_PEO
            - CONTRACTOR
            - W2_YEAR_END
            - HRIS_PAYROLL
          description: >-
            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
      required:
        - clientId
        - invoiceType
    PreviewJournalEntryFromSheetResponse:
      type: object
      properties:
        previews:
          type: array
          items:
            type: object
            properties:
              syncId:
                type: string
              docNumber:
                type: string
              currency:
                type: string
              country:
                type: string
              groupingMode:
                type: string
                enum:
                  - PER_CURRENCY
                  - PER_COUNTRY
                  - COMBINED
              groupKey:
                type: string
              groupLabel:
                type: string
              retryCount:
                type: integer
              syncStatus:
                type: string
                enum:
                  - PREVIEWED
                  - PUSHING
                  - SUCCESS
                  - FAILED
                  - REVERSED
              qboJournalEntryId:
                type:
                  - string
                  - 'null'
              journalEntry:
                type: object
                properties:
                  TxnDate:
                    type: string
                  CurrencyRef:
                    type: object
                    properties:
                      value:
                        type: string
                    required:
                      - value
                  PrivateNote:
                    type: string
                  DocNumber:
                    type: string
                  Line:
                    type: array
                    items:
                      type: object
                      properties:
                        Amount:
                          type: string
                        DetailType:
                          const: JournalEntryLineDetail
                        Description:
                          type: string
                        JournalEntryLineDetail:
                          type: object
                          properties:
                            PostingType:
                              type: string
                              enum:
                                - Debit
                                - Credit
                            AccountRef:
                              type: object
                              properties:
                                value:
                                  type: string
                              required:
                                - value
                          required:
                            - PostingType
                            - AccountRef
                      required:
                        - Amount
                        - DetailType
                        - Description
                        - JournalEntryLineDetail
                required:
                  - TxnDate
                  - CurrencyRef
                  - PrivateNote
                  - DocNumber
                  - Line
              totalDebits:
                type: string
              totalCredits:
                type: string
              balanced:
                type: boolean
              heldForReview:
                type: boolean
            required:
              - syncId
              - docNumber
              - currency
              - country
              - groupingMode
              - groupKey
              - groupLabel
              - retryCount
              - syncStatus
              - qboJournalEntryId
              - journalEntry
              - totalDebits
              - totalCredits
              - balanced
              - heldForReview
      required:
        - previews
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
