openapi: 3.0.0
info:
  version: 1.0.0
  title: FloQast External API
  description: >
    ### **Authentication**


    Requests to FloQast's API must be authenticated using an API key.

    The API key must be included in the `x-api-key` header of each request and
    can be generated in the FloQast application.

    The key should also have the correct permissions to access the API endpoints
    you are using.

    [Directions to generate an API
    key](https://help.floqast.com/hc/en-us/articles/14270183516827)
tags:
  - name: Amortizations
    description: ''
    x-displayName: Amortization
  - name: Audit Trail
    description: ''
    x-displayName: Audit Trail
  - name: Chart Of Accounts
    description: ''
  - name: Checklists
    description: ''
    x-displayName: Checklists
  - name: Checklist Analytics
    description: ''
    x-displayName: Checklist Analytics
  - name: Depreciations
    description: ''
    x-displayName: Depreciations
  - name: Entities
    description: ''
    x-displayName: Entities
  - name: Info
    description: ''
    x-displayName: Info
  - name: Reconciliation Analytics
    description: ''
    x-displayName: Reconciliation Analytics
  - name: Transactions
    description: ''
  - name: Trial Balance
    description: ''
    x-displayName: Trial Balance
  - name: Tags
    description: ''
    x-displayName: Tags
  - name: Users
    description: ''
    x-displayName: Users
servers:
  - url: https://fq-api.floqast.app
  - url: https://fq-api.eu.floqast.app
  - url: https://fq-api.au.floqast.app
paths:
  /api/v1/amortization/items:
    parameters:
      - name: filter[month]
        in: query
        description: >-
          Specifies the month for which the amortization should be retrieved.
          Valid values are the names of the months. Must be used in conjunction
          with filter[year].
        example: march
        required: true
        schema:
          type: string
      - name: filter[year]
        in: query
        description: >-
          Specifies the year for which the amortization should be retrieved. It
          should be a four-digit numerical value. Must be used in conjunction
          with filter[month].
        required: true
        example: 2023
        schema:
          type: integer
      - name: filter[entityIds]
        in: query
        description: >-
          Comma separated entity ids for which the amortizations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Amortizations
      summary: Get Amortizations
      operationId: getAmortizations
      description: >
        This API endpoint retrieves amortization entries for a designated month
        and year, providing a concise overview of amortization activities within
        the specified period. It facilitates access to detailed records of
        amortization transactions, which include the systematic allocation of
        costs for intangible assets over their useful life, enabling thorough
        analysis and financial tracking.
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/AmortizationResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/AmortizationBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/amortization/reconciliations/{reconciliationId}:
    patch:
      tags:
        - Amortizations
      summary: Update Amortization Reconciliations
      operationId: patchAmortizationReconciliations
      description: >
        This API endpoint takes a reconciliationId and journal entry status
        information, and updates amortization reconciliation entries.
      parameters:
        - name: reconciliationId
          in: path
          description: Id of reconciliation
          example: 5e94d5b63f557b001420bbe3
          required: true
          schema:
            type: string
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  required:
                    - journalEntryStatus
                  properties:
                    journalEntryStatus:
                      description: Status of journal entry
                      type: string
                      required:
                        - POSTED
                        - FAILED
                      example: POSTED
                    journalEntryId:
                      description: Id of journal entry
                      type: string
                      example: 615bcdc00000000000000302
                    journalEntryTimestamp:
                      description: Timestamp of journal entry status change
                      type: string
                      format: date-time
                      example: '2024-03-29T21:36:43.309+00:00'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: reconciliationId
                              description: The field that caused the error
                            message:
                              type: string
                              example: reconciliationId is required
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/amortization/reconciliations:
    parameters:
      - name: filter[reconciliationIds]
        in: query
        description: >-
          Comma separated reconciliation ids for which the reconciliations
          should be retrieved
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        required: false
        schema:
          type: string
      - name: filter[journalEntryStatus]
        in: query
        description: >-
          Status of journal entry for which the reconciliations should be
          retrieved
        required: false
        example: PROCESSING
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Amortizations
      summary: Get Amortizing Reconciliations
      operationId: getAmortizationReconciliations
      description: >
        This API endpoint can take reconciliationIds and journal entry status,
        and gets amortization reconciliations entries.
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/AmortizingReconciliationsResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/AmortizingReconciliationsBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/audit-trail:
    parameters:
      - name: filter[startDate]
        in: query
        description: >-
          Specifies the start date (inclusive) for logs to be retrieved. The
          date must be in the ISO 8601 format like YYYY-MM-DD.
        example: '2023-11-01'
        required: false
        schema:
          type: string
      - name: filter[endDate]
        in: query
        description: >-
          Specifies the end date (inclusive) for logs to be retrieved. The date
          must be in the ISO 8601 format like YYYY-MM-DD.
        required: false
        example: '2023-12-01'
        schema:
          type: string
      - name: filter[userApiKey._id]
        in: query
        description: Specifies the user API key ID to filter logs by.
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Audit Trail
      summary: Get Audit Trail logs
      operationId: getAuditTrail
      description: >
        This API endpoint retrieves audit logs for all API keys within a
        top-level client, providing a comprehensive overview of usage. It
        supports querying logs for a specific user's API key ID to facilitate
        focused analysis.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditTrail'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/BadRequestAuditTrail'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/chart-of-accounts:
    get:
      tags:
        - Chart Of Accounts
      summary: Get Chart Of Accounts Data
      operationId: getChartOfAccounts
      description: |
        This API endpoint returns chart of accounts data used in FloQast.
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
        - name: filter[entityIds]
          in: query
          description: >-
            Comma separated entity ids for which the chart of accounts should be
            retrieved.
          required: false
          example: 648118111cc2ef0019cf0868,648118111cc2ef0019cf0867
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChartOfAccountsResponse'
              example:
                data:
                  - entityId: 648118111cc2ef0019cf0868
                    error: Error retrieving chart of accounts
                  - entityId: 648118111cc2ef0019cf0867
                    accounts:
                      - number: '35121'
                        name: Cash
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: filter[entityIds]
                              description: The field that caused the error
                            message:
                              type: string
                              example: >-
                                'filter[entityIds]' should be valid Mongo
                                ObjectIds
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/chart-of-accounts/upload:
    put:
      tags:
        - Chart Of Accounts
      summary: Upload Chart Of Accounts Data
      operationId: putChartOfAccounts
      description: >
        This API endpoint takes chart of accounts data and uploads it to a
        user’s FloQast tenant. Use this endpoint for operations such as adding,
        editing, and removing accounts inside of FloQast.
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChartOfAccounts'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateChartOfAccountsResponse'
              example:
                data:
                  - entityId: 648118111cc2ef0019cf0868
                    success: false
                    accounts:
                      - number: '35123'
                        name: Cash
                    error: Failed to validate entityId
                  - entityId: 648118111cc2ef0019cf0867
                    success: true
                    accounts:
                      - number: '35121'
                        name: Cash
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: entityId
                              description: The field that caused the error
                            message:
                              type: string
                              example: '''entityId'' should be a valid Mongo ObjectId'
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/checklists:
    post:
      tags:
        - Checklists
      summary: Create a new checklist item
      operationId: createChecklist
      requestBody:
        description: Checklist item to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChecklistItem'
      responses:
        '200':
          description: Checklist item created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChecklistResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          $ref: '#/components/responses/ChecklistBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
    get:
      parameters:
        - name: filter[month]
          in: query
          description: >-
            Specifies the month for which the checklists should be retrieved.
            Valid values are the names of the months. Must be used in
            conjunction with filter[year].
          example: march
          required: true
          schema:
            type: string
        - name: filter[year]
          in: query
          description: >-
            Specifies the year for which the checklists should be retrieved. It
            should be a four-digit numerical value. Must be used in conjunction
            with filter[month].
          required: true
          example: 2023
          schema:
            type: integer
        - name: filter[templateId]
          in: query
          description: templateId for which the checklists should be retrieved.
          required: false
          example: 5e94d5b63f557b001420bbb1
          schema:
            type: string
        - name: filter[description]
          in: query
          description: Specifies a description for which checklists should be retrieved.
          required: false
          schema:
            type: string
          example: Generate balance sheet
        - name: filter[entityId]
          in: query
          description: Specifies the entity for which the checklists should be retrieved
          required: false
          schema:
            type: string
          example: 656abc949ec04a00096b56d7
        - name: page[size]
          in: query
          description: >-
            The number of items to return. If not specified, the API will return
            a default of 30,000 items, which is the maximum value.
          example: 12000
          required: false
          schema:
            type: integer
        - name: page[cursor]
          in: query
          description: >-
            Pagination cursor that indicates the starting position for the next
            set of items
          required: false
          example: 5e94d5b63f557b001420bbe3
          schema:
            type: string
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      tags:
        - Checklists
      summary: Get Checklists
      operationId: getChecklists
      description: >
        This API endpoint enables fetching a collection of checklists performed
        during a specific month and year. By providing the desired month and
        year as parameters, the API response narrows down the results to the
        exact period, facilitating the analysis of financial data and tracking
        the progress of checklist efforts.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Checklists'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          $ref: '#/components/responses/ChecklistBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/checklists/{checklistId}:
    post:
      parameters:
        - name: checklistId
          in: path
          required: true
          description: The ID of the checklist item
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChecklistPatchRequest'
      tags:
        - Checklists
      summary: Patch Checklist
      operationId: putChecklist
      description: |
        This API endpoint updates a checklist.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecklistModel'
        '400':
          description: Bad Request
          $ref: '#/components/responses/ChecklistBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/checklists/{checklistId}/sign:
    post:
      parameters:
        - name: checklistId
          in: path
          required: true
          description: The ID of the checklist item
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChecklistSignature'
      tags:
        - Checklists
      summary: Post Checklist Signatures
      operationId: postChecklistSignatures
      description: |
        This API endpoint updates the signature status of a checklist.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecklistModel'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/ChecklistBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/analytics/checklists:
    parameters:
      - name: filter[month]
        in: query
        description: >-
          Specifies the month for which the checklists should be retrieved.
          Valid values are the names of the months. Must be used in conjunction
          with filter[year]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        example: march
        required: false
        schema:
          type: string
      - name: filter[year]
        in: query
        description: >-
          Specifies the year for which the checklists should be retrieved. It
          should be a four-digit numerical value. Must be used in conjunction
          with filter[month]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        required: false
        example: 2023
        schema:
          type: integer
      - name: filter[modifiedBefore]
        in: query
        description: >-
          Sets the cutoff date for retrieving checklists, including only those
          modified before (but not including) the specified date. The date must
          be in the format YYYY-MM-DD. While filter[modifiedBefore] is required
          if filter[month] and filter[year] are not provided, it can also be
          used in conjunction with these filters for more specific queries.
        required: false
        example: '2021-01-01'
        schema:
          type: string
          format: date
      - name: filter[modifiedSince]
        in: query
        description: >-
          Sets the cutoff date for retrieving checklists, including only those
          modified on or after the specified date. The date must be in the
          format YYYY-MM-DD. While filter[modifiedSince] is required if
          filter[month] and filter[year] are not provided, it can also be used
          in conjunction with these filters for more specific queries.
        required: false
        example: '2020-12-31'
        schema:
          type: string
          format: date
      - name: filter[entityIds]
        in: query
        description: >-
          Comma separated entity ids for which the checklists should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        schema:
          type: string
      - name: filter[workflowIds]
        in: query
        description: >-
          Comma separated workflow ids for which the checklists should be
          retrieved
        required: false
        example: 5e94d5b63f557b001420baa1,5e94d5b63f557b001420baa2
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Checklist Analytics
      summary: Get Checklist Analytics
      operationId: getChecklistAnalytics
      description: >
        This API endpoint enables fetching a collection of checklists performed
        during a specific month and year. By providing the desired month and
        year as parameters, the API response narrows down the results to the
        exact period, facilitating the analysis of financial data and tracking
        the progress of checklist efforts." And also include information about
        TLCs.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecklistAnalytics'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/BadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/depreciation/items:
    parameters:
      - name: filter[month]
        in: query
        description: >-
          Specifies the month for which the depreciation should be retrieved.
          Valid values are the names of the months. Must be used in conjunction
          with filter[year].
        example: march
        required: true
        schema:
          type: string
      - name: filter[year]
        in: query
        description: >-
          Specifies the year for which the depreciation should be retrieved. It
          should be a four-digit numerical value. Must be used in conjunction
          with filter[month].
        required: true
        example: 2023
        schema:
          type: integer
      - name: filter[entityIds]
        in: query
        description: >-
          Comma separated entity ids for which the depreciations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Depreciations
      summary: Get Depreciations
      operationId: getDepreciations
      description: >
        This API endpoint retrieves depreciation entries for a designated month
        and year, providing a concise overview of depreciation activities within
        the specified period. It enables access to detailed records associated
        with the depreciation of tangible assets, facilitating thorough
        financial tracking and analysis.
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/DepreciationResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/DepreciationBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/depreciation/reconciliations/{reconciliationId}:
    patch:
      tags:
        - Depreciations
      summary: Update Depreciation Reconciliations
      operationId: patchDepreciationReconciliations
      description: >
        This API endpoint takes a reconciliationId and journal entry status
        information, and updates depreciation reconciliations entries.
      parameters:
        - name: reconciliationId
          in: path
          description: Id of reconciliation
          example: 5e94d5b63f557b001420bbe3
          required: true
          schema:
            type: string
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  required:
                    - journalEntryStatus
                  properties:
                    journalEntryStatus:
                      description: Status of journal entry
                      type: string
                      required:
                        - POSTED
                        - FAILED
                      example: POSTED
                    journalEntryId:
                      description: Id of journal entry
                      type: string
                      example: 615bcdc00000000000000302
                    journalEntryTimestamp:
                      description: Timestamp of journal entry status change
                      type: string
                      format: date-time
                      example: '2024-03-29T21:36:43.309+00:00'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: reconciliationId
                              description: The field that caused the error
                            message:
                              type: string
                              example: reconciliationId is required
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/depreciation/reconciliations:
    parameters:
      - name: filter[reconciliationIds]
        in: query
        description: >-
          Comma separated reconciliation ids for which the reconciliations
          should be retrieved
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        required: false
        schema:
          type: string
      - name: filter[journalEntryStatus]
        in: query
        description: >-
          Status of journal entry for which the reconciliations should be
          retrieved
        required: false
        example: PROCESSING
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Depreciations
      summary: Get Depreciation Reconciliations
      operationId: getDepreciationReconciliations
      description: >
        This API endpoint can take reconciliationIds and journal entry status,
        and gets depreciation reconciliations entries.
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/DepreciatingReconciliationsResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/DepreciatingReconciliationsBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/entities:
    get:
      tags:
        - Entities
      parameters:
        - name: filter[name]
          in: query
          description: Specifies the name of the entity. Cannot be used with page[number].
          example: Entity Name
          required: false
          schema:
            type: string
        - name: page[size]
          in: query
          description: >-
            The number of items to return. If not specified, the API will return
            a default of 30,000 items, which is the maximum value.
          example: 12000
          required: false
          schema:
            type: integer
        - name: page[number]
          in: query
          description: >-
            Indicates the page number of the results to retrieve. This parameter
            is used to paginate through lists of items. Cannot be used with
            filter[name].
          required: false
          example: 5
          schema:
            type: integer
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      summary: Get Entities
      operationId: getEntities
      description: >
        This API endpoint enables fetching a collection of entities within a
        given FloQast tenant. Optional query parameters can either narrow the
        API response or provide pagination functionality.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEntitiesPathResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: filter[name]
                              description: The field that caused the error
                            message:
                              type: string
                              example: >-
                                filter[name] must be a string containing only
                                letters, numbers, and spaces, and limited to one
                                entry.
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/entities/{id}:
    get:
      tags:
        - Entities
      parameters:
        - name: id
          in: path
          description: The ID of the entity
          required: true
          schema:
            type: string
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      summary: Get Entity by ID
      operationId: getExample
      description: >
        This API endpoint enables fetching a single specific entity with its
        unique identifier.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEntitiesPathResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  message:
                    type: string
                    example: \"id\" should be a valid Mongo ObjectId.
                    description: The error message
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Not Found
          $ref: '#/components/responses/NotFound'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/me:
    get:
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      tags:
        - Info
      summary: Current user and token information
      operationId: getMe
      description: |
        Get information about the current user and token
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/GetMePathResponse'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/reconciliations:
    parameters:
      - name: filter[month]
        in: query
        description: >-
          Specifies the month for which the reconciliations should be retrieved.
          Valid values are the names of the months. Must be used in conjunction
          with filter[year]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        example: march
        required: false
        schema:
          type: string
      - name: filter[year]
        in: query
        description: >-
          Specifies the year for which the reconciliations should be retrieved.
          It should be a four-digit numerical value. Must be used in conjunction
          with filter[month]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        required: false
        example: 2023
        schema:
          type: integer
      - name: filter[modifiedBefore]
        in: query
        description: >-
          Sets the cutoff date for retrieving reconciliations, including only
          those modified before (but not including) the specified date. The date
          must be in the format YYYY-MM-DD. While filter[modifiedBefore] is
          required if filter[month] and filter[year] are not provided, it can
          also be used in conjunction with these filters for more specific
          queries.
        required: false
        example: '2021-01-01'
        schema:
          type: string
          format: date
      - name: filter[modifiedSince]
        in: query
        description: >-
          Sets the cutoff date for retrieving reconciliations, including only
          those modified on or after the specified date. The date must be in the
          format YYYY-MM-DD. While filter[modifiedSince] is required if
          filter[month] and filter[year] are not provided, it can also be used
          in conjunction with these filters for more specific queries.
        required: false
        example: '2020-12-31'
        schema:
          type: string
          format: date
      - name: filter[entityIds]
        in: query
        description: >-
          Comma separated entity ids for which the reconciliations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        schema:
          type: string
      - name: filter[workflowIds]
        in: query
        description: >-
          Comma separated workflow ids for which the reconciliations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420baa1,5e94d5b63f557b001420baa2
        schema:
          type: string
      - name: filter[journalSource]
        in: query
        description: journalSource for which the reconciliations should be retrieved.
        required: false
        example: SUB_LEDGER
        schema:
          type: string
      - name: filter[internalIds]
        in: query
        description: >-
          Comma seperated gl internalIds for which the reconciliations should be
          retrieved.
        required: false
        example: 123456, 78910
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Reconciliations
      summary: Get Reconciliations
      operationId: getReconciliations
      description: >
        This API endpoint enables fetching a collection of reconciliations
        performed during a specific month and year. By providing the desired
        month and year as parameters, the API response narrows down the results
        to the exact period, facilitating the analysis of financial data and
        tracking the progress of reconciliation efforts." And also include
        information about TLCs.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reconciliations'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          $ref: '#/components/responses/ReconciliationBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/reconciliations/{reconciliationId}/sign:
    post:
      parameters:
        - name: reconciliationId
          in: path
          required: true
          description: The ID of the reconciliation item
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReconciliationSignature'
      tags:
        - Reconciliations
      summary: Post Reconciliation Signatures
      operationId: postReconciliationSignatures
      description: |
        This API endpoint updates the signature status of a reconciliation.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReconciliationModel'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/ReconciliationBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/analytics/reconciliations:
    parameters:
      - name: filter[month]
        in: query
        description: >-
          Specifies the month for which the reconciliations should be retrieved.
          Valid values are the names of the months. Must be used in conjunction
          with filter[year]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        example: march
        required: false
        schema:
          type: string
      - name: filter[year]
        in: query
        description: >-
          Specifies the year for which the reconciliations should be retrieved.
          It should be a four-digit numerical value. Must be used in conjunction
          with filter[month]. Required if neither filter[modifiedBefore] nor
          filter[modifiedSince] is provided.
        required: false
        example: 2023
        schema:
          type: integer
      - name: filter[modifiedBefore]
        in: query
        description: >-
          Sets the cutoff date for retrieving reconciliations, including only
          those modified before (but not including) the specified date. The date
          must be in the format YYYY-MM-DD. While filter[modifiedBefore] is
          required if filter[month] and filter[year] are not provided, it can
          also be used in conjunction with these filters for more specific
          queries.
        required: false
        example: '2021-01-01'
        schema:
          type: string
          format: date
      - name: filter[modifiedSince]
        in: query
        description: >-
          Sets the cutoff date for retrieving reconciliations, including only
          those modified on or after the specified date. The date must be in the
          format YYYY-MM-DD. While filter[modifiedSince] is required if
          filter[month] and filter[year] are not provided, it can also be used
          in conjunction with these filters for more specific queries.
        required: false
        example: '2020-12-31'
        schema:
          type: string
          format: date
      - name: filter[entityIds]
        in: query
        description: >-
          Comma separated entity ids for which the reconciliations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420bbe1,5e94d5b63f557b001420bbe2
        schema:
          type: string
      - name: filter[journalSource]
        in: query
        description: journalSource for which the reconciliations should be retrieved.
        required: false
        example: SUB_LEDGER
        schema:
          type: string
      - name: filter[internalIds]
        in: query
        description: >-
          Comma seperated gl internalIds for which the reconciliations should be
          retrieved.
        required: false
        example: 123456, 78910
        schema:
          type: string
      - name: filter[workflowIds]
        in: query
        description: >-
          Comma separated workflow ids for which the reconciliations should be
          retrieved.
        required: false
        example: 5e94d5b63f557b001420baa1,5e94d5b63f557b001420baa2
        schema:
          type: string
      - name: page[size]
        in: query
        description: >-
          The number of items to return. If not specified, the API will return a
          default of 30,000 items, which is the maximum value.
        example: 12000
        required: false
        schema:
          type: integer
      - name: page[cursor]
        in: query
        description: >-
          Pagination cursor that indicates the starting position for the next
          set of items
        required: false
        example: 5e94d5b63f557b001420bbe3
        schema:
          type: string
      - name: allowRedirect
        in: query
        description: >-
          If set to true, the API will return a 303 redirect response if the
          response payload is too large. The header `Location` and
          `body.data.url` will also include the URL to the actual resource.
        required: false
        example: true
        schema:
          type: boolean
    get:
      tags:
        - Reconciliation Analytics
      summary: Get Reconciliation Analytics
      operationId: getReconciliationAnalytics
      description: >
        This API endpoint enables fetching a collection of reconciliations
        performed during a specific month and year. By providing the desired
        month and year as parameters, the API response narrows down the results
        to the exact period, facilitating the analysis of financial data and
        tracking the progress of reconciliation efforts." And also include
        information about TLCs.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reconciliation_Analytics'
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/BadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/transactions/subledgers:
    put:
      tags:
        - Transactions
      summary: Update Subledgers
      operationId: putSubledgers
      description: >
        This endpoint takes a list of FloQast reconciliation IDs and updates the
        subledger balance for each.
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subledger'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusId:
                    type: string
                    example: 615bcdc00000000000000302
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: reconciliationId
                              description: The field that caused the error
                            message:
                              type: string
                              example: reconciliationId is required
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/transactions:
    put:
      tags:
        - Transactions
      summary: Update Transactions
      operationId: putTransactions
      description: >
        This endpoint takes a reconciliationId and a corresponding ledger type
        and updates each provided transaction.
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/SubledgerTransaction'
                - $ref: '#/components/schemas/GLTransaction'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusId:
                    type: string
                    example: 615bcdc00000000000000302
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SubledgerBadRequest'
                  - $ref: '#/components/schemas/GLBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
    delete:
      tags:
        - Transactions
      summary: Delete Transactions
      operationId: deleteTransactions
      description: >
        This endpoint takes a reconciliationId and deletes all subledger
        transactions tied to it.
      parameters:
        - name: reconciliationId
          in: query
          description: >-
            The reconciliationId specifies all subledger transactions associated
            with it for deletion
          required: true
          example: 668ee68e00b661374b4861c6
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusId:
                    type: string
                    example: 668ee68e00b661374b4861c6
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: reconciliationId
                              description: The field that caused the error
                            message:
                              type: string
                              example: reconciliationId is required
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/transactions/status/{statusId}:
    get:
      tags:
        - Transactions
      summary: Get Status
      operationId: getStatus
      description: >
        This endpoint takes an ID of an endpoint event and returns the status of
        the event.
      parameters:
        - name: statusId
          in: path
          description: The status ID returned after making a request
          example: 615bcdc00000000000000302
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: statusId
                              description: The field that caused the error
                            message:
                              type: string
                              example: statusId is not a valid MongoId
                              description: The error message
                    description: >-
                      Reason(s) for the errors related to incorrect query keys
                      or values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload Too Large
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/trial-balance/upload:
    put:
      tags:
        - Trial Balance
      summary: Upload Trial Balance Data
      operationId: putTrialBalanceUpload
      description: >
        This API endpoint takes trial balance data and uploads it to a user's
        FloQast tenant. Use this endpoint to assign or update trial balance
        values for each account in a given entity and period.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    required:
                      - entityId
                      - period
                      - accounts
                    type: object
                    properties:
                      entityId:
                        description: Id of company
                        type: string
                        example: 5e94d5b63f557b001420bbe2
                      period:
                        type: object
                        required:
                          - month
                          - year
                        properties:
                          month:
                            description: Month of balance
                            type: string
                            example: january
                            enum:
                              - january
                              - february
                              - march
                              - april
                              - may
                              - june
                              - july
                              - august
                              - september
                              - october
                              - november
                              - december
                          year:
                            description: Year of balance
                            type: string
                            example: '2019'
                      accounts:
                        type: array
                        items:
                          type: object
                          required:
                            - number
                            - balance
                          properties:
                            name:
                              description: Name of account
                              type: string
                              example: Software Development Costs
                            number:
                              description: Number of account
                              type: string
                              example: '2210'
                            balance:
                              description: Balance of account
                              type: string
                              example: '123.45'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        entityId:
                          type: string
                          example: 5e94d5b63f557b001420bbe2
                        period:
                          type: object
                          properties:
                            month:
                              type: string
                              example: january
                            year:
                              type: string
                              example: '2019'
                        success:
                          type: boolean
                          example: true
        '303':
          description: Redirect
          $ref: '#/components/responses/RedirectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: period is required
                    description: >-
                      Reason for the errors related to incorrect query keys or
                      values that are out of bound
                  name:
                    type: string
                    example: BadRequest
                    description: BadRequest
                  status:
                    type: integer
                    description: The HTTP status code.
                    example: 400
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: PayloadTooLarge
          $ref: '#/components/responses/PayloadTooLarge'
  /api/v1/tags:
    get:
      parameters:
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      tags:
        - Tags
      summary: Get Tags
      operationId: getTags
      description: |
        This API endpoint retrieves tags under a TLC
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/GetTagsPathResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/GetTagBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/tags/attachments:
    put:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTagAttachmentsRequest'
      tags:
        - Tags
      summary: Tag Attachments
      operationId: putTag
      description: >
        This endpoint attaches or detaches a tag to/from a reconciliation. When
        attaching, if the specified tag does not exist, it will be created and
        then attached automatically.
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          $ref: '#/components/responses/PutTagAttachmentsPathBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
  /api/v1/users:
    get:
      parameters:
        - name: page[size]
          in: query
          description: >-
            The number of items to return. If not specified, the API will return
            a default of 500 items, which is the maximum value.
          example: 100
          required: false
          schema:
            type: integer
        - name: page[cursor]
          in: query
          description: >-
            Pagination cursor that indicates the starting position for the next
            set of items
          required: false
          example: 5e94d5b63f557b001420bbe3
          schema:
            type: string
        - name: allowRedirect
          in: query
          description: >-
            If set to true, the API will return a 303 redirect response if the
            response payload is too large. The header `Location` and
            `body.data.url` will also include the URL to the actual resource.
          required: false
          example: true
          schema:
            type: boolean
      tags:
        - Users
      summary: Get Users
      operationId: getUsers
      description: >
        This endpoint returns users who have current or historical shared
        workspace access with the user who the API key belongs to.
      responses:
        '200':
          description: Success
          $ref: '#/components/responses/GetUsersPathResponse'
        '400':
          description: Bad Request
          $ref: '#/components/responses/UsersBadRequest'
        '401':
          description: Unauthorized
          $ref: '#/components/responses/Unauthorized'
x-tagGroups:
  - name: Core
    tags:
      - Checklists
      - Reconciliations
  - name: Checklist Analytics
    tags:
      - Checklist Analytics
      - Reconciliation Analytics
  - name: Auto-Rec
    tags:
      - Depreciations
      - Amortizations
  - name: Audit Trail
    tags:
      - Audit Trail
  - name: Transactions
    tags:
      - Transactions
  - name: Entities
    tags:
      - Entities
  - name: Trial Balance
    tags:
      - Trial Balance
  - name: Tags
    tags:
      - Tags
  - name: Chart Of Accounts
    tags:
      - Chart Of Accounts
  - name: Info
    tags:
      - Info
      - Users
components:
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
  schemas:
    AmortizationModel:
      type: object
      description: Amortization
      properties:
        id:
          description: Id of Amortization
          type: string
          example: 5e94d5b63f557b001420bbe3
        entityId:
          description: Id of company
          type: string
          example: 5e94d5b63f557b001420bbe2
        reconciliationId:
          description: Id of reconciliation
          type: string
          example: 5e94d5b63f557b001420bbe3
        period:
          description: Period of Amortization
          type: object
          properties:
            month:
              description: Month of Amortization
              type: string
              example: january
            year:
              description: Year of Amortization
              type: number
              example: 2023
        assetAccount:
          description: account
          type: object
          properties:
            name:
              description: Name of account
              type: string
              example: Software Development Costs
            number:
              description: Number of account
              type: string
              example: '2210'
        expenseAccount:
          description: Expense account
          type: object
          properties:
            name:
              description: Name of expense account
              type: string
              example: Amortization Expense
            number:
              description: Number of expense account
              type: string
              example: '48'
        vendor:
          description: Name of vendor
          type: string
          example: OfficeTech Supplies Ltd.
        description:
          description: Description of amortization
          type: string
          example: Monthly amortization for software development costs
        invoiceNumber:
          description: Invoice number
          type: string
          example: INV-20230315
        department:
          description: Department
          type: string
          example: Finance Department
        currentExpense:
          description: Current expense
          type: object
          properties:
            amount:
              description: Amount of current expense
              type: number
              example: 153.37
        customFields:
          description: Custom Fields
          type: object
          properties:
            CustomKey1:
              description: >-
                1st custom field. Key is whatever the user has set in the custom
                field settings
              type: string
              example: SD-2023-Mar
            CustomKey2:
              description: >-
                2nd custom field. Key is whatever the user has set in the custom
                field settings
              type: string
              example: SW-78910
        journalEntry:
          description: Journal Entry
          type: object
          properties:
            id:
              description: Id of journal entry
              type: string
              example: 5e94d5b63f557b001420bbe3
            status:
              description: Status of journal entry
              type: string
              example: POSTED
            timestamp:
              description: Timestamp of journal entry status change
              type: string
              example: '2024-03-29T21:36:43.309+00:00'
    Amortizations:
      type: object
      properties:
        data:
          type: array
          description: Array of Amortization Items
          items:
            $ref: '#/components/schemas/AmortizationModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/amortization/items?filter[month]=january&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/amortization/items?filter[month]=january&filter[year]=2023&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    RedirectLargePayload:
      type: object
      description: >-
        Only shows up if user includes a `allowRedirect=true` in the parameters.
        Response payload is too large and has been redirected to a new
        location.  Either follow the header `Location` or the `data.url`
        property in the response body.
      properties:
        data:
          type: object
          properties:
            url:
              type: string
              description: The URL to the new location of the resource.
    AmortizationBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[month]
                    description: The field that caused the error
                  message:
                    type: string
                    example: filter[month] is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    Unauthorized:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: string
          example: Invalid token
          description: >-
            Reason for the error such as incorrect service access, malformed,
            expired or deactivated token.
        name:
          type: string
          example: Unauthorized
          description: Unauthorized
        status:
          type: integer
          description: The HTTP status code.
          example: 401
    PayloadTooLarge:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: string
          example: Response size is greater than 1MB
          description: Reason for the error related to the payload size
        name:
          type: string
          example: PayloadTooLarge
          description: PayloadTooLarge
        status:
          type: integer
          description: The HTTP status code.
          example: 413
    AmortizingReconciliationModel:
      type: object
      description: Reconciliation
      properties:
        id:
          type: string
          description: The unique identifier for the reconciliation.
          example: 5e94d5b63f557b001420bbe1
        entityId:
          type: string
          description: The unique identifier for the entity.
          example: 5e94d5b63f557b001420bbe2
        journalEntryId:
          type: string
          description: The unique identifier for the journal entry.
          example: 5e94d5b63f557b001420bbe3
        journalEntryStatus:
          type: string
          description: The status of the journal entry.
          enum:
            - NOT_POSTED
            - PROCESSING
            - POSTED
            - FAILED
          example: NOT_POSTED
        journalEntryTimestamp:
          type: string
          format: date-time
          description: The timestamp of the journal entry.
          example: '2020-04-13T00:00:00Z'
    AmortizingReconciliations:
      type: object
      properties:
        data:
          type: array
          description: Array of Reconciliation Items
          items:
            $ref: '#/components/schemas/AmortizingReconciliationModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/amortization/reconciliations?filter[reconciliationIds]=615bcdc00000000000020000,615bcdc00000000000020001&filter[journalEntryStatus]=PROCESSING&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/amortization/reconciliations?filter[reconciliationIds]=615bcdc00000000000020000,615bcdc00000000000020001&filter[journalEntryStatus]=PROCESSING&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    AmortizingReconciliationsBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[journalEntryStatus]
                    description: The field that caused the error
                  message:
                    type: string
                    example: >-
                      filter[journalEntryStatus] must be one of [NOT_POSTED,
                      PROCESSING, POSTED, FAILED]
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    AuditTrailModel:
      type: object
      properties:
        _id:
          description: Id of Audit Trail
          type: string
          example: 5e94d5b63f557b001420bbe3
        uri:
          description: URI of request
          type: string
          example: /api/v1/reconciliations
        method:
          description: Http method of request
          type: string
          example: GET
        sourceIp:
          description: Client Ip address of request
          type: string
          example: 123.45.6.78
        meta:
          description: query parameters and status associated with the audit log
          type: object
          properties:
            status:
              description: Status of request
              type: string
              example: '400'
            service:
              description: Service of request
              type: string
              example: Reconciliations
            queryParameters:
              description: Query parameters of request
              type: object
              example:
                filter[modifiedBefore]: '2021-01-01'
                page[size]: '500'
            error:
              description: Error message of request
              type: string
              example: Error message
        userApiKey:
          type: object
          properties:
            _id:
              description: Id of token
              type: string
              example: 5e94d5b63f557b001420bab1
            name:
              description: Name of token
              type: string
              example: API Token
        createdAt:
          description: Date when audit log was created
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
    AuditTrail:
      type: object
      properties:
        data:
          type: array
          description: Array of Audit Trail items
          items:
            $ref: '#/components/schemas/AuditTrailModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/audit-trail?filter[startDate]=2023-11-01&filter[endDate]=2023-12-01&page[size]=12000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/audit-trail?filter[startDate]=2023-11-01&filter[endDate]=2023-12-01&page[size]=12000&page[cursor]=5e94d5b63f557b001420bbe6
    BadRequestAuditTrail:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[startDate]
                    description: The field that caused the error
                  message:
                    type: string
                    example: filter[startDate] must be in iso format
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    GetChartOfAccountsResponse:
      type: object
      properties:
        data:
          type: array
          description: Array of Chart Of Accounts Data
          items:
            type: object
            properties:
              entityId:
                description: Id of entity
                type: string
                example: 5e94d5b63f557b001420bbe3
              accounts:
                description: Accounts data
                type: array
                items:
                  type: object
                  properties:
                    number:
                      type: string
                      example: '35123'
                    name:
                      type: string
                      example: Cash
              error:
                type: string
                description: Error message, populated when the data could not be retrieved
                example: Error retrieving chart of accounts
    Account:
      type: object
      description: Account data
      required:
        - number
        - name
      properties:
        number:
          description: Id of account
          type: string
          example: '35123'
        name:
          description: Name of account
          type: string
          example: Cash
    ChartOfAccounts:
      type: object
      properties:
        data:
          type: array
          description: Array of Chart Of Accounts Data
          items:
            type: object
            required:
              - entityId
              - accounts
            properties:
              entityId:
                description: Id of entity
                type: string
                example: 5e94d5b63f557b001420bbe3
              accounts:
                description: Accounts data
                type: array
                items:
                  $ref: '#/components/schemas/Account'
    UpdateChartOfAccountsResponse:
      type: object
      properties:
        data:
          type: array
          description: Array of Chart Of Accounts Data
          items:
            type: object
            properties:
              entityId:
                description: Id of entity
                type: string
                example: 5e94d5b63f557b001420bbe3
              accounts:
                description: Accounts data
                type: array
                items:
                  type: object
                  properties:
                    number:
                      type: string
                      example: '35123'
                    name:
                      type: string
                      example: Cash
              success:
                type: boolean
                example: true
              error:
                type: string
                description: Error message, populated if success field is false
                example: Failed to validate entity ID
    ChecklistModel:
      type: object
      properties:
        id:
          description: Id of checklist
          type: string
          example: 5e94d5b63f557b001420bbe3
        templateId:
          description: Template Id of checklist
          type: string
          example: 5e94d5b63f557b001420bbe4
        description:
          type: string
          example: >-
            Record accrued property tax. Verify monthly accrual is 1/12th of
            prior year expense.
        entityId:
          type: string
          example: 656abc949ec04a00096b56d7
        period:
          type: object
          properties:
            month:
              description: Month of period
              type: string
              example: december
            year:
              description: Year of period
              type: string
              example: '2023'
        signatures:
          type: array
          items:
            type: object
            properties:
              id:
                description: Id of signature
                type: string
                example: 5e94d5b63f557b001420bbe5
              group:
                type: string
                enum:
                  - preparer
                  - reviewer
                  - unassigned
              signedDate:
                description: Date when checklist was signed
                type: string
                format: date-time
                example: '2021-01-01T00:00:00.000Z'
              signedBy:
                description: Signed by user ID
                type: string
                example: 5e94d5b63f557b001420bba5
              assignedTo:
                description: Assigned user ID
                type: string
                example: 5e94d5b63f557b001420bba5
              dueDate:
                description: Date when checklist is due
                type: string
                format: date-time
                example: '2021-01-01T00:00:00.000Z'
              metaData:
                type: object
                properties:
                  token:
                    description: API token id if this signature was signed off via API
                    type: string
                    example: 5e94d5b63f557b001420bbe6
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of tag
                type: string
                example: non_close
    Checklists:
      type: object
      properties:
        data:
          type: array
          description: Array of Checklists
          items:
            $ref: '#/components/schemas/ChecklistModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe6
    ChecklistBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: checklistId
                    description: The field that caused the error
                  message:
                    type: string
                    example: checklistId is not a valid Mongo ObjectId.
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bounds
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    CreateChecklistItem:
      type: object
      properties:
        companyId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
        folderName:
          type: string
        schedule:
          type: object
          properties:
            period:
              type: object
              properties:
                fiscalYear:
                  type: string
                  pattern: ^[0-9]{4}$
                quarter:
                  type: string
                  pattern: ^\d+$
                month:
                  type: string
                  description: >-
                    any valid month as a string i.e. "january". Ensure the
                    period is valid.
                year:
                  type: string
                  pattern: ^[0-9]{4}$
              required:
                - fiscalYear
                - quarter
                - month
                - year
            type:
              type: string
              enum:
                - NON_RECURRING
                - MONTHLY
                - QUARTERLY
                - ANNUALLY
                - CUSTOM
                - WEEKLY
                - BI_WEEKLY
            frequencyPeriods:
              type: array
              items:
                type: string
                description: any valid month as a string such as "january"
          required:
            - period
            - type
        signatures:
          type: array
          items:
            type: object
            properties:
              group:
                type: string
                enum:
                  - unassigned
                  - reviewer
                  - preparer
                default: unassigned
              dueDateSetting:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - OFFSET
                      - FIXED
                      - DAY_OF_WEEK
                      - DAY_OF_WEEK_BI_WEEKLY
                    description: >-
                      Sets the due date frequency. If set to DAY_OF_WEEK, set
                      the schedule frequency to WEEKLY. IF set to
                      DAY_OF_WEEK_BI_WEEKLY, set the frequency to BI_WEEKLY. 
                  value:
                    type: number
                required:
                  - type
                  - value
              dueDate:
                type: string
                format: date-time
              assignedTo:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              estimatedTime:
                type: string
                format: date-time
        description:
          type: string
        tagIds:
          type: array
          items:
            type: string
        controls:
          type: array
          items:
            type: string
      required:
        - companyId
        - folderName
        - schedule
        - description
    CreateChecklistResponse:
      type: array
      items:
        type: object
        properties:
          tlcId:
            type: string
            example: 65a6d7a9c1cc45001878718e
          folder:
            type: object
            properties:
              id:
                type: string
                example: 65a6d7f7800ba600199caac2
              name:
                type: string
                example: Accounts Payable
              locked:
                type: object
                properties:
                  isLocked:
                    type: boolean
                    example: false
          company:
            type: object
            properties:
              id:
                type: string
                example: 65a6d7f7800ba600199caaa9
              yearEnd:
                type: string
                example: 12/31
          period:
            type: object
            properties:
              month:
                type: string
                example: january
              year:
                type: string
                example: '2024'
          templateId:
            type: string
            example: 67531818facc7d39cbac1ea6
          description:
            type: string
            example: weekly description
          frequency:
            type: integer
            example: 1
          frequencyMonths:
            type: array
            items:
              type: string
          reviewnotes:
            type: array
            items:
              type: string
          signatures:
            type: array
            items:
              type: object
              properties:
                group:
                  type: string
                  example: unassigned
                dueDate:
                  type: string
                  nullable: true
                  example: null
                dueDateSetting:
                  type: object
                  properties:
                    type:
                      type: string
                      example: OFFSET
                    value:
                      type: integer
                      example: 0
                estimatedTime:
                  type: string
                  nullable: true
                  example: null
                assignedTo:
                  type: string
                  nullable: true
                  example: null
                assignedDate:
                  type: string
                  nullable: true
                  example: null
                signedBy:
                  type: string
                  nullable: true
                  example: null
                signedDate:
                  type: string
                  nullable: true
                  example: null
                _id:
                  type: string
                  example: 67531819facc7d39cbac1eb6
                pastDue:
                  type: boolean
                  example: false
                complete:
                  type: boolean
                  example: false
                id:
                  type: string
                  example: 67531819facc7d39cbac1eb6
          sortOrder:
            type: number
            example: 1.7976931348623157e+308
          priority:
            type: number
            example: 1.7976931348623157e+308
          followers:
            type: array
            items:
              type: string
          controls:
            type: array
            items:
              type: string
          createdBy:
            type: string
            example: 65a6d7ee800ba600199caa9f
          lockStatus:
            type: object
            properties:
              isLocked:
                type: boolean
                example: false
          _id:
            type: string
            example: 675318186e1d55556aa8ab6c
          docs:
            type: array
            items:
              type: string
          tags:
            type: array
            items:
              type: string
          createdAt:
            type: string
            format: date-time
            example: '2024-12-06T15:28:25.518Z'
          updatedAt:
            type: string
            format: date-time
            example: '2024-12-06T15:28:25.518Z'
          __v:
            type: integer
            example: 0
          assignees:
            type: array
            items:
              type: string
          pastDue:
            type: boolean
            example: false
          complete:
            type: boolean
            example: false
          readyForReview:
            type: boolean
            example: false
          updated:
            type: string
            format: date-time
            example: '2024-12-06T15:28:25.518Z'
          id:
            type: string
            example: 675318186e1d55556aa8ab6c
    ChecklistPatchRequest:
      type: object
      properties:
        forward:
          type: boolean
          example: true
          description: If provided, only signoff on this signature
        group:
          type: string
          enum:
            - preparer
            - reviewer
            - unassigned
          example: preparer
          description: If provided, only signoff on signatures in this group
        data:
          type: object
          properties:
            companyId:
              description: Id of checklist entity
              type: string
              example: 5e94d5b63f557b001420bbe3
            folderName:
              description: Name of folder
              type: string
              example: Accounts Payable
            description:
              type: string
              example: >-
                Record accrued property tax. Verify monthly accrual is 1/12th of
                prior year expense.
            entityId:
              type: string
              example: 656abc949ec04a00096b56d7
            schedule:
              type: object
              properties:
                period:
                  type: object
                  properties:
                    month:
                      description: Month of period
                      type: string
                      example: december
                    year:
                      description: Year of period
                      type: string
                      example: '2025'
                    fiscalYear:
                      description: Fiscal year of period
                      type: string
                      example: '2025'
                    quarter:
                      description: Quarter of period
                      type: string
                      example: '3'
                type:
                  type: string
                  enum:
                    - NON_RECURRING
                    - MONTHLY
                    - QUARTERLY
                    - ANNUALLY
                    - CUSTOM
                    - WEEKLY
                    - BI_WEEKLY
                  example: NON_RECURRING
                frequencyPeriods:
                  type: array
                  items:
                    type: string
                    description: any valid month as a string i.e. 'december'
            signatures:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Id of signature
                    type: string
                    example: 5e94d5b63f557b001420bbe5
                  group:
                    type: string
                    enum:
                      - preparer
                      - reviewer
                      - unassigned
                  signedDate:
                    description: Date when checklist was signed
                    type: string
                    format: date-time
                    example: '2021-01-01T00:00:00.000Z'
                  signedBy:
                    description: Signed by user ID
                    type: string
                    example: 5e94d5b63f557b001420bba5
                  assignedTo:
                    description: Assigned user ID
                    type: string
                    example: 5e94d5b63f557b001420bba5
                  dueDate:
                    description: Date when checklist is due
                    type: string
                    format: date-time
                    example: '2021-01-01T00:00:00.000Z'
                  dueDateSetting:
                    type: object
                    items:
                      type: string
                      enum:
                        - OFFSET
                        - FIXED
                        - DAY_OF_WEEK
                        - DAY_OF_WEEK_BI_WEEKLY
                  value:
                    description: Index of the day within the given due date frequency type
                    type: number
                    example: 2
                  metaData:
                    type: object
                    properties:
                      token:
                        description: API token id if this signature was signed off via API
                        type: string
                        example: 5e94d5b63f557b001420bbe6
            tagIds:
              type: array
              items:
                type: string
                example: 5e94d5b63f557b001420bbe6
    ChecklistSignature:
      type: object
      properties:
        signatureId:
          type: string
          example: 5e94d5b63f557b001420bbe5
          description: If provided, only signoff on this signature
        userId:
          type: string
          example: 5e94d5b63f557b001420bbe6
          description: If provided, only signoff on signatures assigned to this user
        group:
          type: string
          enum:
            - preparer
            - reviewer
            - unassigned
          example: preparer
          description: If provided, only signoff on signatures in this group
        setSignedOff:
          type: boolean
          example: true
          description: The status of the signature. Defaults to true
    Email:
      description: User email address
      type: string
      example: john.smith@example.com
    User:
      type: object
      properties:
        name:
          type: object
          properties:
            first:
              type: string
              minLength: 1
              example: John
            last:
              type: string
              minLength: 1
              example: Smith
        email:
          $ref: '#/components/schemas/Email'
    ChecklistAnalyticsModel:
      type: object
      properties:
        _id:
          description: Id of checklist
          type: string
          example: 5e94d5b63f557b001420bbe3
        entity:
          type: object
          properties:
            _id:
              description: Id of entity
              type: string
              example: 5e94d5b63f557b001420bbe2
            name:
              description: Name of entity
              type: string
              example: John Smith's company
            workflow:
              description: Workflow of entity
              type: object
              properties:
                _id:
                  description: Id of workflow
                  type: string
                  example: 5e94d5b63f557b001420bbe1
                name:
                  description: Name of workflow
                  type: string
                  example: Close
            details:
              description: User-provided details
              type: string
              example: 'Client ID: 123ABC'
        folder:
          type: object
          properties:
            _id:
              description: Id of folder
              type: string
              example: 5e94d5b63f557b001420bbe4
            name:
              description: Name of folder
              type: string
              example: Accounts Receivable
        description:
          description: Description of checklist item
          type: string
          example: 1200 Accounts Receivable
        itemStatus:
          type: string
          enum:
            - On Track
            - Ready for Review
            - Late (Preparer)
            - Late (Reviewer)
            - Complete (On Time)
            - Complete (Prepared Late)
            - Complete (Reviewed Late)
            - Complete (Prepared & Reviewed Late)
            - Out of Balance
          example: On Track
        frequency:
          enum:
            - Monthly
            - Quarterly
            - Annually
            - Weekly
            - Bi-Weekly
            - Non-Recurring
            - Custom
        frequencyMonths:
          type: array
          items:
            type: string
            example: june
        signatures:
          type: array
          items:
            type: object
            properties:
              assignedTo:
                type: object
                $ref: '#/components/schemas/User'
              signedBy:
                type: object
                $ref: '#/components/schemas/User'
              signedDate:
                description: Date when checklist was signed
                type: string
                format: date-time
              dueDate:
                description: Date when checklist is due
                type: string
                format: date-time
              estimatedTimeMinutes:
                description: Estimated completion time (minutes)
                type: integer
                example: 90
              group:
                type: string
                enum:
                  - preparer
                  - reviewer
                  - unassigned
        reviewNotes:
          type: array
          items:
            type: object
            properties:
              author:
                type: object
                $ref: '#/components/schemas/User'
              assignedTo:
                type: object
                $ref: '#/components/schemas/User'
              message:
                description: Message of note
                type: string
              created:
                description: Date when comment was created
                type: string
                format: date-time
                example: '2021-01-01T00:00:00.000Z'
              comments:
                type: array
                items:
                  type: object
                  properties:
                    author:
                      type: object
                      $ref: '#/components/schemas/User'
                    message:
                      description: Message of comment
                      type: string
                    created:
                      description: Date when comment was created
                      type: string
                      format: date-time
                      example: '2021-01-01T00:00:00.000Z'
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of tag
                type: string
                example: non_close
        updatedAt:
          description: Date when checklist was last updated
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
        period:
          type: object
          properties:
            month:
              description: Month of period
              type: string
              example: december
            year:
              description: Year of period
              type: string
              example: '2023'
    ChecklistAnalytics:
      type: object
      properties:
        data:
          type: array
          description: Array of Checklists
          items:
            $ref: '#/components/schemas/ChecklistAnalyticsModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/analytics/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/analytics/checklists?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe6
    BadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[month]
                    description: The field that caused the error
                  message:
                    type: string
                    example: filter[month] is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    DepreciationModel:
      type: object
      description: Depreciation
      properties:
        id:
          description: Id of depreciation
          type: string
          example: 5e94d5b63f557b001420bbe3
        entityId:
          description: Id of company
          type: string
          example: 5e94d5b63f557b001420bbe2
        reconciliationId:
          description: Id of reconciliation
          type: string
          example: 5e94d5b63f557b001420bbe3
        period:
          description: Period of depreciation
          type: object
          properties:
            month:
              description: Month of depreciation
              type: string
              example: january
            year:
              description: Year of depreciation
              type: number
              example: 2023
        assetAccount:
          description: Asset account
          type: object
          properties:
            name:
              description: Name of asset account
              type: string
              example: Vehicle Fleet
            number:
              description: Number of asset account
              type: string
              example: '1120'
        vendor:
          description: Name of vendor
          type: string
          example: Superior Vehicles Inc.
        description:
          description: Description of depreciation
          type: string
          example: Depreciation of company vehicles
        invoiceNumber:
          description: Invoice number
          type: string
          example: SV-20230115
        department:
          description: Department
          type: string
          example: Logistics
        assetId:
          description: Id of asset
          type: string
          example: 5e94d5b63f557b001420bbe3
        accumulatedDepreciationAccount:
          description: Accumulated depreciation account
          type: object
          properties:
            name:
              description: Name of accumulated depreciation account
              type: string
              example: Accumulated Depreciation - Vehicle Fleet
            number:
              description: Number of accumulated depreciation account
              type: string
              example: '1121'
        expenseAccount:
          description: Expense account
          type: object
          properties:
            name:
              description: Name of expense account
              type: string
              example: Depreciation Expense - Vehicles
            number:
              description: Number of expense account
              type: string
              example: '49'
        customFields:
          description: Custom Fields
          type: object
          properties:
            CustomKey1:
              description: >-
                1st custom field. Key is whatever the user has set in the custom
                field settings
              type: string
              example: '2020-01-10'
            CustomKey2:
              description: >-
                2nd custom field. Key is whatever the user has set in the custom
                field settings
              type: string
              example: VanMaster 3000
        journalEntry:
          description: Journal Entry
          type: object
          properties:
            id:
              description: Id of journal entry
              type: string
              example: 5e94d5b63f557b001420bbe3
            status:
              description: Status of journal entry
              type: string
              example: POSTED
            timestamp:
              description: Timestamp of journal entry status change
              type: string
              example: '2024-03-29T21:36:43.309+00:00'
        currentExpense:
          description: Current expense
          type: object
          properties:
            amount:
              description: Amount of current expense
              type: number
              example: 2500
    Depreciations:
      type: object
      properties:
        data:
          type: array
          description: Array of Depreciation Items
          items:
            $ref: '#/components/schemas/DepreciationModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/depreciation/items?filter[month]=january&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/depreciation/items?filter[month]=january&filter[year]=2023&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    DepreciationBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[month]
                    description: The field that caused the error
                  message:
                    type: string
                    example: filter[month] is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    DepreciatingReconciliationModel:
      type: object
      description: Reconciliation
      properties:
        id:
          type: string
          description: The unique identifier for the reconciliation.
          example: 5e94d5b63f557b001420bbe1
        entityId:
          type: string
          description: The unique identifier for the entity.
          example: 5e94d5b63f557b001420bbe2
        journalEntryId:
          type: string
          description: The unique identifier for the journal entry.
          example: 5e94d5b63f557b001420bbe3
        journalEntryStatus:
          type: string
          description: The status of the journal entry.
          enum:
            - NOT_POSTED
            - PROCESSING
            - POSTED
            - FAILED
          example: NOT_POSTED
        journalEntryTimestamp:
          type: string
          format: date-time
          description: The timestamp of the journal entry.
          example: '2020-04-13T00:00:00Z'
    DepreciatingReconciliations:
      type: object
      properties:
        data:
          type: array
          description: Array of Reconciliation Items
          items:
            $ref: '#/components/schemas/DepreciatingReconciliationModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/depreciation/reconciliations?filter[reconciliationIds]=615bcdc00000000000020000,615bcdc00000000000020001&filter[journalEntryStatus]=PROCESSING&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/depreciation/reconciliations?filter[reconciliationIds]=615bcdc00000000000020000,615bcdc00000000000020001&filter[journalEntryStatus]=PROCESSING&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    DepreciatingReconciliationsBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[journalEntryStatus]
                    description: The field that caused the error
                  message:
                    type: string
                    example: >-
                      filter[journalEntryStatus] must be one of [NOT_POSTED,
                      PROCESSING, POSTED, FAILED]
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    Entity:
      type: object
      description: Example Model
      properties:
        id:
          type: string
          example: 5e94d5b63f557b001420bbe3
        name:
          type: string
          example: TB1 5e94d5b63f557b001420bbe3
        details:
          type: string
          example: 'Client ID: 123ABC'
    GetEntitiesPathResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Entity'
    NotFound:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: string
          example: Target entity not found
          description: >-
            Reason for the error such as incorrect service access, malformed,
            expired or deactivated token.
        name:
          type: string
          example: NotFound
          description: NotFound
        status:
          type: integer
          description: The HTTP status code.
          example: 404
    ReconciliationModel:
      type: object
      description: Base Reconciliation Model
      properties:
        _id:
          description: Id of reconciliation
          type: string
          example: 5e94d5b63f557b001420bbe3
        entity:
          type: object
          properties:
            _id:
              description: Id of entity
              type: string
              example: 5e94d5b63f557b001420bbe2
            name:
              description: Name of entity
              type: string
              example: John Smith's company
            workflow:
              description: Workflow of entity
              type: object
              properties:
                name:
                  description: Name of workflow
                  type: string
                  example: Close
        type:
          enum:
            - SINGLE
            - GROUPED
          example: SINGLE
        name:
          description: Name of reconciliation
          type: string
          example: 1200 Accounts Receivable
        updatedAt:
          description: Date when reconciliation was last updated
          example: '2024-01-01T00:00:00.000Z'
        glBalance:
          description: Balance per general ledger provider
          type: string
          example: '39.8'
        gl:
          type: object
          properties:
            internalId:
              description: Internal id of general ledger
              type: string
              example: '1234'
            internalPeriod:
              description: Internal period of general ledger
              type: string
              example: '334'
            provider:
              description: Provider of general ledger
              enum:
                - TB
                - NETSUITE
                - INTACCT
                - QBO
                - MSDYNAMICS
                - SAP
                - XERO
            TB:
              description: Populated if provider is TB
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
            NETSUITE:
              description: Populated if provider is NETSUITE
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                parentCompany:
                  type: string
                  example: '3'
                reportingBookId:
                  type: string
                  example: '4'
                subsidiaries:
                  description: >-
                    An empty array means the reconciliation is not filtered by
                    subsidiary. All subsidiaries are required
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: name
                      internalId:
                        type: string
                        example: '334'
            INTACCT:
              description: Populated if provider is INTACCT
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                reportingBookId:
                  type: string
                  example: '4'
                adjustmentBookIds:
                  type: array
                  items:
                    type: string
                    example: '1234'
                excludeReportingBook:
                  type: boolean
                  example: true
                locations:
                  type: array
                  items:
                    type: object
                    properties:
                      internalId:
                        type: string
                        example: '1234'
                      name:
                        type: string
                        example: germany
                      parentId:
                        type: string
                        example: '1234'
                      excludeChildLocations:
                        type: boolean
                        example: true
            QBO:
              description: Populated if provider is QBO
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
            MSDYNAMICS:
              description: Populated if provider is MSDYNAMICS
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
            SAP:
              description: Populated if provider is SAP
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                currencyType:
                  type: string
                  example: COMPANY
                ledger:
                  type: string
                  example: 0L
                companyCodes:
                  type: array
                  items:
                    type: string
                    example: '1234'
            XERO:
              description: Populated if provider is XERO
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
        currency:
          type: object
          properties:
            code:
              description: Currency code
              type: string
              example: USD
            symbol:
              description: Currency symbol
              type: string
              example: $
            name:
              description: Currency name
              type: string
              example: US Dollar
            decimalDigits:
              description: Number of decimal digits
              type: integer
              example: 2
        accounts:
          type: array
          description: >-
            Accounts is only used if the type is `GROUPED`. Otherwise, it is an
            empty array
          items:
            type: object
            properties:
              name:
                description: Name of reconciliation
                type: string
                example: 1200 Accounts Receivable
              glBalance:
                description: Balance per general ledger provider
                type: string
                example: '39.8'
        period:
          type: object
          properties:
            month:
              description: Month of period
              type: string
              example: december
            year:
              description: Year of period
              type: string
              example: '2023'
        journalSource:
          description: >-
            Indicates whether the reconciliation uses general ledger or
            subledger balance to reconcile
          type: string
          enum:
            - GENERAL_LEDGER
            - SUB_LEDGER
        templateId:
          description: Template Id of reconciliation
          type: string
          example: 5e94d5b63f557b001420bbe3
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of tag
                type: string
                example: non_close
        signatures:
          type: array
          items:
            type: object
            properties:
              assignedTo:
                type: object
                $ref: '#/components/schemas/User'
              signedBy:
                type: object
                $ref: '#/components/schemas/User'
              signedDate:
                description: Date when reconciliation was signed
                type: string
                format: date-time
              dueDate:
                description: Date when reconciliation is due
                type: string
                format: date-time
              estimatedTimeMinutes:
                description: Estimated completion time (minutes)
                type: integer
                example: 90
              group:
                type: string
                enum:
                  - preparer
                  - reviewer
                  - unassigned
    Reconciliations:
      type: object
      description: Reconciliations Response
      properties:
        data:
          type: array
          description: Array of Reconciliations
          items:
            $ref: '#/components/schemas/ReconciliationModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/reconciliations?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/reconciliations?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    ReconciliationBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: filter[month]
                    description: The field that caused the error
                  message:
                    type: string
                    example: filter[month] is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    ReconciliationSignature:
      type: object
      properties:
        signatureId:
          type: string
          example: 5e94d5b63f557b001420bbe5
          description: If provided, only signoff on this signature
        userId:
          type: string
          example: 5e94d5b63f557b001420bbe6
          description: If provided, only signoff on signatures assigned to this user
        group:
          type: string
          enum:
            - preparer
            - reviewer
            - unassigned
          example: preparer
          description: If provided, only signoff on signatures in this group
        setSignedOff:
          type: boolean
          example: true
          description: The status of the signature. Defaults to true
    ReconcilingItems:
      type: object
      properties:
        sumTotal:
          type: integer
          example: 10
        items:
          type: array
          items:
            type: object
            properties:
              balance:
                description: Id of reconciled item
                type: integer
                example: 10
              description:
                type: string
                example: Reconciled item description
              itemDate:
                type: string
                format: date-time
                example: '2021-01-01T00:00:00.000Z'
    Reconciliation_AnalyticsModel:
      type: object
      description: Reconciliation
      properties:
        _id:
          description: Id of reconciliation
          type: string
          example: 5e94d5b63f557b001420bbe3
        entity:
          type: object
          properties:
            _id:
              description: Id of entity
              type: string
              example: 5e94d5b63f557b001420bbe2
            name:
              description: Name of entity
              type: string
              example: John Smith's company
            workflow:
              description: Workflow of entity
              type: object
              properties:
                _id:
                  description: Id of workflow
                  type: string
                  example: 5e94d5b63f557b001420bbe1
                name:
                  description: Name of workflow
                  type: string
                  example: Close
            details:
              description: User-provided details
              type: string
              example: 'Client ID: 123ABC'
        folder:
          type: object
          properties:
            _id:
              description: Id of folder
              type: string
              example: 5e94d5b63f557b001420bbe4
            name:
              description: Name of folder
              type: string
              example: Accounts Receivable
        spreadsheet:
          type: object
          properties:
            link:
              description: Link to supporting document
              type: string
              example: >-
                https://share.system.floqast.app/resources/v1/folders/661c582d7ea90b6c8a246438/files/1503416963754
        threshold:
          type: object
          properties:
            rules:
              description: Rules for threshold
              type: array
              items:
                type: object
                properties:
                  type:
                    description: Type of rule
                    type: string
                    example: fixed
                  value:
                    description: Numeric value of rule
                    type: number
                    example: 1
            operator:
              description: Operator for threshold
              type: string
              example: or
            isDefault:
              description: Indicates if threshold is default
              type: boolean
              example: true
        frequency:
          enum:
            - Monthly
            - Quarterly
            - Annually
            - Non-Recurring
            - Custom
        frequencyMonths:
          type: array
          items:
            type: string
            example: june
        type:
          enum:
            - SINGLE
            - GROUPED
          example: SINGLE
        name:
          description: Name of reconciliation
          type: string
          example: 1200 Accounts Receivable
        sourceBalance:
          description: Trial balance or reconciled balance
          type: string
          example: '30000'
        glBalance:
          description: Balance per general ledger provider
          type: string
          example: '39.8'
        gl:
          type: object
          properties:
            internalId:
              description: Internal id of general ledger
              type: string
              example: '1234'
            internalPeriod:
              description: Internal period of general ledger
              type: string
              example: '334'
            provider:
              description: Provider of general ledger
              enum:
                - TB
                - NETSUITE
                - INTACCT
                - QBO
                - MSDYNAMICS
                - SAP
                - XERO
            TB:
              description: Populated if provider is TB
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
            NETSUITE:
              description: Populated if provider is NETSUITE
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                parentCompany:
                  type: string
                  example: '3'
                reportingBookId:
                  type: string
                  example: '4'
                subsidiaries:
                  description: >-
                    An empty array means the reconciliation is not filtered by
                    subsidiary. All subsidiaries are required
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: name
                      internalId:
                        type: string
                        example: '334'
            INTACCT:
              description: Populated if provider is INTACCT
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                reportingBookId:
                  type: string
                  example: '4'
                adjustmentBookIds:
                  type: array
                  items:
                    type: string
                    example: '1234'
                excludeReportingBook:
                  type: boolean
                  example: true
                locations:
                  type: array
                  items:
                    type: object
                    properties:
                      internalId:
                        type: string
                        example: '1234'
                      name:
                        type: string
                        example: germany
                      parentId:
                        type: string
                        example: '1234'
                      excludeChildLocations:
                        type: boolean
                        example: true
            QBO:
              description: Populated if provider is QBO
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
            MSDYNAMICS:
              description: Populated if provider is MSDYNAMICS
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
            SAP:
              description: Populated if provider is SAP
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
                currencyType:
                  type: string
                  example: COMPANY
                ledger:
                  type: string
                  example: 0L
                companyCodes:
                  type: array
                  items:
                    type: string
                    example: '1234'
            XERO:
              description: Populated if provider is XERO
              type: object
              properties:
                internalPeriod:
                  type: string
                  example: '334'
                internalId:
                  type: string
                  example: '1234'
        subledger:
          type: object
          properties:
            balance:
              type: string
              example: '39.8'
        journalSource:
          description: >-
            Indicates whether the reconciliation uses general ledger or
            subledger balance to reconcile
          type: string
          enum:
            - GENERAL_LEDGER
            - SUB_LEDGER
        reconcilingItems:
          type: object
          $ref: '#/components/schemas/ReconcilingItems'
        difference:
          description: gl balance - source balance - reconciling items
          type: string
          example: '-149964.2'
        currency:
          type: object
          properties:
            code:
              description: Currency code
              type: string
              example: USD
            symbol:
              description: Currency symbol
              type: string
              example: $
            name:
              description: Currency name
              type: string
              example: US Dollar
            decimalDigits:
              description: Number of decimal digits
              type: integer
              example: 2
        updatedAt:
          description: Date when reconciliation was last updated
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
        period:
          type: object
          properties:
            month:
              description: Month of period
              type: string
              example: december
            year:
              description: Year of period
              type: string
              example: '2023'
        itemStatus:
          type: string
          enum:
            - On Track
            - Ready for Review
            - Late (Preparer)
            - Late (Reviewer)
            - Complete (On Time)
            - Complete (Prepared Late)
            - Complete (Reviewed Late)
            - Complete (Prepared & Reviewed Late)
            - Out of Balance
            - Redo
          example: On Track
        lastBalanceChange:
          description: Date when reconciliation balance was last changed
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of tag
                type: string
                example: non_close
        signatures:
          type: array
          items:
            type: object
            properties:
              assignedTo:
                type: object
                $ref: '#/components/schemas/User'
              signedBy:
                type: object
                $ref: '#/components/schemas/User'
              signedDate:
                description: Date when reconciliation was signed
                type: string
                format: date-time
              dueDate:
                description: Date when reconciliation is due
                type: string
                format: date-time
              estimatedTimeMinutes:
                description: Estimated completion time (minutes)
                type: integer
                example: 90
              group:
                type: string
                enum:
                  - preparer
                  - reviewer
                  - unassigned
        accounts:
          type: array
          description: >-
            Accounts is only used if the type is `GROUPED`. Otherwise, it is an
            empty array
          items:
            type: object
            properties:
              name:
                description: Name of reconciliation
                type: string
                example: 1200 Accounts Receivable
              sourceBalance:
                description: Trial balance or reconciled balance
                type: string
                example: '30000'
              glBalance:
                description: Balance per general ledger provider
                type: string
                example: '39.8'
              reconcilingItems:
                type: object
                $ref: '#/components/schemas/ReconcilingItems'
              difference:
                description: gl balance - source balance - reconciling items
                type: string
                example: '-149964.2'
        reviewNotes:
          type: array
          items:
            type: object
            properties:
              author:
                type: object
                $ref: '#/components/schemas/User'
              assignedTo:
                type: object
                $ref: '#/components/schemas/User'
              message:
                description: Message of note
                type: string
              created:
                description: Date when comment was created
                type: string
                format: date-time
                example: '2021-01-01T00:00:00.000Z'
              comments:
                type: array
                items:
                  type: object
                  properties:
                    author:
                      type: object
                      $ref: '#/components/schemas/User'
                    message:
                      description: Message of comment
                      type: string
                    created:
                      description: Date when comment was created
                      type: string
                      format: date-time
                      example: '2021-01-01T00:00:00.000Z'
    Reconciliation_Analytics:
      type: object
      properties:
        data:
          type: array
          description: Array of Reconciliation Analytics
          items:
            $ref: '#/components/schemas/Reconciliation_AnalyticsModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/analytics/reconciliations?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: Pagination link pointing to the next page
              type: string
              example: >-
                /api/v1/analytics/reconciliations?filter[month]=march&filter[year]=2023&page[size]=1000&page[cursor]=63b88f2cb1f05200179e7857
    Subledger:
      type: object
      properties:
        data:
          type: array
          description: Array of Subledger Data
          items:
            type: object
            required:
              - reconciliationId
              - subledger
            properties:
              reconciliationId:
                description: Id of reconciliation
                type: string
                example: 5e94d5b63f557b001420bbe3
              subledger:
                description: Subledger data
                type: object
                required:
                  - balance
                  - currency
                properties:
                  balance:
                    description: >-
                      Balance of subledger. The amount may include non-numeric
                      symbols, a minus sign for negatives, and a period or comma
                      for decimals.
                    type: string
                    example: '1001.99'
                  currency:
                    description: Currency of subledger
                    type: string
                    example: USD
                  locale:
                    description: Locale of balance. Defaults to en-US
                    type: string
                    example: en-US
    SubledgerTransaction:
      type: object
      properties:
        data:
          type: object
          required:
            - reconciliationId
            - ledgerType
            - transactions
          properties:
            reconciliationId:
              description: Id of reconciliation
              type: string
              example: 5e94d5b63f557b001420bbe3
            ledgerType:
              type: string
              description: >-
                Indicates whether every transaction uses general ledger or
                subledger
              enum:
                - SUB_LEDGER
            upsert:
              type: boolean
              description: >-
                If true, upserts the provided subledger transactions, only
                overwriting transactions with a matching transactionId. If false
                or absent, replaces existing subledger transactions for this
                reconciliation prior to inserting the provided subledger
                transactions.
            transactions:
              type: array
              description: Array of transactions
              items:
                required:
                  - transactionId
                  - transactionDate
                  - accountType
                  - accountingDate
                  - amount
                  - currency
                properties:
                  transactionId:
                    description: Unique ERP Identification number
                    type: string
                    example: TX12848472728
                  transactionDate:
                    description: Date of transaction in ISO 8601 format
                    type: string
                    format: date
                    example: '2020-04-13'
                  accountType:
                    type: string
                    description: Type of account
                    enum:
                      - Accounts Receivable
                      - Accounts Payable
                      - Fixed Assets
                      - Accumulated Depreciation
                      - Inventory
                      - Cash
                      - Sales
                      - Purchase
                      - Payroll
                      - Intercompany
                      - Leases
                      - Other
                  accountingDate:
                    description: >-
                      Is the posting date - It determines when the transaction
                      will be included in financial statements in ISO 8601
                      format
                    type: string
                    format: date
                    example: '2020-04-13'
                  amount:
                    description: >-
                      Dollar amount associated with this transaction. The amount
                      may include non-numeric symbols, a minus sign for
                      negatives, and a period or comma for decimals.
                    type: string
                    example: '15821.56'
                  currency:
                    description: Currency of transaction
                    type: string
                    example: USD
                  customer:
                    description: Debt or credit to or from a customer
                    type: string
                    example: PepsiCo
                  vendor:
                    description: Debt or credit to or from a vendor
                    type: string
                    example: Salesforce
                  assetNumber:
                    description: Unique asset identification number
                    type: string
                    example: FA101
                  recordType:
                    type: string
                    description: >-
                      Type of transaction hitting the subledger like: Credit
                      memo, Journal entry, Payment, Invoice, etc.
                    example: Credit memo
                  leaseId:
                    description: Unique lease identification number
                    type: string
                    example: LSE1001
                  dueDate:
                    description: Due date of transaction.
                    type: string
                    format: date
                    example: '2020-05-13'
                  description:
                    description: Description of transaction
                    type: string
                    example: Credit memo for returned items
                  subsidiary:
                    description: entity Name
                    type: string
                    example: PepsiCo North America
                  referenceNumber:
                    description: Unique identifier
                    type: string
                    example: REF-485769
                  quantity:
                    description: Numeric value for quantity
                    type: string
                    example: '17'
                  unitValue:
                    description: Dollar price per unit
                    type: string
                    example: '930.68'
                  clearingIndicator:
                    description: To show if an amount has cleared the bank or not
                    type: string
                    enum:
                      - CLEARED
                      - OPEN
                  assetType:
                    description: >-
                      Type of asset/category of asset including Computers,
                      Furniture, Software, etc...
                    type: string
                    example: Computers
                  leaseType:
                    type: string
                    enum:
                      - FINANCIAL
                      - OPERATING
                  tradingPartner:
                    description: >-
                      In relation to related partities. Unique identification of
                      those trading parties.
                    type: string
                    example: TP-001
                  locale:
                    description: Locale of balance. Defaults to en-US
                    type: string
                    example: en-US
    GLTransaction:
      type: object
      properties:
        data:
          type: object
          required:
            - reconciliationId
            - account
            - ledgerType
            - period
            - transactions
          properties:
            account:
              description: ID of gl account transactions are mapped to
              type: string
              example: '1000'
            ledgerType:
              description: >-
                Indicates whether every transaction uses general ledger or
                subledger
              type: string
              enum:
                - GENERAL_LEDGER
            period:
              description: Posting period of transaction
              type: object
              required:
                - month
                - year
              properties:
                month:
                  description: Posting period month of transaction
                  type: string
                  example: march
                  enum:
                    - january
                    - february
                    - march
                    - april
                    - may
                    - june
                    - july
                    - august
                    - september
                    - october
                    - november
                    - december
                year:
                  description: Posting period year of transaction
                  type: string
                  example: '2024'
            upsert:
              type: boolean
              description: >-
                If true, upserts the provided GL transactions, only overwriting
                transactions with a matching transactionId. If false or absent,
                replaces existing GL transactions for this reconciliation prior
                to inserting the provided GL transactions.
            transactions:
              description: Array of transactions
              type: array
              items:
                required:
                  - id
                  - date
                  - createDate
                  - amount
                  - currency
                properties:
                  id:
                    description: Unique ERP Identification number
                    type: string
                    example: TX12848472728
                  date:
                    description: Date transaction took place in ISO 8601 format
                    type: string
                    format: date
                    example: '2020-04-13'
                  createDate:
                    description: >-
                      Date transaction was entered into system in ISO 8601
                      format
                    type: string
                    format: date
                    example: '2020-04-13'
                  accountingDate:
                    description: Posting date transaction is applied in ISO 8601 format
                    type: string
                    format: date
                    example: '2020-04-13'
                  amount:
                    description: >-
                      Amount associated with this transaction. The amount may
                      include symbols that are parsed by the JS
                      Intl.NumberFormat function using the information on the
                      currency object property.
                    type: string
                    example: '15821.56'
                  fxAmount:
                    description: >-
                      Foreign amount associated with this transaction. The
                      amount may include symbols that are parsed by the JS
                      Intl.NumberFormat function using the information on the
                      currency object property.
                    type: string
                    example: '15821.56'
                  type:
                    description: Type of transaction
                    type: string
                    example: Paycheck
                  posting:
                    description: >-
                      Identifier whether the transaction is posted to the
                      accounting balances
                    type: boolean
                  reportingBook:
                    description: Reporting book mapped to transaction
                    type: string
                    example: ACCRUAL
                  adjustmentBook:
                    description: Adjustment book mapped to transaction
                    type: string
                    example: ADJ_BOOK1
                  generalRate:
                    description: Type of exchange rate applied to transaction
                    type: string
                    enum:
                      - currentRate
                      - historicalRate
                      - averageRate
                  memo:
                    description: Memo added to transaction
                    type: string
                    example: Example memo
                  currency:
                    description: Currency of transaction
                    type: object
                    required:
                      - code
                    properties:
                      code:
                        description: Corresponding ISO code to represent currency format
                        type: string
                        example: USD
                      name:
                        description: Name of currency
                        type: string
                        example: US Dollars
                      symbol:
                        description: Printed symbol associated with currency
                        type: string
                        example: $
                  supplementalGroup:
                    description: >-
                      Mapped subsidiary/location/legal entity associated with
                      transaction
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        description: ID of supplementalGroup
                        type: string
                        example: '100'
                      name:
                        description: Name of supplementalGroup
                        type: string
                        example: CUBIT USA
                  entity:
                    description: Entity(ies) associated with transaction
                    type: array
                    items:
                      required:
                        - id
                        - type
                      properties:
                        id:
                          description: ID of entity
                          type: string
                          example: '1471'
                        type:
                          description: Type of entity
                          type: string
                          example: Vendor
                        name:
                          description: Name of entity
                          type: string
                          example: AVI Consulting
                  department:
                    description: Department associated with transaction
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        description: ID of department
                        type: string
                        example: '4'
                      name:
                        description: Name of department
                        type: string
                        example: Engineering
                  project:
                    description: Project associated with transaction
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        description: ID of project
                        type: string
                        example: '100574'
                      name:
                        description: Name of project
                        type: string
                        example: Conceptual Design
                  class:
                    description: Class associated with transaction
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        description: ID of class
                        type: string
                        example: '10'
                      name:
                        description: Name of class
                        type: string
                        example: Accessories
                  locale:
                    description: Locale of balance. Defaults to en-US
                    type: string
                    example: en-US
                  startDate:
                    description: Start date of transaction in ISO 8601 format
                    type: string
                    format: date
                    example: '2020-04-13'
                  endDate:
                    description: End date of transaction in ISO 8601 format
                    type: string
                    format: date
                    example: '2020-04-13'
                  usefulLife:
                    description: Useful life of transaction. Measured in months
                    type: string
                    example: '5'
    SubledgerBadRequest:
      type: object
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: reconciliationId
                    description: The field that caused the error
                  message:
                    type: string
                    example: reconciliationId is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    GLBadRequest:
      type: object
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: account
                    description: The field that caused the error
                  message:
                    type: string
                    example: account is required
                    description: The error message
          description: >-
            Reason(s) for the errors related to incorrect query keys or values
            that are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    Status:
      type: object
      properties:
        _id:
          type: string
          description: the Status ID
          example: 5e94d5b63f557b001420bbe3
        status:
          type: string
          enum:
            - PENDING
            - SUCCESS
            - FAILED
          description: The status of the data being saved to our DB
        errorList:
          type: array
          items:
            type: object
            properties:
              reconciliationId:
                description: Id of reconciliation
                type: string
                example: 5e94d5b63f557b001420bbe3
              message:
                description: A message about the error
                type: string
                example: Not a valid reconciliationId
    Tag:
      type: object
      description: Example Model
      properties:
        id:
          type: string
          example: 5e94d5b63f557b001420bbe3
        name:
          type: string
          example: journal_entry
        type:
          type: string
          example: CUSTOM
        category:
          type: string
          example: GENERAL
        tlcId:
          type: string
          example: 5e94d5b63f557b001420bbe3
        deactivationTime:
          type: string
          nullable: true
          example: null
    GetTagBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: string
          example: Invalid tag name
          description: Reason for the errors related to incorrect tag name
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    PutTagAttachmentsRequest:
      type: object
      description: Example Model
      required:
        - system
        - systemId
        - action
        - name
      properties:
        system:
          type: string
          enum:
            - RECONCILIATIONS
            - CHECKLISTS
          example: RECONCILIATIONS
          description: >-
            The name of the system receiving the tag (e.g., Reconciliations,
            Checklists).
        systemId:
          type: string
          example: 5e94d5b63f557b001420bbe3
          description: >-
            The unique identifier for the system designated to receive the tag
            (e.g., Reconciliation ID, Checklist ID).
        action:
          type: string
          enum:
            - ATTACH
            - DETACH
          example: ATTACH
          description: Specifies whether to attach or detach a tag from the system.
        name:
          type: string
          example: low_risk
          description: Name of the tag
    PutTagAttachmentsBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: string
          example: Invalid tag name
          description: Reason for the errors related to incorrect tag name
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
    GetUsersModel:
      properties:
        id:
          description: Id of the user
          type: string
          example: 5e94d5b63f557b001420bbe3
          pattern: ^[a-f\d]{24}$
        name:
          description: The full name of the user
          type: string
          example: First Last
        email:
          description: The email address of the user
          type: string
          example: email@example.com
        accountStatus:
          type: string
          description: The account status of the user
          example: active
          enum:
            - pending
            - active
            - deactivated
        accountRole:
          description: The role of the user across FloQast
          type: object
          example:
            id: 5e94d5b63f557b001420bbe3
            name: USER
          properties:
            id:
              description: Role Id
              type: string
              example: 5e94d5b63f557b001420bbe3
            name:
              description: Role Name
              type: string
              example: USER
        auditProjectRole:
          description: The role of the user in Audit Projects
          type: object
          example:
            id: 5e94d5b63f557b001420bbe3
            name: USER
          properties:
            id:
              description: Role Id
              type: string
              example: 5e94d5b63f557b001420bbe3
            name:
              description: Role Name
              type: string
              example: USER
          nullable: true
        lastLoginDate:
          description: The date and time the user last logged into the FloQast application
          type: string
          example: '2024-06-01T20:20:39.000Z'
          nullable: true
    GetUsers:
      type: object
      properties:
        data:
          type: array
          description: Array of Users
          items:
            $ref: '#/components/schemas/GetUsersModel'
        links:
          type: object
          properties:
            self:
              description: Link to self
              type: string
              example: >-
                /api/v1/users&page[size]=100&page[cursor]=5e94d5b63f557b001420bbe3
            next:
              description: >-
                Pagination link pointing to the next page. If there are no more
                items, this field will be null.
              type: string
              nullable: true
              example: >-
                /api/v1/users?page[size]=100&page[cursor]=63b88f2cb1f05200179e7857
    UsersBadRequest:
      type: object
      additionalProperties: true
      minProperties: 1
      description: >-
        The Problem Details JSON Object
        [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      properties:
        message:
          type: object
          properties:
            errors:
              type: array
              description: Array of errors
              items:
                properties:
                  field:
                    type: string
                    example: page[size]
                    description: The query key that is incorrect
                  message:
                    type: string
                    example: page[size] must be a number
                    description: Reason for the error
          description: >-
            Reason for the errors related to incorrect query keys or values that
            are out of bound
        name:
          type: string
          example: BadRequest
          description: BadRequest
        status:
          type: integer
          description: The HTTP status code.
          example: 400
  responses:
    AmortizationResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Amortizations'
    RedirectResponse:
      description: RedirectResponse
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RedirectLargePayload'
    AmortizationBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AmortizationBadRequest'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    PayloadTooLarge:
      description: PayloadTooLarge
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayloadTooLarge'
    AmortizingReconciliationsResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AmortizingReconciliations'
    AmortizingReconciliationsBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AmortizingReconciliationsBadRequest'
    BadRequestAuditTrail:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestAuditTrail'
    ChecklistBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChecklistBadRequest'
    BadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    DepreciationResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Depreciations'
    DepreciationBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DepreciationBadRequest'
    DepreciatingReconciliationsResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DepreciatingReconciliations'
    DepreciatingReconciliationsBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DepreciatingReconciliationsBadRequest'
    NotFound:
      description: NotFound
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    GetMePathResponse:
      description: Success
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  apiKeyId:
                    description: id of the API token
                    type: string
                    example: 5e94d5b63f557b001420bbe3
                  userId:
                    description: ID of the user
                    type: string
                    example: 5e94d5b63f557b001420bbe4
    ReconciliationBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ReconciliationBadRequest'
    GetTagsPathResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Tag'
    GetTagBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTagBadRequest'
    PutTagAttachmentsPathBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutTagAttachmentsBadRequest'
    GetUsersPathResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetUsers'
    UsersBadRequest:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UsersBadRequest'
security:
  - x-api-key: []
