> ## 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.

# Correct GOBL envelope

> Correct or determine the correction options for a GOBL Envelope (not Object!)

Use this endpoint to help determine the options for correcting [GOBL](https://docs.gobl.org) documents and then perform the correction itself.

This is useful when you need to issue credit notes or corrective versions of a previously issued invoice and need clarity on the local options.

All requests to the endpoint require a **[GOBL Envelope](https://docs.gobl.org/draft-0/envelope)**, and cannot be used with a [GOBL Invoice](https://docs.gobl.org/draft-0/bill/invoice) or other GOBL object. This is because some tax regimes require specific details from the previous document's headers, like a special identification code.

Use the `show_options` flag to return a JSON Schema of the options that can be used with the provided document.

Once the options are clear, send in a new request with the `options` data to get an example corrected [GOBL Envelope](https://docs.gobl.org/draft-0/envelope). The same options data can be used with the [silo create entry endpoint](/api-ref/silo/entries/create-an-entry-post) and the `correct` property.


## OpenAPI

````yaml POST /silo/v1/gobl/correct
openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    Store and manage GOBL documents along with their attachments in "Silo
    Entries".
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Silo Service API
  version: 1.0.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /silo/v1/gobl/correct:
    post:
      description: >-
        Correct or determine the correction options for a GOBL Envelope (not
        Object!)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiloCorrectGOBL'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiloGOBL'
          description: OK
components:
  schemas:
    SiloCorrectGOBL:
      properties:
        data:
          description: GOBL Envelope or Object to calculate and validate.
          nullable: true
          title: Data
          type: object
        options:
          description: JSON object containing the GOBL correction option data.
          title: Options
          type: object
        show_options:
          description: >-
            When true, the options schema for correction are provided in the
            response.
          title: Show Options
          type: boolean
      type: object
    SiloGOBL:
      properties:
        data:
          description: GOBL Envelope or Object response to a build request.
          nullable: true
          title: Data
          type: object
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````