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

# Preview the current window's Flux 10 report

> Build the Flux 10 Report.xml for the current reporting window without storing or sending it.

Builds the report from everything recorded in the current window so far, so you can check what will be filed before the window closes. Choose the report kind with `kind` (required) and the stream with `role` (defaults to `seller`).

The report is checked against the PPF rules before it is returned. A report that would be rejected answers `422` with the issues found, and an empty window answers `404`.

<Note>
  Nothing is stored or submitted. The preview does not create a report period, so it never appears in the periods list.
</Note>


## OpenAPI

````yaml GET /apps/gov-fr/v1/reports/{siren}/preview
openapi: 3.1.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    Set of end-points for the France app, including lookups against the PPF
    Annuaire (French e-invoicing directory).
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: France Service API
  version: 0.1.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - InvopopAuth: []
paths:
  /apps/gov-fr/v1/reports/{siren}/preview:
    get:
      summary: Preview the current window's Flux 10 report
      description: |-
        Builds the Flux 10 `Report.xml` for everything recorded in the
        current reporting window so far and returns it. Nothing is stored or
        sent. The report is checked against the PPF rules as before sending:
        a report that would be rejected answers `422` with the issues found.
      operationId: previewReport
      parameters:
        - $ref: '#/components/parameters/ReportsSIREN'
        - name: kind
          in: query
          required: true
          description: '`tx` for transactions, `py` for payments.'
          schema:
            type: string
            enum:
              - tx
              - py
        - name: role
          in: query
          required: false
          description: Stream to preview. Defaults to `seller`.
          schema:
            type: string
            enum:
              - seller
              - buyer
      responses:
        '200':
          description: The Flux 10 XML body, served as `application/xml`.
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Nothing is recorded in the current window.
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ReportsSIREN:
      name: siren
      in: path
      required: true
      description: |-
        SIREN of the reporting party. The party's `org.Party` silo entry ID
        is still accepted in its place, but will be phased out.
      schema:
        type: string
        example: '123456789'
  responses:
    BadRequest:
      description: The request is malformed or missing required parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing siren parameter
    Unauthorized:
      description: Missing or invalid authentication token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing enrollment
    UnprocessableEntity:
      description: |-
        The request is well-formed but cannot be processed — for example
        the agreement PDF cannot be generated because the draft party is
        incomplete, or the uploaded signature failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: draft party is missing signer details
    InternalServerError:
      description: An unexpected server-side error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal server error
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable description of the error.
          example: missing siren parameter
  securitySchemes:
    InvopopAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        Authenticate using a valid Invopop enrollment token in the `Bearer`
        scheme.

        Example: `Authorization: Bearer <token>`

````

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