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

# Write findings for an exception's lines

> Upserts one finding per record of the exception — the note, status and suggested action your reviewers see on each open line. Findings are keyed on (exception, record), so sending the same record again replaces its finding. Up to 1,000 findings per request; each is validated independently and the response lists the rejected ones, so a partial batch still writes. Records already matched by rules do not need findings — write them for the lines that are left.



## OpenAPI

````yaml /openapi.json put /reconciliation_exceptions/{id}/findings
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /reconciliation_exceptions/{id}/findings:
    put:
      summary: Write findings for an exception's lines
      description: >-
        Upserts one finding per record of the exception — the note, status and
        suggested action your reviewers see on each open line. Findings are
        keyed on (exception, record), so sending the same record again replaces
        its finding. Up to 1,000 findings per request; each is validated
        independently and the response lists the rejected ones, so a partial
        batch still writes. Records already matched by rules do not need
        findings — write them for the lines that are left.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FindingsUpsertRequest'
      responses:
        '200':
          description: Findings written (possibly with per-finding errors)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindingsUpsertResult'
        '401':
          description: Unauthorized
        '404':
          description: Exception not found
        '422':
          description: '`findings` is not a list, or has more than 1,000 items'
components:
  schemas:
    FindingsUpsertRequest:
      type: object
      required:
        - findings
      properties:
        findings:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/FindingInput'
    FindingsUpsertResult:
      type: object
      description: >-
        Each finding is validated on its own, so a batch succeeds partially:
        `upserted` counts the rows written and `errors` names the rejected ones
        by position.
      properties:
        upserted:
          type: integer
        errors:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                description: Position of the rejected finding in the request's `findings`.
              record_id:
                type: string
              external_id:
                type: string
              message:
                type: string
    FindingInput:
      type: object
      required:
        - note
      description: >-
        One line of the review as your engine sees it. Identify the record by
        `record_id` or by `external_id` (resolved within the exception's data
        stream). `suggestion.record_ids` may be record ids or external ids from
        either side of the reconciliation; unknown ids reject the finding.
      properties:
        record_id:
          type: string
          description: The record's id. Required unless `external_id` is given.
        external_id:
          type: string
          description: >-
            The record's external id within the exception's data stream.
            Rejected when it matches more than one record.
        looks_right:
          type: boolean
          default: false
          description: >-
            `true` when the line is correct as it stands and only needs the
            note. These lines can be confirmed in bulk.
        note:
          type: string
          description: >-
            One or two plain sentences: what happened to this line and what was
            checked.
        category:
          type: string
          nullable: true
          description: >-
            A short label for the kind of line, in your own words (e.g.
            `back-billing`, `monthly minimum`).
        suggestion:
          type: object
          description: >-
            What Approve applies. Omit, or use kind `none`, when there is
            nothing to apply.
          properties:
            kind:
              type: string
              enum:
                - match
                - adjust
                - none
              default: none
              description: >-
                `match`: pair the line with `record_ids` (must balance).
                `adjust`: pair them and plug the remaining gap with an
                adjustment carrying `reason`. `none`: nothing to apply.
            record_ids:
              type: array
              items:
                type: string
              description: >-
                Every other record of the proposed match, either side, as record
                ids or external ids.
            reason:
              type: string
              description: >-
                For `adjust`: why a gap remains. Becomes the adjustment's
                description.
            text:
              type: string
              description: The sentence shown next to the Approve button.
            difference_cents:
              type: integer
              description: >-
                Informational. Recomputed from the records as |side A| − |side
                B| whenever `record_ids` is given; only kept as sent for a
                one-sided `adjust`.
        evidence:
          type: array
          description: >-
            Quotes that back the note. A quote with a `url` marks the line as
            checked against a document in the review.
          items:
            type: object
            required:
              - quote
            properties:
              quote:
                type: string
              source:
                type: string
                nullable: true
                description: >-
                  Where the quote is from, e.g. `Services Agreement, Exhibit B
                  p.19`.
              url:
                type: string
                nullable: true
                description: >-
                  An http(s) link to the document — for a file in End Close, the
                  file's `url`. End `#page=N` to open a PDF at that page: the
                  review drawer labels the link “Open p.N” and shows the
                  document inline. Other schemes are dropped.
        precedent:
          type: string
          nullable: true
          description: How the same line was handled before, in one sentence.
        labels:
          type: object
          additionalProperties: true
          description: >-
            Free-form markers your reviewers care about, e.g.
            `{"carried_forward": true, "colour": "peach"}`. The review page
            reads `colour`, `colour_cell` and `carried_forward`; anything else
            is stored and returned untouched.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.