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

# Get Invoice

> Gets a specific invoice.



## OpenAPI

````yaml /openapi/2.0.json get /v2/sales-invoices/{invoiceId}
openapi: 3.0.0
info:
  title: JTL-WAWI API (Cloud)
  description: "JTL-Wawi-Version: 2.1.0\r\n# Introduction\r\n\r\nWelcome to the JTL-WAWI technical API documentation. This guide is here to help developers understand how our REST API works and how it can be integrated into your existing systems. We'll delve into the details of authentication and data manipulation processes, providing clear examples along the way. Whether you're a developer or an IT professional, this documentation aims to give you a practical understanding, laying the groundwork for effectively using the JTL-WAWI API to enhance your processes.\r\n\r\n# Authentication\r\n\r\nYou register your application with the API by sending a POST request with the required information and corresponding keys. You can find the exact request details at https://developer.jtl-software.com/products/erp/swagger/appregistration. This information has to include the following:\r\n\r\n* AppId\r\n* DisplayName\r\n* Description\r\n* Version\r\n* ProviderName\r\n* ProviderWebsite\r\n* MandatoryApiScopes\r\n\r\nThis data is crucial for identifying and registering your application with the API. The API uses it to generate a temporary authentication ID that allows your application to access the necessary resources. After successful validation of this information, you will receive the API key required for future authentication and API requests.\r\n\r\nBefore you can begin the registration process, you must open JTL-Wawi (new interface) and start the registration process under 'Admin->App registration'. Only at this point are you authorised to send the first API call. This step in JTL-Wawi ensures that your application is properly registered and has permission to use the API.\r\n\r\nThe API will send you an authentication ID in the form of a token. Once you have received this token and successfully completed the registration in JTL-Wawi, you will send another request to the API by including this authentication ID in the URL path.\r\n\r\nAfter successful validation of this second request by the API and confirmation of the correct information, you will be provided with the actual API key. It is important to note that this API key will not be displayed again!\r\n\r\nThis API key will be used in the future to authenticate requests to the API. It is of utmost importance that you securely store the API key upon receipt, as it cannot be retrieved from any other location in the system."
  contact:
    name: JTL-Software-GmbH
    url: https://developer.jtl-software.com/
    email: partner@jtl-software.com
  version: '2.0'
  x-application-version: 2.1.0.0
servers:
  - url: https://api.jtl-cloud.com/erp
    description: Production Environment Cloud API Gateway
security: []
tags:
  - name: Worker
    description: >-
      <p data-section-id='tag/Worker' class='beta_summary'></p>Returns the
      Available Syncs of the Worker
  - name: WMS
    description: >-
      <p data-section-id='tag/WMS' class='stable_summary'></p>Query all pick
      lists for a specific wms warehouse that are not completed.
  - name: Wawi App
    description: >-
      <p data-section-id='tag/Wawi App' class='stable_summary'></p>Get a
      specific customer
  - name: Warehouses
    description: >-
      <p data-section-id='tag/Warehouses' class='stable_summary'></p>Queries all
      storage locations for a given warehouse.
  - name: Units
    description: Development
  - name: Transaction Status
    description: >-
      <p data-section-id='tag/Transaction Status'
      class='stable_summary'></p>Queries all transaction statuses for a sales
      order.
  - name: Tax
    description: >-
      <p data-section-id='tag/Tax' class='stable_summary'></p>Returns the tax
      rate for the given item.
  - name: Inventory
    description: >-
      <p data-section-id='tag/Inventory' class='stable_summary'></p>Queries
      stocks for a specific item, warehouse or storage location.
  - name: Sales Order
    description: Planned
  - name: Sales Invoice Correction
    description: Planned
  - name: Sales Channel
    description: >-
      <p data-section-id='tag/Sales Channel' class='stable_summary'></p>Gets all
      sales channels.
  - name: Return
    description: >-
      <p data-section-id='tag/Return' class='beta_summary'></p>Create a new
      return with associated items and packages.
  - name: Item
    description: >-
      <p data-section-id='tag/Item' class='beta_summary'></p>Queries all
      responsible persons.
  - name: Refund
    description: Planned
  - name: Property
    description: >-
      <p data-section-id='tag/Property' class='stable_summary'></p>Queries all
      properties of items.
  - name: Printer
    description: >-
      <p data-section-id='tag/Printer' class='beta_summary'></p>Retrieves all
      installed printers.
  - name: Master Data
    description: >-
      <p data-section-id='tag/Master Data' class='stable_summary'></p>Queries
      all on hold reasons for sales orders.
  - name: Manufacturer
    description: Development
  - name: Label
    description: Development
  - name: Sales Invoice
    description: Planned
  - name: Info
    description: >-
      <p data-section-id='tag/Info' class='stable_summary'></p>Returns the
      status of the API.
  - name: Features
    description: >-
      <p data-section-id='tag/Features' class='stable_summary'></p>Returns the
      available feature sets with release state and API version.
  - name: Extensibility
    description: Planned
  - name: Shipment
    description: Development
  - name: Delivery Note
    description: Planned
  - name: Custom Field
    description: Development
  - name: Customer
    description: >-
      <p data-section-id='tag/Customer' class='stable_summary'></p>Deletes a
      specific customer.
  - name: Authentication
    description: >-
      <p data-section-id='tag/Authentication' class='stable_summary'></p>Send a
      registration request for an (external) application
  - name: Attribute
    description: Development
  - name: Sales Quotation
    description: >-
      <p data-section-id='tag/Sales Quotation' class='beta_summary'></p>Execute
      the printing of a sales quotation
  - name: Production
  - name: Resources
  - name: Company
  - name: Marketplace Order
  - name: Marketplace Offer
  - name: Marketplace Invoicing
  - name: Warehouse Assistant
paths:
  /v2/sales-invoices/{invoiceId}:
    get:
      tags:
        - Sales Invoice
      summary: Get Invoice
      description: Gets a specific invoice.
      operationId: Invoice_GetInvoiceAsync
      parameters:
        - name: invoiceId
          in: path
          required: true
          description: The ID of the invoice to return.
          schema:
            $ref: '#/components/schemas/JTL.Data.Contracts.Keys.RechnungKey'
            example: b45f6432-2462-4c6f-b00f-1d9d01000000
          x-position: 1
        - name: x-companyid
          in: header
          description: >-
            The Company-Id (int or uuid) of the company on whose behalf the
            request is executed.
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: The tenant ID for the target ERP instance.
      responses:
        '200':
          description: Returns the invoice for the given ID.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Invoice.Invoice
        '401':
          description: ''
          content:
            application/json: {}
        '402':
          description: No licence available or the app has not been authorised by JTL.
          content:
            application/json: {}
        '404':
          description: No invoice with the given ID exists.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/JTL.Wawi.Rest.Abstraction.Exceptions.ErrorResponse
      security:
        - oauth2-authorization-code:
            - invoices.read
        - oauth2-client-credentials:
            - invoices.read
components:
  schemas:
    JTL.Data.Contracts.Keys.RechnungKey:
      type: string
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Wawi.Rest.Contracts.Models.V1.Invoice.Invoice:
      type: object
      description: 'Model Class: Invoice '
      additionalProperties: false
      required:
        - id
        - number
        - externalNumber
        - companyId
        - departureCountry
        - customerId
        - billingAddress
        - shipmentAddress
        - invoiceDate
        - invoicePaymentDetails
        - colorcodeId
        - dunningBlock
        - isExternalInvoice
        - comment
        - customerComment
        - isCancelled
        - languageIso
        - cancellationDetails
      properties:
        id:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.RechnungKey'
          description: Unique ID to identify an invoice.
        number:
          type: string
          description: The number of the invoice.
        externalNumber:
          type: string
          description: The external number of the sales order.
        companyId:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.FirmaKey'
          description: The company ID on the invoice.
        departureCountry:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoiceDepartureCountry
          description: >-
            The departure country information on the invoice. If none is
            indicated, it will be determined from the company's information.
        customerId:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.KundeKey'
          description: The customer ID.
        billingAddress:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Common.Address
          description: The address to which the invoice is issued.
        shipmentAddress:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Common.Address
          description: The adress to which the goods are shipped.
        invoiceDate:
          type: string
          description: The date when the invoice was created.
          format: date-time
        invoicePaymentDetails:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoicePaymentDetail
          description: Payment-specific information of the sales invoice.
        colorcodeId:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.FarbeKey'
          description: The colour code of the invoice.
        dunningBlock:
          type: boolean
          description: The creation of dunning letters is blocked.
        isExternalInvoice:
          type: boolean
          description: >-
            Indicates if the invoice of the sales order was created in an
            external system like Amazon VCS.
        comment:
          type: string
          description: A comment on the sales order.
        customerComment:
          type: string
          description: A customer comment on the sales order.
        isCancelled:
          type: boolean
          description: Indicates if the invoice has been cancelled.
        languageIso:
          type: string
          description: The language of the invoice.
        cancellationDetails:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoiceCancellationDetails
          description: The cancellation details in case the invoice has been cancelled.
    JTL.Wawi.Rest.Abstraction.Exceptions.ErrorResponse:
      type: object
      description: >-
        Represents an error response returned by the system in case of a failure
        or exception.
      additionalProperties: false
      properties:
        errorCode:
          type: string
          description: >-
            Gets or sets the error code that identifies the type of error
            encountered.
        validationErrors:
          type: object
          description: >-
            Gets or sets a dictionary containing validation errors associated
            with the request.
          deprecated: true
          x-deprecatedMessage: Use Errors
          additionalProperties:
            type: string
        errors:
          type: object
          description: Gets or sets a collection of errors associated with the response.
          additionalProperties:
            type: array
            items:
              type: string
        errorMessage:
          type: string
          description: >-
            Gets or sets the error message that provides details about the error
            encountered.
        stacktrace:
          type: string
          description: >-
            Gets or sets the stack trace associated with the error, providing
            detailed

            information about the sequence of method calls that led to the
            exception.
    JTL.Data.Contracts.Keys.FirmaKey:
      type: string
      description: Represents a key for identifying a firm within the application.
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoiceDepartureCountry:
      type: object
      description: 'Model Class: InvoiceDepartureCountry '
      additionalProperties: false
      required:
        - countryISO
        - state
        - currencyIso
        - currencyFactor
      properties:
        countryISO:
          type: string
          description: ISO code of the departure country.
        state:
          type: string
          description: Name of the state in the departure country.
        currencyIso:
          type: string
          description: ISO code of the currency of the departure country.
        currencyFactor:
          type: number
          description: The currency factor of the departure country.
          format: decimal
    JTL.Data.Contracts.Keys.KundeKey:
      type: string
      description: Represents a unique key for identifying a customer in the JTL system.
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Wawi.Rest.Contracts.Models.V1.Common.Address:
      type: object
      description: 'Model Class: Address '
      additionalProperties: false
      required:
        - id
        - company
        - company2
        - formOfAddress
        - title
        - firstName
        - lastName
        - street
        - address2
        - postalCode
        - city
        - state
        - countryIso
        - vatID
        - phoneNumber
        - mobilePhoneNumber
        - emailAddress
        - fax
      properties:
        id:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.AdresseKey'
          description: Unique ID to identify an address
        company:
          type: string
          description: Description of the Company.
        company2:
          type: string
          description: Additional company information
        formOfAddress:
          type: string
          description: Customer form of address
        title:
          type: string
          description: Official title
        firstName:
          type: string
          description: Customer first name
        lastName:
          type: string
          description: Customer last name
        street:
          type: string
          description: Street name in the customer's address
        address2:
          type: string
          description: Additional address information
        postalCode:
          type: string
          description: Postal code of the customer's address
        city:
          type: string
          description: Name of city in the customer's address
        state:
          type: string
          description: Name of state in the customer's address
        countryIso:
          type: string
          description: Country ISO code
        vatID:
          type: string
          description: Supplier VAT ID number
        phoneNumber:
          type: string
          description: Landline phone number
        mobilePhoneNumber:
          type: string
          description: Mobile phone number
        emailAddress:
          type: string
          description: Email address
        fax:
          type: string
          description: Fax number
    JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoicePaymentDetail:
      type: object
      description: 'Model Class: InvoicePaymentDetail '
      additionalProperties: false
      required:
        - paymentMethodId
        - paymentStatus
        - totalGrossAmount
        - currencyIso
        - currencyFactor
        - stillToPay
        - paymentTarget
        - cashDiscount
        - cashDiscountDays
        - stopPaymentRequest
        - dunningLevel
        - nextDueDate
      properties:
        paymentMethodId:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.ZahlungsartKey'
          description: The payment method whith which the invoice was paid.
        paymentStatus:
          $ref: >-
            #/components/schemas/JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoicePaymentStatus
          description: The payment status of the invoice.
        totalGrossAmount:
          type: number
          description: The total gross amount of the invoice.
          format: decimal
        currencyIso:
          type: string
          description: ISO code of the currency of the invoice.
        currencyFactor:
          type: number
          description: >-
            The currency factor for the sales order at the time the sales order
            has been created.
          format: decimal
        stillToPay:
          type: number
          description: The amount that is left to pay for this invoice.
          format: decimal
        paymentTarget:
          type: integer
          description: The due date for payment of the sales order in days.
          format: int32
        cashDiscount:
          type: number
          description: The cash discount of the sales order.
          format: decimal
        cashDiscountDays:
          type: integer
          description: The days that the cash discount is valid.
          format: int32
        stopPaymentRequest:
          type: boolean
          description: The creation of dunning letters is blocked.
        dunningLevel:
          type: integer
          description: The stage at which dunning currently is
          format: int32
        nextDueDate:
          type: string
          description: The next due date
          format: date-time
    JTL.Data.Contracts.Keys.FarbeKey:
      type: string
      description: Represents a key for identifying a color entity in the system.
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoiceCancellationDetails:
      type: object
      description: 'Model Class: InvoiceCancellationDetails '
      additionalProperties: false
      required:
        - cancellationReasonId
        - cancellationComment
        - date
      properties:
        cancellationReasonId:
          $ref: '#/components/schemas/JTL.Data.Contracts.Keys.RechnungStornogrundKey'
          description: The ID of the reason for cancelling the invoice.
        cancellationComment:
          type: string
          description: A comment that adds further information to the cancellation.
        date:
          type: string
          description: The DateTime of Cancellation.
          format: date-time
    JTL.Data.Contracts.Keys.AdresseKey:
      type: string
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Data.Contracts.Keys.ZahlungsartKey:
      type: string
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
    JTL.Wawi.Rest.Contracts.Models.V1.Invoice.InvoicePaymentStatus:
      type: integer
      description: 0 = UnPayed, 1 = PartialPayed, 2 = Payed
      format: int32
      x-enumNames:
        - UnPayed
        - PartialPayed
        - Payed
      enum:
        - 0
        - 1
        - 2
    JTL.Data.Contracts.Keys.RechnungStornogrundKey:
      type: string
      format: uuid
      example: b45f6432-2462-4c6f-b00f-1d9d01000000
      additionalProperties: false
  securitySchemes:
    oauth2-authorization-code:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://auth.jtl-cloud.com/oauth2/auth
          tokenUrl: https://auth.jtl-cloud.com/oauth2/token
          scopes:
            items.read: Grants permission to read item data.
            items.write: Grants permission to create and modify item data.
            all.read: Allows the application to read all data.
            authentication.updateforeignapp: Grants permission to update registered third-party apps.
            customers.read: Grants permission to read customer data.
            customers.write: Grants permission to create and modify customer data.
            customfields.read: Grants permission to read custom fields.
            customfields.write: Grants permission to create and modify custom fields.
            deliveries.read: Grants permission to read deliveries.
            deliveries.write: Grants permission to create and modify deliveries.
            deliverynotes.print: Grants permission to print and output delivery notes.
            deliverynotes.read: Grants permission to read delivery notes.
            deliverynotes.write: Grants permission to create and modify delivery notes.
            extensibility.integration: >-
              Grants permission to manage extensions and integrations of the
              JTL-Wawi.
            foreignapps.manage: >-
              Grants permission to manage registered third-party apps
              (registration, update and removal).
            inventories.read: Grants permission to read stock levels.
            inventories.write: Grants permission to modify stock levels.
            invoices.read: Grants permission to read invoices.
            invoices.write: Grants permission to create and modify invoices.
            labels.read: Grants permission to read labels.
            labels.write: Grants permission to create and modify labels.
            masterdata.read: >-
              Read master data such as shipping methods, payment methods, color
              codes and tax classes.
            orders.read: Grants permission to read orders.
            picklists.read: Grants permission to read pick lists.
            picklists.write: Grants permission to create and modify pick lists.
            returns.read: Grants permission to read returns.
            returns.write: Grants permission to create and modify returns.
            saleschannels.read: Grants permission to read sales channels.
            salesinvoicecorrections.read: Grants permission to read invoice corrections.
            salesinvoicecorrections.write: Grants permission to create and modify invoice corrections.
            salesorders.print: Grants permission to print and output sales orders.
            salesorders.read: Grants permission to read sales orders.
            salesorders.write: Grants permission to create and modify sales orders.
            system.config.read: Grants permission to read the system configuration.
            system.config.write: Grants permission to modify the system configuration.
            system.worker.read: >-
              Grants permission to read the configuration and status of
              background workers.
            system.worker.write: Grants permission to configure and control background workers.
            taxes.read: Grants permission to read tax data.
            warehouse.read: Grants permission to read warehouse data.
            wawiapp.all: Grants access to Wawi app related operations.
            currencies.read: Grants read access to currencies.
            jera.read: Grants read access to JERA internal endpoints.
            paymentmethods.read: Grants read access to payment methods.
            salesinvoicecorrections.print: Grants permission to print and output invoice corrections.
            salesinvoices.print: Grants permission to print and output sales invoices.
            salesinvoices.read: Grants read access to sales invoices.
            salesinvoices.write: Grants write access to sales invoices.
            salesquotations.print: Grants permission to print and output sales quotations.
            salesquotations.read: Grants read access to sales quotations.
            salesquotations.write: Grants write access to sales quotations.
            suppliers.read: Grants permission to read suppliers.
            resources.read: Grants permission to read resource management data.
            resources.write: Grants permission to create and modify resource management data.
            pps.read: Grants permission to read production data.
            pps.write: Grants permission to create and modify production data.
            masterdata.write: Write master data
            inventory.read: Grants permission to read stock levels.
            inventory.write: Grants permission to modify stock levels.
            taxes.write: Grants permission to create and modify tax data.
            application.runas: >-
              Allows the application to execute requests on behalf of another
              user.
    oauth2-client-credentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.jtl-cloud.com/oauth2/token
          scopes:
            items.read: Grants permission to read item data.
            items.write: Grants permission to create and modify item data.
            all.read: Allows the application to read all data.
            authentication.updateforeignapp: Grants permission to update registered third-party apps.
            customers.read: Grants permission to read customer data.
            customers.write: Grants permission to create and modify customer data.
            customfields.read: Grants permission to read custom fields.
            customfields.write: Grants permission to create and modify custom fields.
            deliveries.read: Grants permission to read deliveries.
            deliveries.write: Grants permission to create and modify deliveries.
            deliverynotes.print: Grants permission to print and output delivery notes.
            deliverynotes.read: Grants permission to read delivery notes.
            deliverynotes.write: Grants permission to create and modify delivery notes.
            extensibility.integration: >-
              Grants permission to manage extensions and integrations of the
              JTL-Wawi.
            foreignapps.manage: >-
              Grants permission to manage registered third-party apps
              (registration, update and removal).
            inventories.read: Grants permission to read stock levels.
            inventories.write: Grants permission to modify stock levels.
            invoices.read: Grants permission to read invoices.
            invoices.write: Grants permission to create and modify invoices.
            labels.read: Grants permission to read labels.
            labels.write: Grants permission to create and modify labels.
            masterdata.read: >-
              Read master data such as shipping methods, payment methods, color
              codes and tax classes.
            orders.read: Grants permission to read orders.
            picklists.read: Grants permission to read pick lists.
            picklists.write: Grants permission to create and modify pick lists.
            returns.read: Grants permission to read returns.
            returns.write: Grants permission to create and modify returns.
            saleschannels.read: Grants permission to read sales channels.
            salesinvoicecorrections.read: Grants permission to read invoice corrections.
            salesinvoicecorrections.write: Grants permission to create and modify invoice corrections.
            salesorders.print: Grants permission to print and output sales orders.
            salesorders.read: Grants permission to read sales orders.
            salesorders.write: Grants permission to create and modify sales orders.
            system.config.read: Grants permission to read the system configuration.
            system.config.write: Grants permission to modify the system configuration.
            system.worker.read: >-
              Grants permission to read the configuration and status of
              background workers.
            system.worker.write: Grants permission to configure and control background workers.
            taxes.read: Grants permission to read tax data.
            warehouse.read: Grants permission to read warehouse data.
            wawiapp.all: Grants access to Wawi app related operations.
            currencies.read: Grants read access to currencies.
            jera.read: Grants read access to JERA internal endpoints.
            paymentmethods.read: Grants read access to payment methods.
            salesinvoicecorrections.print: Grants permission to print and output invoice corrections.
            salesinvoices.print: Grants permission to print and output sales invoices.
            salesinvoices.read: Grants read access to sales invoices.
            salesinvoices.write: Grants write access to sales invoices.
            salesquotations.print: Grants permission to print and output sales quotations.
            salesquotations.read: Grants read access to sales quotations.
            salesquotations.write: Grants write access to sales quotations.
            suppliers.read: Grants permission to read suppliers.
            resources.read: Grants permission to read resource management data.
            resources.write: Grants permission to create and modify resource management data.
            pps.read: Grants permission to read production data.
            pps.write: Grants permission to create and modify production data.
            masterdata.write: Write master data
            inventory.read: Grants permission to read stock levels.
            inventory.write: Grants permission to modify stock levels.
            taxes.write: Grants permission to create and modify tax data.
            application.runas: >-
              Allows the application to execute requests on behalf of another
              user.

````