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

# Open a submission

> Open a reporting batch for a reporting year.

<Note>
  Opens a submission for the reporting year you specify. If that year has already been reported, this opens a correction of it instead. You cannot open a new submission while an earlier one for the same year is still being processed.
</Note>


## OpenAPI

````yaml post /reports/crs/v1/submissions
openapi: 3.1.0
info:
  title: CRS REST API
  version: 0.0.1
servers:
  - url: https://api.rrc.dev.finventi.com
    description: Development
  - url: https://api.rrc.finventi.com
    description: Production
security:
  - bearer-jwt: []
tags:
  - name: CRS REST API
    description: >-
      REST API for submitting and correcting CRS/DAC2 account data. Open a
      submission for a reporting year, push the reportable accounts under its
      id, then submit it to the tax authority.
paths:
  /reports/crs/v1/submissions:
    post:
      tags:
        - CRS REST API
      summary: Open a submission
      description: >-
        Opens a reporting batch for the given year and returns its id, used to
        scope subsequent account pushes. If nothing has been reported for the
        year yet this opens a submission; if the year has already been reported
        it opens a correction of it. Conflicts while an earlier round for the
        same year is still being processed.


        **Webhook:** optionally pass a `webhookUrl`. Once the submission
        finishes processing, it is called with a POST carrying a JSON body:


        ```

        {"submissionId": "<submission id>", "status": "ACCEPTED" | "REJECTED"}

        ```


        Calls originate from the following IP addresses; whitelist them to
        receive the webhook.


        ```

        Test:       34.78.184.35, 35.195.129.148, 34.76.178.43, 88.119.208.29

        Production: 130.211.66.226, 35.205.15.220, 104.155.69.28, 88.119.208.29

        ```
      operationId: createSubmission
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrsSubmissionRequest'
            example:
              reportingYear: 2025
        required: true
      responses:
        '201':
          description: Submission or correction opened
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrsSubmissionResponse'
              example:
                submissionId: 6f1b0c1e-6c0b-4c39-9a2e-1d9d2f0f7a11
                kind: SUBMISSION
        '409':
          description: A submission or correction for this year is already in progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrsSubmissionResponse'
components:
  schemas:
    CrsSubmissionRequest:
      type: object
      description: Open a CRS submission for a reporting year
      properties:
        reportingYear:
          type: integer
          format: int32
          description: >-
            Calendar year the accounts are reported for. If nothing has been
            reported for this year yet a submission is opened; if the year has
            already been reported a correction is opened instead.
          example: 2025
          maximum: 2100
          minimum: 2016
        webhookUrl:
          type: string
          description: >-
            Optional webhook URL. When the submission finishes processing it is
            called with a POST carrying the final status: ACCEPTED or REJECTED
            (the tax authority's validation result for the submission).
          example: https://example.com/crs/webhook
          maxLength: 1024
          minLength: 0
      required:
        - reportingYear
    CrsSubmissionResponse:
      type: object
      description: Handle of an opened submission
      properties:
        submissionId:
          type: string
          description: Submission id, scopes all subsequent calls
        kind:
          $ref: '#/components/schemas/CrsSubmissionKind'
          description: >-
            Whether the reporting year was opened as a submission or as a
            correction of it
      required:
        - kind
        - submissionId
    CrsSubmissionKind:
      type: string
      description: >-
        SUBMISSION reports accounts for a year not yet reported; CORRECTION
        amends what was already reported for it.
      enum:
        - SUBMISSION
        - CORRECTION
  securitySchemes:
    bearer-jwt:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: >-
            https://auth.sandbox.finventi.com/realms/sti-connector/protocol/openid-connect/token
          scopes: {}

````