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

# Upload Invoice Data

> Submit the structured invoice data for an order **without** an invoice document. The payload is the same
as for `POST /v1/channel/order/invoice`, only the document part is missing completely.

This is only accepted when `invoiceDataTransfer` is `from-channel` for that order, either set as an order
override or, if the order does not say anything about it, by the channel default. Otherwise the request is
rejected with `400` and error code `CHN706`.

The Seller receives these invoice data as a regular `Channel:Order.Invoice` Event, but without a document
reference. Such a submission does **not** claim the invoice number, the Seller can still upload the actual
document for the same order and the same invoice number using `POST /v1/seller/order/invoice`.

Submitting the same invoice number twice for the same Seller is rejected with `400` and error code `CHN704`,
so a retry after a timeout does not produce a second `Channel:Order.Invoice` Event.

An `originalInvoiceNumber` must refer to an invoice number already submitted for that Seller, either with
a document or as invoice data. An unknown reference is rejected with `400` and error code `CHN705`.




## OpenAPI

````yaml /openapi/marketplace-channels/channel.json post /v1/channel/order/invoice-data
openapi: 3.0.2
info:
  title: JTL-Channel API
  version: 1.0.0
  x-logo:
    url: https://scx-sandbox.ui.jtl-software.com/docs/scx.png
  description: >
    JTL-Channel API is a REST-based API that helps a Channel Integrator to
    connect Marketplace with the JTL-Wawi 

    ERP System.


    # Key Features


    With the JTL-Channel API, you can:

      * Describe connected Marketplace Data Structure by providing Category and Attribute Data
      * Manage Product and Offer Listings
      * Manage Orders 
      * Handle the Post Order Process

    # Development Guide


    There is a detailed development guide available at
    [developer.jtl-software.com](https://developer.jtl-software.com/products/marketplaces/scx-channel-api/change_log).
servers:
  - url: https://scx-sbx.api.jtl-software.com
    description: Sandbox
  - url: https://scx.api.jtl-software.com
    description: Production
security: []
tags:
  - name: Seller
    description: |
      Seller Management
  - name: Channel
    description: Meta channel routes
  - name: Notification
    description: Channel notifications
  - name: Supported Prices
    description: Price type management
  - name: Meta
    description: meta
  - name: Attributes
    description: Channel attributes
  - name: Categories
    description: Channel categories
  - name: Order
    description: Orders
  - name: Return
    description: Order returns
  - name: Events
    description: SCX events
  - name: Offer
    description: Channel offers
  - name: Report
    description: SCX reports
  - name: Ticket
    description: Channel tickets
  - name: Stock Updates
    description: Stock update operations
paths:
  /v1/channel/order/invoice-data:
    post:
      tags:
        - Order
      summary: Upload Invoice Data
      description: >
        Submit the structured invoice data for an order **without** an invoice
        document. The payload is the same

        as for `POST /v1/channel/order/invoice`, only the document part is
        missing completely.


        This is only accepted when `invoiceDataTransfer` is `from-channel` for
        that order, either set as an order

        override or, if the order does not say anything about it, by the channel
        default. Otherwise the request is

        rejected with `400` and error code `CHN706`.


        The Seller receives these invoice data as a regular
        `Channel:Order.Invoice` Event, but without a document

        reference. Such a submission does **not** claim the invoice number, the
        Seller can still upload the actual

        document for the same order and the same invoice number using `POST
        /v1/seller/order/invoice`.


        Submitting the same invoice number twice for the same Seller is rejected
        with `400` and error code `CHN704`,

        so a retry after a timeout does not produce a second
        `Channel:Order.Invoice` Event.


        An `originalInvoiceNumber` must refer to an invoice number already
        submitted for that Seller, either with

        a document or as invoice data. An unknown reference is rejected with
        `400` and error code `CHN705`.
      operationId: UploadInvoiceData
      requestBody:
        $ref: '#/components/requestBodies/InvoiceData'
      responses:
        '201':
          description: Invoice data received
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - ChannelAuth: []
components:
  requestBodies:
    InvoiceData:
      description: Invoice metadata for a marketplace order without any invoice document.
      content:
        application/x-www-form-urlencoded:
          schema:
            $ref: '#/components/schemas/InvoiceDataUpload'
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseList'
          example:
            errorList:
              - code: VAL100
                message: Required field sellerId not found
                severity: error
                hint: Check the field `sellerId` — it must be a non-empty string.
    AccessForbidden:
      description: Access forbidden, invalid or unknown Token was used.
    ResourceNotFound:
      description: Requested resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseList'
          example:
            errorList:
              - code: GEN404
                message: Not found
                severity: error
                hint: null
    ServerError:
      description: Unexpected Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseList'
          example:
            errorList:
              - code: GEN500
                message: Internal Server Error
                severity: error
                hint: null
  schemas:
    InvoiceDataUpload:
      description: >
        Payload carrying only the invoice metadata, without an invoice document.
        Used by

        `POST /v1/channel/order/invoice-data`.
      type: object
      required:
        - invoice
      properties:
        invoice:
          $ref: '#/components/schemas/InvoiceMetaData'
    ErrorResponseList:
      type: object
      properties:
        errorList:
          nullable: true
          type: array
          example:
            - code: GEN700
              message: Seller SELLER_4711 does not exist on channel kaufland.
              severity: error
              hint: i9n-order22
          items:
            title: Error
            type: object
            properties:
              code:
                type: string
                example: GEN700
              message:
                type: string
                example: Seller SELLER_4711 does not exist on channel kaufland.
              severity:
                type: string
                enum:
                  - error
                  - warning
                  - info
                default: error
              hint:
                type: string
                nullable: true
                example: i9n-order22
    InvoiceMetaData:
      type: object
      required:
        - type
        - sellerId
        - orderId
        - invoiceNumber
        - billingAddress
        - currency
        - transactionDate
        - taxCalculationDate
      properties:
        type:
          $ref: '#/components/schemas/InvoiceDocumentType'
        sellerId:
          $ref: '#/components/schemas/SellerId'
        orderId:
          $ref: '#/components/schemas/ChannelOrderId'
        invoiceNumber:
          type: string
          minLength: 1
          maxLength: 256
        originalInvoiceNumber:
          type: string
          nullable: true
          description: |
            A original Invoice Number is required when type is CREDITNOTE
        transactionDate:
          type: string
          format: date-time
          description: |
            Date when the Invoice document was issued.
        taxCalculationDate:
          type: string
          format: date-time
          description: |
            Date when the tax in the Invoice document was calculated.
        transactionDetails:
          type: string
          nullable: true
        shipmentDate:
          type: string
          format: date-time
        taxAddressRole:
          type: string
          enum:
            - shipFrom
            - shipTo
        exportOutsideEu:
          type: boolean
        currency:
          type: string
        billingAddress:
          $ref: '#/components/schemas/Address'
        sellerVatNumber:
          type: string
          nullable: true
        buyerVatNumber:
          type: string
          nullable: true
        orderList:
          type: array
          minItems: 1
          description: >
            List of orders that are part of the invoice document. There must be
            at least one order on a document.  If the invoice document type is
            INVOICE, the shipping address is required and can not be empty or
            null.
          items:
            $ref: '#/components/schemas/OrderInvoice'
    InvoiceDocumentType:
      type: string
      enum:
        - INVOICE
        - CREDITNOTE
      default: INVOICE
    SellerId:
      description: >
        A unique Id identify a Seller on a specific SalesChannel. The SellerId
        is generated

        from the Channel itself during the Seller SignUp Process.
      type: string
      example: '4711'
      pattern: ^\w{1,50}$
    ChannelOrderId:
      type: string
      minLength: 1
      maxLength: 150
      example: 43523-43432-43532
    Address:
      type: object
      required:
        - lastName
        - street
        - city
        - country
      properties:
        firstName:
          type: string
          example: Arno
        lastName:
          type: string
          example: Nym
        gender:
          type: string
          enum:
            - male
            - female
            - diverse
        companyName:
          type: string
        street:
          type: string
          example: Leyboldstrasse
        houseNumber:
          type: string
          example: 14a
        addition:
          type: string
          example: 1. UG
        postcode:
          type: string
          example: '50354'
        city:
          type: string
          example: Hürth
        phone:
          type: string
          example: +49 0221 123456
        country:
          type: string
          example: DE
        state:
          type: string
          example: NRW
          nullable: true
    OrderInvoice:
      type: object
      required:
        - orderId
        - purchasedAt
      properties:
        orderId:
          $ref: '#/components/schemas/ChannelOrderId'
        purchasedAt:
          type: string
          format: date-time
        shippingAddress:
          $ref: '#/components/schemas/Address'
        transactionItemList:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/OrderInvoiceTransactionItem'
    OrderInvoiceTransactionItem:
      type: object
      required:
        - orderItemId
        - orderItemType
        - totalGrossPriceWithDiscounts
        - totalNetPriceWithDiscounts
        - totalVatAmountWithDiscounts
        - vatRate
      properties:
        orderItemId:
          type: string
        orderItemType:
          type: string
          enum:
            - ITEM
            - SHIPPING
            - PAYMENT
        sku:
          type: string
        title:
          type: string
        quantity:
          type: number
          format: float
          minimum: 0
          default: 1
        totalGrossPriceWithDiscounts:
          type: number
          minimum: 0
          format: float
        totalNetPriceWithDiscounts:
          type: number
          minimum: 0
          format: float
        totalVatAmountWithDiscounts:
          type: number
          minimum: 0
          format: float
        vatRate:
          type: number
          minimum: 0
          format: float
        discounts:
          type: array
          minItems: 0
          nullable: true
          items:
            $ref: '#/components/schemas/OrderInvoiceTransactionItemDiscounts'
    OrderInvoiceTransactionItemDiscounts:
      type: object
      required:
        - totalGrossPrice
        - totalNetPrice
        - totalVatAmount
      properties:
        name:
          description: Discount name
          type: string
          nullable: true
          example: 10% Winter Sale
        discountId:
          description: Channel Related Discount ID
          type: string
          nullable: true
          example: D1265327
        totalGrossPrice:
          type: number
          format: float
          minimum: 0
          default: 0
        totalNetPrice:
          type: number
          format: float
          minimum: 0
          default: 0
        totalVatAmount:
          type: number
          format: float
          minimum: 0
          default: 0
        vatRate:
          type: number
          format: float
          minimum: 0
          default: 0
  securitySchemes:
    ChannelAuth:
      description: >
        As a Channel Integrator you will receive a API Refresh Token. With such
        a Refresh Token you

        need to request an Access Token with a limited Lifetime (see POST
        /v1/auth). This Access Token

        must be provided as a Bearer Token in the Authorization Header with
        every request.
      type: http
      scheme: bearer
      bearerFormat: JWT

````