# API description including all regular and the Order-X endpoints.
# Does explicitly not include System endpoints.
# Used for a page of the Obwyse Developer Portal.
# Is deployed with filename "obwyse_api.yaml".
openapi: 3.1.0
info:
  title: obwyse API
  description: |
    The obwyse API provides a comprehensive set of endpoints for managing electronic invoices and archived documents. It enables seamless validation, extraction, and retrieval of invoice data in formats such as PDF and XML, including ZUGFeRD and XRechnung.\
    Additionally, the API offers robust document archiving capabilities, ensuring the secure storage and easy access of financial records. 
  version: 1.1.12
servers:
  - url: 'https://sandbox.obwyse.net/API'

tags:
  - name: eInvoicing inbound
    description: Endpoints related to incoming invoice data.
  - name: eInvoicing outbound
    description: Endpoints related to outgoing invoice data.
  - name: Order
    description: Endpoints related to electronic orders.
  - name: Partner Management
    description: Endpoints related to partner management.
  - name: Archive
    description: Endpoints related to archived documents.

security:
  - apiToken: []

paths:
  /v1/archive/query:
    post:
      tags:
        - Archive
      summary: Query archived documents.
      description: |
        Search the archive using a simple query syntax in the form of `key:value`,\
        The key must be one of the available ObjectMetadata indexes.\
        The value is the search string, which may contain wildcards: `?` (single character) and `*` (multiple characters).\
        Special characters such as `:`, space, `?`, and `*` must be escaped with a backslash (`\\`).\
        The query can include the operators `AND` and `OR` between `key:value` pairs and may use parentheses to group expressions.\
        Expressions are evaluated from the innermost parentheses outward.

      operationId: archiveQuery
      requestBody:
        required: true
        description: query details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryArchiveRequest'
            examples:
              simpleQuery:
                value:
                  query: 'belegnummer:"123456" AND belegtyp:"Rechnung"'
              rangedTimeQuery:
                summary: ranged query
                description: should also be used if searching for a single day
                value:
                  query: 'belegdatum:[2025-01-01T00:00:00.000Z TO 2025-01-02T00:00:00.000Z]'
      responses:
        200:
          description: query successful
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArchiveResponse'
              example:
                result:
                  - id: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
                    stored_date: "2025-01-01T00:00:00.000Z"
                    belegnummer: "1234"
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: internal server error cause described in the error element of the response
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/archive/content:
    get:
      tags:
        - Archive
      summary: Retrieve the archive object with the given unique ID.
      description: |
        The response body will contain the stored object, which may include binary data.\
        If available, the response `Content-Type` will match the content type defined in the object's metadata.\
        Note: Archived objects may be large — for example, saved POS data dumps.
      operationId: archiveContent
      parameters:
        - name: id
          in: query
          description: the unique object id
          required: true
          schema:
            type: string
          example: "storageserverV2://82771e34-7b94-11ed-830e-525400123456"

      responses:
        200:
          description: retrieval successful - contents delivered in response body
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
            Content-Type:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        404:
          description: object not found
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: internal server error cause described in the error element of the response
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/archive/metadata:
    get:
      tags:
        - Archive
      summary: Retrieve the metadata for the object with the given unique ID.
      operationId: archiveMetadata
      parameters:
        - name: id
          in: query
          description: The unique ID of the archived object.
          required: true
          schema:
            type: string
          example: "storageserverV2://82771e34-7b94-11ed-830e-525400123456"

      responses:
        200:
          description: retrieval successful - metadata delivered in response body
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ObjectMetadata"
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        404:
          description: archive object not found
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: internal server error cause described in the error element of the response
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/archive/store:
    post:
      tags:
        - Archive
      summary: Store an object in the archive.
      description: |
        Imports an object into the archive.\
        The imported object must not be empty and must not exceed the storing user's defined `MAX_SIZE` (default: 5 MB).\
        Additionally, metadata is subject to obwyse metadata validation, which enforces required formats and fields (e.g., `Belegtyp`). \
        \
        **Sandbox:** No object will be stored, even though the API may show a successful result.
      operationId: archiveStore
      #parameters:
      #  - name: commit
      #    in: query
      #    description: shall the new index entry be committed instantly
      #    required: false
      #    schema:
      #      type: boolean
      requestBody:
        required: true
        description: object and metadata
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveObjectTuple"
      responses:
        200:
          description: store successful
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArchiveStoreResponse"
              example:
                object_id: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: internal server error, cause described in the error element of the response
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/archive/update:
    post:
      tags:
        - Archive
      summary: Update the metadata of an object.
      description: |
        Update the metadata of an object in the archive.\
        \
        **Sandbox:** No metadata for the object will be updated.
      operationId: archiveUpdate
      #parameters:
      #  - name: commit
      #    in: query
      #    description: shall the new index entry be committed instantly
      #    required: false
      #    schema:
      #      type: boolean
      requestBody:
        required: true
        description: Update request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMetadataRequest"
            example:
              id: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
              metadata:
                stored_date: "2025-01-01T00:00:00.000Z"
                belegnummer: "1234"
      responses:
        200:
          description: update successful
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ObjectMetadata"
              example:
                id: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
                stored_date: "2025-01-01T00:00:00.000Z"
                belegnummer: "1234"
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        404:
          description: archive object not found
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: internal server error, cause described in the error element of the response
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/invoice/validate:
    post:
      tags:
        - eInvoicing inbound
      summary: Endpoint for validating an eInvoice (PDF or XML) using one or more validators.
      description: |
        This endpoint validates the eInvoice using configured validators.\
        The returned validation report includes information regarding the e-invoice identification, pre-validation and the concluded overall recommendation.
        The individual results of the validators are also included in the response, but are not completely described in the schema.
        
        **Sandbox:** The endpoint only returns default results no matter if the input file is valid or invalid.\
        Files with the filename test_invalid.xml will return a default XML that shows an invalid test result. All other files will return valid by default.
        
        Interpreting the result using values from "/validationResult/obwyseResult/" of the structured validation report:
        - **specification:** Describes the validity of the e-invoice against the corresponding specification. May not be used to interpret the overall validity of the invoice, since e-invoice format, profile and version of the validated invoice are not taken into account.
        
          - **FULLY_VALID:** The e-invoice is completely valid against its specification.
          - **STRUCTURED_DATA_VALID:** Only the structured data of the hybrid e-invoice are valid against its specification, but PDF or the embedding are invalid.
          - **INVALID:** The structure data of the e-invoice are not valid against its specification.
          - **RESULTS_DIFFER:** This is a technical return value to indicate that the results of the used validators differ. This can only happen, if the priotisation of the validation results are not configured. May not happen with default configuration.
          - **UNKNOWN:** This is a technical fallback value that should not be returned during validation.
        
        - **recommendation:** Describes the recommended handling of the e-invoice based on the validity against the corresponding specification, and the e-invoice format, profile and version.
        
          - **REJECT_NOT_COMPLIANT_WITH_LAW:** The e-invoice should be rejected because the used e-invoice format is not compliant with the legal guidelines. ZUGFeRD 1.0 e-invoices return this kind of result, since they are not EN-16931 compliant.
          - **REJECT_ONLY_ACCOUNTING_AID:** The e-invoice should be rejected because the used e-invoice profile is only intended to be used as an accounting aid and is not compliant with the legal guidelines. ZUGFeRD profiles "MINUMUM" and "BASIC-WL" e-invoices return this kind of result.
          - **REJECT_INVALID:** The structured data of the e-invoice is not valid and should be rejected.
          - **ACCEPT_DEPRECATED_VERSION_ON_AGREEMENT:** The structured data of the e-invoice is valid, but the used e-invoice version of the format is deprecated and no longer supported. It is only recommended to accept these kind of e-invoices, when all involved parties agree on further usage. Deprecated versions of XRechnung e-invoices return this kind of result.
          - **ACCEPT_VALID_STRUCTURED_DATA:** The structured data of the e-invoice is valid, but the PDF or the embedding are invalid. These kind of e-invoices may still be accepted, since the EN-16931 specification views the PDF of hybrid e-invoice only as containers of the actual invoice.
          - **ACCEPT_FULLY_VALID:** The e-invoice is valid and may be accepted.
          - **RESULTS_DIFFER:** This is a technical return value to indicate that the results of the used validators differ. This can only happen, if the priotisation of the validation results are not configured. May not happen with default configuration.
          - **UNKNOWN:** This is a technical fallback value that should not be returned during validation.
      operationId: invoiceValidate
      parameters:
        - in: query
          name: validators
          required: false
          explode: true
          schema:
            type: array
            default: [ "mustang", "kosit", "valitool" ]
            items:
              type: string
          examples:
            all_validators:
              value: mustang,kosit,valitool
            single_validator:
              value: mustang
            standard:
              value: mustang,kosit
            with_prioritization:
              value: mustang:50,kosit:50,valitool:10
            partially_prioritized:
              value: mustang,kosit,valitool:200
          description: |
            A comma-separated list (without spaces) of validators from the set [valitool, mustang, kosit].\
            Alternatively, you may specify the `validators` parameter multiple times instead of using a single comma-separated value.\
            \
            You can optionally assign a request-specific priority to each validator by appending a colon and a number (e.g., `mustang:50`).\
            Prioritization determines which validator’s result is treated as the main report when multiple validators are used.\
            \
            If a validator cannot validate the invoice due to its type, it will be skipped.\
            If a validator is not configured or licensed on the system, it can not be used.\
            \
            **Validator capabilities:**
            - **Valitool** requires a valid license. It supports ZUGFeRD and XRechnung, including semantic validations.
            - **Mustang** is suitable for ZUGFeRD invoices (excluding the XRechnung profile).
            - **Kosit** supports CII and UBL XRechnung, and PDF invoices with embedded XRechnung (ZUGFeRD XRechnung profile).
        - in: query
          name: language
          required: false
          schema:
            type: string
            default: de
          examples:
            de:
              value: de
            en:
              value: en
            fr:
              value: fr
          description: |
            Specifies the localization of the Valitool report. Available languages are German, English, and French.\
            Mustang and Kosit results cannot be translated.
        - in: query
          name: responseformat
          required: false
          schema:
            type: string
            default: xml
          examples:
            XML:
              value: xml
            PDF:
              value: pdf
          description: |
            Specifies the format of the response. If set to "xml", the response will contain the validation report as XML.\
            When using "pdf", the response will be a visualized PDF version of the validation report.
      requestBody:
        required: true
        description: PDF or XML file as binary data
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
            encoding:
              file:
                contentType: application/pdf, application/xml
      responses:
        200:
          description: |
            Validation was successfully executed. The report is returned as XML.  
            The response includes the identification result, pre-validation result, and semantic validation results.  
            An "annotations" section may also be included, indicating warnings from non-prioritized validators.  
            This section is listed in the schema as `obwyseResult`.
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/InvoiceValidationResult"
        400:
          description: Incorrect usage of the endpoint or use of a non-functional validator (e.g., Valitool without a license)
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: Server error during processing
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/extraction:
    post:
      tags:
        - eInvoicing inbound
      summary: Endpoint for extracting the data from an eInvoice (PDF or XML).
      description: |
        Extracts all invoice information into a structured XML file. It can also be used to extract embedded documents from the XML.\
        \
        **Sandbox:** The extracted invoice information in the result body are randomized and don't represent the real information of the input invoice.
      operationId: invoiceExtraction
      parameters:
        - in: query
          name: mode
          schema:
            type: string
            default: none
            enum:
              - none
              - human_readable
              - all
          required: false
          description: |
            Determines which additional values to extract.  
            - **none:** Only the internal invoice object is populated.  
            - **all:** All values listed in the XML are included in the result.  
            - **human_readable:** Extracts only values that are not part of an internal blacklist of "too technical values".  This is useful for visualization, ensuring that unnecessary or complex values do not appear in the PDF.
          example: human_readable
        - in: query
          name: language
          schema:
            type: string
            default: de
            enum:
              - de
              - en
          required: false
          description: The language to be used for localizing certain values. This affects, for example, country names, units of measurement, and the titles of additional values when the "mode" is not set to "none".
          example: de
        - in: query
          name: responseformat
          schema:
            type: string
            default: xml
            enum:
              - xml
              - json
          required: false
          description: Header to set the return output format.
          example: xml
      requestBody:
        required: true
        description: PDF or XML file as binary data
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
            encoding:
              file:
                contentType: application/pdf, application/xml
      responses:
        200:
          description: |
            Extraction executed successfully. The data is returned as XML.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/InvoiceExtractionResponse'
              example: |
                <data>
                  <identification>
                    <filename>Ausgangsrechnung_Zugferd.csv.pdf</filename>
                    <isElectronicInvoice>true</isElectronicInvoice>
                    <xmlSyntax>CII</xmlSyntax>
                    <format>ZUGFERD</format>
                    <profile>EXTENDED</profile>
                    <version>2.x</version>
                  </identification>
                  <invoice>
                    <document>
                      <documentType>
                        <id>
                          <value>2024-40-0214</value>
                        </id>
                        <name>ausgangsrechnung</name>
                      </documentType>
                    </document>
                  </invoice>
                </data>
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceExtractionResponse'
              example: |
                {
                  "data": {
                    "identification": {
                      "filename": "Ausgangsrechnung_Zugferd.csv.pdf",
                      "isElectronicInvoice": true,
                      "xmlSyntax": "CII",
                      "format": "ZUGFERD",
                      "profile": "EXTENDED",
                      "version": "2.x"
                    },
                    "invoice": {
                      "document": {
                        "documentType": {
                          "id": {
                            "value": "2024-40-0214"
                          },
                          "name": "ausgangsrechnung"
                        }
                      }
                    }
                  }
                }
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: Server error during processing
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/getEmbeddedXML:
    post:
      tags:
        - eInvoicing inbound
      summary: Extract the embedded XML from an eInvoice (PDF file).
      description: |
        Extracts the embedded XML file from the PDF invoice and returns it as a response.\
        \
        **Sandbox:** Doesn't return the actual embedded XML.
      operationId: invoiceGetEmbeddedXML
      requestBody:
        required: true
        description: PDF file as binary data
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The PDF file containing the embedded XML.
            encoding:
              file:
                contentType: application/pdf
      responses:
        200:
          description: |
            XML extracted successfully. The response contains the embedded XML.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/xml:
              example: |
                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <rsm:CrossIndustryInvoice xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100">
                  <rsm:ExchangedDocumentContext>
                    <ram:GuidelineSpecifiedDocumentContextParameter>
                      <ram:ID>urn:cen.eu:en16931:2017</ram:ID>
                    </ram:GuidelineSpecifiedDocumentContextParameter>
                  </rsm:ExchangedDocumentContext>
                  <rsm:ExchangedDocument>
                    <ram:ID>345435456456645</ram:ID>
                    <ram:TypeCode>380</ram:TypeCode>
                    <ram:IssueDateTime>
                      <udt:DateTimeString format="102">20241016</udt:DateTimeString>
                    </ram:IssueDateTime>
                  </rsm:ExchangedDocument>
                </rsm:CrossIndustryInvoice>
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: Server error during processing
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/visualCopy:
    post:
      tags:
        - eInvoicing inbound
      summary: Generate a visual copy (PDF) of an invoice.
      description: |
        Takes a PDF or XML invoice file and generates a visual copy (PDF) for display purposes. The visual copy is intended to provide a human-readable version of the invoice.\
        \
        **Sandbox:** The information on the returned PDF are randomized and don't represent the real information of the input invoice.
      operationId: invoiceCreateVisualCopy
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The uploaded invoice file (PDF or XML).
            encoding:
              file:
                contentType: application/pdf, application/xml, text/xml
      responses:
        200:
          description: The visual copy (PDF) was successfully created and returned as a binary PDF file.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/pdf:
              schema:
                type: string
                format: binary
              example: |
                %PDF-1.4
                %âãÏÓ
                1 0 obj
                << /Type /Catalog
                   /Pages 2 0 R
                >>
                endobj
                2 0 obj
                << /Type /Pages
                   /Kids [3 0 R]
                   /Count 1
                >>
                endobj
                3 0 obj
                << /Type /Page
                   /Parent 2 0 R
                   /MediaBox [0 0 612 792]
                   /Contents 4 0 R
                   /Resources << >>
                >>
                endobj
                4 0 obj
                << /Length 5 0 R >>
                stream
                BT
                /F1 12 Tf
                100 700 Td
                (Sample PDF) Tj
                ET
                endstream
                endobj
                5 0 obj
                14
                endobj
                xref
                0 6
                0000000000 65535 f 
                0000000010 00000 n 
                0000000079 00000 n 
                0000000178 00000 n 
                0000000295 00000 n 
                0000000354 00000 n 
                trailer
                << /Root 1 0 R
                   /Size 6
                >>
                startxref
                409
                %%EOF
        400:
          description: Invalid request. The file format is not supported or required parameters are missing.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An error occurred while processing the file or generating the visual copy.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/creationJson:
    post:
      tags:
        - eInvoicing outbound
      summary: Create a new Invoice Document.
      description: |
        Creates an e-invoice in ZUGFeRD or XRechnung format, depending on the specified configuration, from a provided JSON file.\
        \
        **Sandbox:** The information on the result invoice are randomized and don't correlate to the input data.
      operationId: invoceJsonCreation
      requestBody:
        required: true
        description: The data for the invoice.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InvoiceCreationRequest"
            examples:
              einfacheRechnung:
                summary: Einfache Rechnung
                value:
                  dokument:
                    format: zugferd
                    version: "2.4"
                    profil: en16931
                    rechnung:
                      rechnungstyp: "380"
                      rechnungsname: Rechnung
                      kopfzeile: Dies ist meine Kopfzeile
                      fusszeile: Und hier ist die Fußzeile
                      rechnungsnummer: RE-2025TEST-004
                      rechnungsdatum: 2025-10-31T10:00:16.736Z
                      leitweg_id: 991-1234512345-06
                  verkaeufer:
                    information:
                      verkaeufer_unternehmen: Grandiose Verkäufer GmbH
                      verkaeufer_kontakt_id: VK00001
                      verkaeufer_kontakt_name: Peter Müller
                      verkaeufer_kontakt_mail:
                        - adresse: p.mueller@verkaeufe.com
                      verkaeufer_kontakt_telefon: "05214683667"
                      verkaeufer_land: DE
                      verkaeufer_plz: "33611"
                      verkaeufer_ort: Bielefeld
                      verkaeufer_adresse: Verkäuferstraße 17
                      verkaeufer_webseite: www.obwyse.com
                      verkaeufer_steuernummer: l2/345/67890
                      verkaeufer_ust_idnr: DE123456788
                    regulierung:
                      hauptsitz: Bielefeld
                      handelsregister: Bielefeld
                      handelsregisternummer: HB1678
                      art_unternehmensfuehrung: Geschäftsführung
                      unternehmensfuehrung:
                        - Walter Wild
                        - Peter Müller
                  kaeufer:
                    information:
                      kaeufer_unternehmen: Gute Käufer AG
                      kaeufer_kontakt_id: KD00001
                      kaeufer_kontakt_telefon: "02381966933"
                      kaeufer_land: DE
                      kaeufer_plz: "59065"
                      kaeufer_ort: Hamm
                      kaeufer_adresse: Anemonenweg 24
                      kaeufer_webseite: www.coole-kaeufe.de
                      kaeufer_ust_idnr: DE887654321
                      kaeufer_global_id: "4035377000007"
                  geschaeftsabwicklung:
                    steueraufschluesselung:
                      - steuerbasis: 100
                        steuerbetrag: 19
                        steuersatz: 19
                    lieferung:
                      leistungszeitraum:
                        von: 2025-05-12T10:00:16.736Z
                        bis: 2025-05-30T10:00:16.736Z
                    waehrung: EUR
                    zahlungsreferenz: RE-2025TEST-004
                    zahlungsbedingungen:
                      skonto: null
                      faelligkeitsdatum: 2025-05-30T10:00:16.736Z
                      zahlungsanweisung: Zahlbar bis zum 30.05.2025.
                    summierung:
                      brutto: 119
                      netto: 100
                      zuschlag: 0
                      abschlag: 0
                      steuerbasis: 100
                      steuerbetrag: 19
                      vorauszahlung: 0
                      zahlungspflichtig: 119
                  zahlungsmittel:
                    - typ: ueberweisung
                      konto:
                        - kredit_institut: Bankname
                          bezeichnung: Mein Account
                          iban: DE89 3704 0044 0532 0130 00
                          bic: BYLADEM
                  positionen:
                    - position: "1"
                      beschreibung: Freitext zur Position
                      lieferdatum: 2025-05-28T10:00:16.736Z
                      menge: 2
                      einheit:
                        code: H87
                      brutto:
                        einzelpreis: 50
                      netto:
                        einzelpreis: 50
                      produkt:
                        name: Toller Artikel
                        beschreibung: Beschreibung des Artikels
                        gtin: AT172644
                        gesamtbetrag: 119
                        steuerbasis: 100
                        steuern:
                          - steuersatz: 19
                            steuerbasis: 100
                        abrechnungszeitraum:
                          von: 2025-05-12T10:00:16.736Z
                          bis: 2025-05-12T10:00:16.736Z
                        kaeufer_id: AKD2345
                  optionen:
                    archivieren: false
              stornorechnung:
                summary: Stornorechnung
                value:
                  dokument:
                    format: zugferd
                    version: "2.4"
                    profil: en16931
                    rechnung:
                      rechnungstyp: "381"
                      rechnungsname: Stornorechnung
                      kopfzeile: Hiermit stornieren wir die Rechnung RE-2025TEST-004 vom 31.10.2025.
                      fusszeile: Und hier ist die Fußzeile
                      rechnungsnummer: RE-2025TEST-005
                      rechnungsdatum: 2025-11-05T10:00:16.736Z
                      leitweg_id: 991-1234512345-06
                  verkaeufer:
                    information:
                      verkaeufer_unternehmen: Grandiose Verkäufer GmbH
                      verkaeufer_kontakt_id: VK00001
                      verkaeufer_kontakt_name: Peter Müller
                      verkaeufer_kontakt_mail:
                        - adresse: p.mueller@verkaeufe.com
                      verkaeufer_kontakt_telefon: "05214683667"
                      verkaeufer_land: DE
                      verkaeufer_plz: "33611"
                      verkaeufer_ort: Bielefeld
                      verkaeufer_adresse: Verkäuferstraße 17
                      verkaeufer_webseite: www.obwyse.com
                      verkaeufer_steuernummer: l2/345/67890
                      verkaeufer_ust_idnr: DE123456788
                    regulierung:
                      hauptsitz: Bielefeld
                      handelsregister: Bielefeld
                      handelsregisternummer: HB1678
                      art_unternehmensfuehrung: Geschäftsführung
                      unternehmensfuehrung:
                        - Walter Wild
                        - Peter Müller
                  kaeufer:
                    information:
                      kaeufer_unternehmen: Gute Käufer AG
                      kaeufer_kontakt_id: KD00001
                      kaeufer_kontakt_telefon: "02381966933"
                      kaeufer_land: DE
                      kaeufer_plz: "59065"
                      kaeufer_ort: Hamm
                      kaeufer_adresse: Anemonenweg 24
                      kaeufer_webseite: www.coole-kaeufe.de
                      kaeufer_ust_idnr: DE887654321
                      kaeufer_global_id: "4035377000007"
                  geschaeftsabwicklung:
                    steueraufschluesselung:
                      - steuerbasis: 100
                        steuerbetrag: 19
                        steuersatz: 19
                    lieferung:
                      leistungszeitraum:
                        von: 2025-05-12T10:00:16.736Z
                        bis: 2025-05-30T10:00:16.736Z
                    waehrung: EUR
                    zahlungsbedingungen:
                      skonto: null
                      faelligkeitsdatum: 2025-11-05T10:00:16.736Z
                      zahlungsanweisung: Der Betrag wird Ihrem Konto gutgeschrieben.
                    summierung:
                      brutto: 119
                      netto: 100
                      zuschlag: 0
                      abschlag: 0
                      steuerbasis: 100
                      steuerbetrag: 19
                      vorauszahlung: 0
                      zahlungspflichtig: 119
                  zahlungsmittel:
                    - typ: ueberweisung
                      konto:
                        - kredit_institut: Bankname
                          bezeichnung: Mein Account
                          iban: DE89 3704 0044 0532 0130 00
                          bic: BYLADEM
                  positionen:
                    - position: "1"
                      beschreibung: Freitext zur Position
                      lieferdatum: 2025-05-28T10:00:16.736Z
                      menge: 2
                      einheit:
                        code: H87
                      brutto:
                        einzelpreis: 50
                      netto:
                        einzelpreis: 50
                      produkt:
                        name: Toller Artikel
                        beschreibung: Beschreibung des Artikels
                        gtin: AT172644
                        gesamtbetrag: 119
                        steuerbasis: 100
                        steuern:
                          - steuersatz: 19
                            steuerbasis: 100
                        abrechnungszeitraum:
                          von: 2025-05-12T10:00:16.736Z
                          bis: 2025-05-12T10:00:16.736Z
                        kaeufer_id: AKD2345
                  optionen:
                    archivieren: false
              rechnungWithMultiplePositionsAndShipping:
                summary: Rechnung mit mehreren Positionen (+ beispielhafter Versand)
                value:
                  dokument:
                    format: zugferd
                    version: "2.4"
                    profil: extended
                    pdf_template_name: invoice_en_logo_right
                    rechnung:
                      rechnungstyp: "380"
                      rechnungsname: Rechnung
                      kopfzeile: Dies ist meine Kopfzeile
                      fusszeile: Und hier ist die Fußzeile
                      rechnungsnummer: RE-2025TEST-005
                      rechnungsdatum: 2025-05-31T10:00:16.736Z
                      leitweg_id: 991-1234512345-06
                  verkaeufer:
                    information:
                      verkaeufer_unternehmen: Grandiose Verkäufer GmbH
                      verkaeufer_kontakt_id: VK00001
                      verkaeufer_kontakt_name: Peter Müller
                      verkaeufer_kontakt_mail:
                        - adresse: p.mueller@verkaeufe.com
                      verkaeufer_kontakt_telefon: "05214683667"
                      verkaeufer_land: DE
                      verkaeufer_plz: "33611"
                      verkaeufer_ort: Bielefeld
                      verkaeufer_adresse: Verkäuferstraße 17
                      verkaeufer_webseite: www.obwyse.com
                      verkaeufer_steuernummer: l2/345/67890
                      verkaeufer_ust_idnr: DE123456788
                    regulierung:
                      hauptsitz: Bielefeld
                      handelsregister: Bielefeld
                      handelsregisternummer: HB1678
                      art_unternehmensfuehrung: Geschäftsführung
                      unternehmensfuehrung:
                        - Walter Wild
                        - Peter Müller
                  kaeufer:
                    information:
                      kaeufer_unternehmen: Gute Käufer AG
                      kaeufer_kontakt_id: KD00001
                      kaeufer_kontakt_telefon: "02381966933"
                      kaeufer_land: DE
                      kaeufer_plz: "59065"
                      kaeufer_ort: Hamm
                      kaeufer_adresse: Anemonenweg 24
                      kaeufer_webseite: www.coole-kaeufe.de
                      kaeufer_ust_idnr: DE887654321
                      kaeufer_global_id: "4035377000007"
                  geschaeftsabwicklung:
                    steueraufschluesselung:
                      - steuerbasis: 155
                        steuerbetrag: 29.45
                        steuersatz: 19
                      - steuerbasis: 149.5
                        steuerbetrag: 10.47
                        steuersatz: 7
                    lieferung:
                      leistungszeitraum:
                        von: 2025-05-12T10:00:16.736Z
                        bis: 2025-05-30T10:00:16.736Z
                    waehrung: EUR
                    zahlungsreferenz: RE-2025TEST-005
                    zahlungsbedingungen:
                      faelligkeitsdatum: 2025-06-30T10:00:16.736Z
                    summierung:
                      brutto: 344.42
                      netto: 304.5
                      zuschlag: 0
                      abschlag: 0
                      steuerbasis: 304.5
                      steuerbetrag: 39.92
                      vorauszahlung: 0
                      zahlungspflichtig: 344.42
                  zahlungsmittel:
                    - typ: ueberweisung
                      konto:
                        - kredit_institut: Bankname
                          bezeichnung: Mein Account
                          iban: DE89 3704 0044 0532 0130 00
                          bic: BYLADEM
                  positionen:
                    - position: "1"
                      beschreibung: Freitext zur Position
                      lieferdatum: 2025-05-28T10:00:16.736Z
                      menge: 2
                      einheit:
                        code: H87
                      brutto:
                        einzelpreis: 50
                      netto:
                        einzelpreis: 50
                      produkt:
                        name: Toller Artikel
                        beschreibung: Beschreibung des Artikels
                        gtin: AT172644
                        gesamtbetrag: 119
                        steuerbasis: 100
                        steuern:
                          - steuersatz: 19
                            steuerbasis: 100
                        abrechnungszeitraum:
                          von: 2025-05-12T10:00:16.736Z
                          bis: 2025-05-12T10:00:16.736Z
                        kaeufer_id: AKD2345
                    - position: "2"
                      menge: 10
                      einheit:
                        code: H87
                      brutto:
                        einzelpreis: 5.5
                      netto:
                        einzelpreis: 5.5
                      produkt:
                        name: Teetassen
                        beschreibung: Blaue Teetassen zum Tee trinken
                        gesamtbetrag: 65.54
                        steuerbasis: 55
                        steuern:
                          - steuersatz: 19
                            steuerbasis: 55
                        kaeufer_id: AKD556356-01
                    - position: "3"
                      menge: 50
                      einheit:
                        code: LTR
                      brutto:
                        einzelpreis: 2.99
                      produkt:
                        name: Grüner Tee
                        gesamtbetrag: 159.97
                        steuerbasis: 149.5
                        steuern:
                          - steuersatz: 7
                            steuerbasis: 149.5
                        verkaeufer_id: VAKD27-00
                  optionen:
                    archivieren: true
                    senden_an: versand@mail.com
                    senden_an_template: ETDEMOAusgangsrechnungZugferd
      responses:
        200:
          description: Invoice document created successfully.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InvoiceCreationResponse"
              example:
                archiveId: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
            application/pdf:
              schema:
                type: string
                format: binary
                description: Created invoice when no archiving was requested
            application/xml:
              schema:
                type: string
                description: Created invoice when no archiving was requested
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/creation/shipping/status:
    get:
      tags:
        - eInvoicing outbound
      summary: Retrieve shipping status
      description: |
        Retrieves the shipping status to verify whether the generated invoice was successfully sent.\
        \
        **Sandbox:** Only returns sample results.\
        For a waiting dispatch you can use the following ID as your request: e8a76ffa-abea-11ef-a09d-080011d8048a\
        For a failed dispatch you can use the following ID: e8a76ffa-abea-10ef-a09d-110011d8048a
      operationId: invoceCreationShippingStatus
      parameters:
        - name: id
          in: query
          description: ID of the shipping process
          required: true
          schema:
            type: string
      responses:
        200:
          description: Current shipping status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippingStatusResponse'
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        404:
          description: Shipping process not found
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/invoice/creation/email/templates:
    get:
      tags:
        - eInvoicing outbound
      summary: Retrieve available email templates
      description: Returns a list of available email templates for invoice creation and delivery.
      operationId: invoceCreationEmailTemplates
      responses:
        200:
          description: List of available email templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplatesResponse'
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/order/create:
    post:
      tags:
        - Order
      summary: Create a new electronic order.
      description: |
        Creates an electronic order in the Order-X format from a provided JSON file.\
        \
        **Sandbox:** The information on the result order are randomized and don't correlate to the input data.
      operationId: orderCreation
      requestBody:
        required: true
        description: The data for the order.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OrderCreationRequest"
            examples:
              orderXComfort:
                summary: Order-X Comfort
                value:
                  options:
                    format: ORDER_X_COMFORT_V1_0
                    fileFormat: HYBRID
                    language: DE
                    pdfTemplateName: electronic_order.xslt
                    orderFilename: electronic_order
                    archive: false
                  additionalData:
                    regulatoryInformation:
                      companyManagements:
                        - firstName: Jonas
                          lastName: Mayer
                      companyManagementLabel: Geschäftsführung
                      mainOffice: Hagen
                      registrarOfCompany: Amtsgericht Hagen
                      commercialRegisterNumber: HRB123456
                  order:
                    document:
                      testIndicator: true
                      orderType: ORDER
                      documentNumber: 2026-110270
                      issueDate: 2026-02-23
                      headerNote:
                        content: >-
                          Sehr geehrte Damen und Herren, 


                          wir bitten um Lieferung gemäß nachfolgender Bestellung. 

                          Diese Bestellung erfolgt unter Anerkennung unserer allgemeinen Einkaufsbedingungen.


                          Bitte bestätigen Sie uns den Liefertermin sowie die verbindliche Annahme der Bestellung schriftlich.
                      footerNote:
                        content: >-
                          Bitte geben Sie unsere Bestellnummer sowie die Artikelnummern auf allen
                          Lieferpapieren und Rechnungen an. 

                          Teillieferungen sind nur nach vorheriger Abstimmung zulässig. Die Lieferung hat frachtfrei zu erfolgen, sofern nicht anders vereinbart. 


                          Bei Rückfragen wenden Sie sich bitte an unsere Einkaufsabteilung unter einkauf@nordwerk-industrie.de
                    transaction:
                      documentLines:
                        - lineId: "1"
                          product:
                            id: MZ-77E2T0B/EU
                            name:
                              Sumsang 870 OVE SATA III 25 Zoll SSD 2 TB. Festplatte für schnelle
                              Datenübertragung
                            description:
                              Solid State Drive (SSD) für eine verbesserte PC-Leistung im
                              täglichen Einsatz. gut geeignet als Alternative zur HDD (Festplatte)
                          agreement:
                            netPrice:
                              amount: 250
                          delivery:
                            requestedQuantity:
                              quantity: 10
                              unitCode: H87
                          settlement:
                            tradeTax:
                              categoryCode: S
                              ratePercent: 19
                              calculatedAmount: 380
                            summation:
                              lineTotalAmount: 2500
                              chargeTotalAmount: 0
                              allowanceTotalAmount: 0
                              taxTotalAmount: 380
                      agreement:
                        buyer:
                          name: Nordwerk Industriekomponenten AG
                          contacts:
                            - personName: Michael Wehmeier
                              emailAddress: einkauf@nordwerk-industrie.de
                              phoneNumber: +49 2331 9457-150
                          vatRegistrations:
                            - DE912345678
                          postalAddress:
                            addressLineOne: Werkstraße 12
                            postalCode: "58093"
                            area: Hagen
                            country: DE
                        seller:
                          id: Lieferant-0001
                          name: TechPoint Distribution GmbH
                          contacts:
                            - personName: Marco Lenz
                              emailAddress: sales@techpoint-distribution.de
                              phoneNumber: "49897543220"
                          vatRegistrations:
                            - DE204567891
                          postalAddress:
                            addressLineOne: Digitalring 8
                            postalCode: "82152"
                            area: München
                            country: DE
                      delivery:
                        shipTo:
                          name: Nordwerk Lagerhaus GmbH
                          postalAddress:
                            addressLineOne: Transportweg 20
                            postalCode: "58093"
                            area: Hagen
                            country: DE
                        deliveryEvents:
                          - date: 2026-03-06
                      settlement:
                        currency: EUR
                        paymentMeans:
                          descriptions:
                            - Zahlung innerhalb von 30 Tagen netto oder innerhalb von 10 Tagen mit
                              2% Skonto.
                        taxBreakdown:
                          - typeCode: VAT
                            categoryCode: S
                            ratePercent: 19
                            calculatedAmount: 380
                            basisAmount: 2500
                        summation:
                          lineTotalAmount: 2500
                          chargeTotalAmount: 0
                          allowanceTotalAmount: 0
                          taxBasisTotalAmount: 2500
                          taxTotalAmount: 380
                          grandTotalAmount: 2880
                          prepaidAmount: 0
                          duePayableAmount: 2880

              orderXExtended:
                summary: Order-X Extended
                value:
                  options:
                    format: ORDER_X_EXTENDED_V1_0
                    fileFormat: HYBRID
                    language: DE
                    pdfTemplateName: electronic_order.xslt
                    orderFilename: electronic_order
                    archive: false
                  additionalData:
                    regulatoryInformation:
                      companyManagements:
                        - firstName: Jonas
                          lastName: Mayer
                      companyManagementLabel: Geschäftsführung
                      mainOffice: Hagen
                      registrarOfCompany: Amtsgericht Hagen
                      commercialRegisterNumber: HRB123456
                  order:
                    document:
                      testIndicator: true
                      orderType: ORDER
                      documentNumber: 2026-110270
                      issueDate: 2026-02-23
                      effectivePeriod:
                        startDateTime: 2026-02-24 00:00
                        endDateTime: 2026-02-28 18:00
                      headerNote:
                        content: >-
                          Sehr geehrte Damen und Herren, 


                          wir bitten um Lieferung gemäß nachfolgender Bestellung. 

                          Diese Bestellung erfolgt unter Anerkennung unserer allgemeinen Einkaufsbedingungen.


                          Bitte bestätigen Sie uns den Liefertermin sowie die verbindliche Annahme der Bestellung schriftlich.
                      footerNote:
                        content: >-
                          Bitte geben Sie unsere Bestellnummer sowie die Artikelnummern auf allen
                          Lieferpapieren und Rechnungen an. 

                          Teillieferungen sind nur nach vorheriger Abstimmung zulässig. Die Lieferung hat frachtfrei zu erfolgen, sofern nicht anders vereinbart. 


                          Bei Rückfragen wenden Sie sich bitte an unsere Einkaufsabteilung unter einkauf@nordwerk-industrie.de
                    transaction:
                      documentLines:
                        - lineId: "1"
                          product:
                            id: MZ-77E2T0B/EU
                            globalIds:
                              - id: "08806090545900"
                                schemeId: "0160"
                            name:
                              Sumsang 870 OVE SATA III 25 Zoll SSD 2 TB. Festplatte für schnelle
                              Datenübertragung
                            description:
                              Solid State Drive (SSD) für eine verbesserte PC-Leistung im
                              täglichen Einsatz. gut geeignet als Alternative zur HDD (Festplatte)
                            characteristics:
                              - description: Drehzahl
                                value: "7200"
                          agreement:
                            netPrice:
                              amount: 250
                          delivery:
                            requestedQuantity:
                              quantity: 10
                              unitCode: H87
                          settlement:
                            allowanceCharges:
                              - chargeIndicator: false
                                actualAmount: 500
                                reason: Sonderrabatt Menge
                            tradeTax:
                              categoryCode: S
                              ratePercent: 19
                              calculatedAmount: 380
                            summation:
                              lineTotalAmount: 2500
                              chargeTotalAmount: 0
                              allowanceTotalAmount: 500
                              taxTotalAmount: 380
                          notes:
                            - content: Gemäß vorliegendem Winterangebot
                        - lineId: "2"
                          product:
                            id: 32G810SA-W.AEU
                            name: GL analogics 32G810SA 32 Zoll. Ultragear 4K UHD
                            description:
                              80cm 16:9 Super Resolution 3840 x 2160. 144Hz, 1ms, HDR10, AMD
                              FreeSync, DCI-P3 95%, DisplayHDR 400
                            characteristics:
                              - description: Farbe
                                value: Weiss
                          agreement:
                            netPrice:
                              amount: 250
                          delivery:
                            requestedQuantity:
                              quantity: 15
                              unitCode: H87
                          settlement:
                            allowanceCharges:
                              - chargeIndicator: true
                                actualAmount: 500
                                reason: Mindermengenzuschlag
                            tradeTax:
                              categoryCode: S
                              ratePercent: 19
                              calculatedAmount: 807.5
                            summation:
                              lineTotalAmount: 3750
                              chargeTotalAmount: 500
                              allowanceTotalAmount: 0
                              taxTotalAmount: 807.5
                          notes:
                            - content: Für Monitor Sonderaktion
                        - lineId: "3"
                          product:
                            id: B08KR9XCPG
                            globalIds:
                              - id: "04025112091971"
                                schemeId: "0160"
                            name: GERRY CENTIX Desktop kabelloses Tastatur- und Maus-Set. Deutsches Layout
                            description:
                              QWERTZ Tastatur langlebige Tastenbeschriftung ergonomisches Design.
                              batteriebetrieben
                          agreement:
                            netPrice:
                              amount: 25
                          delivery:
                            requestedQuantity:
                              quantity: 30
                              unitCode: H87
                          settlement:
                            tradeTax:
                              categoryCode: S
                              ratePercent: 19
                              calculatedAmount: 142.5
                            summation:
                              lineTotalAmount: 750
                              chargeTotalAmount: 0
                              allowanceTotalAmount: 0
                              taxTotalAmount: 142.5
                      agreement:
                        buyerReference: "720803"
                        buyer:
                          name: Nordwerk Industriekomponenten AG
                          contacts:
                            - personName: Michael Wehmeier
                              emailAddress: einkauf@nordwerk-industrie.de
                              phoneNumber: +49 2331 9457-150
                          vatRegistrations:
                            - DE912345678
                          postalAddress:
                            addressLineOne: Werkstraße 12
                            postalCode: "58093"
                            area: Hagen
                            country: DE
                        seller:
                          id: Lieferant-0001
                          globalIds:
                            - id: "4035377000008"
                              schemeId: "0088"
                          name: TechPoint Distribution GmbH
                          contacts:
                            - personName: Marco Lenz
                              emailAddress: sales@techpoint-distribution.de
                              phoneNumber: "49897543220"
                          vatRegistrations:
                            - DE204567891
                          postalAddress:
                            addressLineOne: Digitalring 8
                            postalCode: "82152"
                            area: München
                            country: DE
                        deliveryTerms:
                          deliveryCode: CPT
                          description:
                            "Verpackungskosten sind im Preis enthalten Lieferzeit: spätestens
                            14 Kalendertage nach Auftragseingang Bei Lieferverzug behalten wir uns
                            das Recht vor. Ersatzbeschaffung auf Kosten des Lieferanten
                            vorzunehmen"
                      delivery:
                        shipTo:
                          name: Nordwerk Lagerhaus GmbH
                          postalAddress:
                            addressLineOne: Transportweg 20
                            postalCode: "58093"
                            area: Hagen
                            country: DE
                        deliveryEvents:
                          - date: 2026-03-06
                      settlement:
                        currency: EUR
                        invoicee:
                          name: NW Regulierungsbank KG
                          postalAddress:
                            addressLineOne: Goldarkade 28
                            postalCode: "60312"
                            area: Frankfurt
                            country: DE
                        paymentMeans:
                          descriptions:
                            - Zahlung innerhalb von 30 Tagen netto oder innerhalb von 10 Tagen mit
                              2% Skonto.
                        taxBreakdown:
                          - typeCode: VAT
                            categoryCode: S
                            ratePercent: 19
                            calculatedAmount: 1330
                            basisAmount: 7000
                        summation:
                          lineTotalAmount: 7000
                          chargeTotalAmount: 0
                          allowanceTotalAmount: 0
                          taxBasisTotalAmount: 7000
                          taxTotalAmount: 1330
                          grandTotalAmount: 8330
                          prepaidAmount: 0
                          duePayableAmount: 8330
      responses:
        200:
          description: Order created successfully.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderCreationResponse"
              example:
                archiveId: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
            application/pdf:
              schema:
                type: string
                format: binary
                description: Created order as PDF when hybrid creation without archiving was requested
            application/xml:
              schema:
                type: string
                description: Created order as XML when XML-only creation without archiving was requested
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/order/creation/shipping/status:
    get:
      tags:
        - Order
      summary: Retrieve shipping status
      description: |
        Retrieves the shipping status to verify whether the generated order was successfully sent.\
        \
        **Sandbox:** Only returns sample results.\
        For a waiting dispatch you can use the following id as your request: e8a76ffa-abea-11ef-a09d-080011d8048a\
        For a failed dispatch you can use the following id: e8a76ffa-abea-10ef-a09d-110011d8048a
      operationId: orderCreationShippingStatus
      parameters:
        - name: id
          in: query
          description: ID of the shipping process
          required: true
          schema:
            type: string
      responses:
        200:
          description: Current shipping status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippingStatusResponse'
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        404:
          description: Shipping process not found
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/order/creation/email/templates:
    get:
      tags:
        - Order
      summary: Retrieve available email templates
      description: Returns a list of available email templates for order creation and delivery.
      operationId: orderCreationEmailTemplates
      responses:
        200:
          description: List of available email templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplatesResponse'
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/order/creation/codelist/list:
    get:
      tags:
        - Order
      summary: Retrieve codelist names
      description: Returns a list of technical identifiers of codelists that are relevant for order creation.
      operationId: orderCreationCodelistList
      responses:
        200:
          description: List of codelist names
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodelistListResponse'
              example:
                - "UNTDID_1001_D20A"
                - "UNTDID_1153_D20A"
                - "UNTDID_1225_D20A"
                - "UNTDID_1229_D20A"
                - "UNTDID_1373_D20A"
                - "UNTDID_2005_ZF233_SUBSET"
                - "UNTDID_3139_D20A"
                - "UNTDID_4053_D20A"
                - "UNTDID_4055_D20A"
                - "UNTDID_4451_D20A"
                - "UNTDID_4461_D20A"
                - "UNTDID_5153_D20A"
                - "UNTDID_5189_D20A"
                - "UNTDID_5305_ZF232_SUBSET"
                - "UNTDID_6313_D20A"
                - "UNTDID_7161_D20A"
                - "UNECE_PACKAGE_TYPE_CODE_2006"
                - "UNECE_RECOMMENDATION_20_ZF233"
                - "UNECE_RECOMMENDATION_21_ZF233"
                - "CEF_EAS_ZF233"
                - "CEF_VATEX_ZF233"
                - "ISO_1366_1_ALPHA_2_20250814"
                - "ISO_4217_ZF211"
                - "ISO_6523_ZF233"
                - "INCOTERMS_ZF233"
                - "BT_X_290_ZF233"
                - "BT_X_11_ZF233"
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/order/creation/codelist/overview:
    get:
      tags:
        - Order
      summary: Retrieve an overview for a codelist
      description: Returns a list of all possible values for a specific codelist that is relevant for order creation.
      operationId: orderCreationCodelistOverview
      parameters:
        - in: query
          name: id
          schema:
            type: string
          required: true
          description: The technical identifier of the codelist to retrieve
          example: UNTDID_4053_D20A
        - in: query
          name: language
          schema:
            type: string
            enum:
              - de
              - en
          required: false
          default: de
          description: The language for codelist code titles and descriptions of the response. Be aware that most codelist codes are only localized as English and that the English localization is used as a fallback when the requested localization is not maintained for a code.
          example: en
      responses:
        200:
          description: List of codelist values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodelistOverviewResponse'
              example:
                id: "UNTDID_4053_D20A"
                urn: "https://service.unece.org/trade/untdid/d20a/tred/tred4053.htm"
                name: "UNTDID 4053"
                description: "UNTDID 4053 Delivery or transport terms description code - Code specifying the delivery or transport terms."
                version: "D20A"
                values:
                  - value: "1"
                    name: Delivery arranged by the supplier
                    description: Indicates that the supplier will arrange delivery of the goods.
                  - value: "2"
                    name: Delivery arranged by logistic service provider
                    description: Code indicating that the logistic service provider has arranged the delivery of goods.
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/order/creation/codelist/details:
    get:
      tags:
        - Order
      summary: Retrieve details about a code of a codelist
      description: Returns the title and description of a specific codelist value that is relevant for order creation.
      operationId: orderCreationCodelistDetails
      parameters:
        - in: query
          name: id
          schema:
            type: string
          required: true
          description: The technical identifier of the codelist
          example: UNTDID_4053_D20A
        - in: query
          name: value
          schema:
            type: string
          required: true
          description: The technical identifier of the code to retrieve
          example: 1
        - in: query
          name: language
          schema:
            type: string
            enum:
              - de
              - en
          required: false
          default: de
          description: The language for the codelist code title and description of the response. Be aware that most codelist codes are only localized as english and that the english localization is used as a fallback when the requested localization is not maintained for a code.
          example: en
      responses:
        200:
          description: List of codelist values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodelistDetailsResponse'
              example:
                value: "1"
                name: Delivery arranged by the supplier
                description: Indicates that the supplier will arrange delivery of the goods.
        400:
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/membership/contractor/find/{id}:
    get:
      tags:
        - Partner Management
      summary: "Find a partner by ID"
      description: |
        Returns the partner with the given ID.\
        \
        **Sandbox:** Only IDs of the sample partners can be used. IDs that can be used are:\
        C00001, C00002, C00003, C00004, C00005, C00006
      operationId: "membershipContractorFind"
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: "ID of the partner to be searched for"
      responses:
        200:
          description: "Partner was found and is returned"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembershipExistingContractor'
        400:
          description: "Missing parameters, unparsable request or invalid user input"
          $ref: '#/components/responses/BadRequestError'
        404:
          description: "No partner found for the given ID"
          $ref: '#/components/responses/BadRequestError'
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/membership/contractor/list:
    post:
      tags:
        - Partner Management
      summary: "List partners with filtering and sorting"
      description: |
        Returns a list of partners in the system.\
        \
        **Sandbox:** Returns a list of sample partners.
      operationId: "membershipContractorList"
      requestBody:
        description: Filter and sort for listing
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MembershipContractorFilter'
        required: false
      responses:
        200:
          description: "Partners were successfully searched for and are returned. Empty list is returned if no partners were found."
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MembershipExistingContractor'
        400:
          $ref: '#/components/responses/BadRequestError'
          description: "Missing parameters, unparsable request or invalid user input"
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/membership/contractor/create:
    post:
      tags:
        - Partner Management
      summary: "Create a partner"
      description: |
        Creates a partner.\
        Given ID, latestChanged values, types of sub-objects and contractor-IDs of sub-objects are ignored during creation.\
        \
        **Sandbox:** Eventhough the endpoint may return a success no real partner will be created.
      operationId: "membershipContractorCreate"
      requestBody:
        description: Partner to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MembershipContractor'
        required: true
      responses:
        200:
          description: "Partner was created successfully"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembershipExistingContractor'
        400:
          $ref: '#/components/responses/BadRequestError'
          description: "Missing parameters, unparsable request or invalid user input"
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/membership/contractor/update:
    post:
      tags:
        - Partner Management
      summary: "Update a contractor"
      description: |
        ID value is required during update. Latest changed values, types of sub-objects and contractor-IDs of sub-objects are ignored during update.\
        \
        **Sandbox:** Even though the endpoint may return a success no real partner will be updated.
      operationId: "membershipContractorUpdate"
      requestBody:
        description: Partner to be updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MembershipExistingContractor'
        required: true
      responses:
        200:
          description: "Partner was updated successfully"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembershipExistingContractor'
        400:
          $ref: '#/components/responses/BadRequestError'
          description: "Missing parameters, unparsable request or invalid user input"
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

  /v1/membership/contractor/delete/{id}:
    delete:
      tags:
        - Partner Management
      summary: "Delete a partner by ID"
      description: |
        Note that partners with assigned business objects (e.g. outgoing or incoming invoices) cannot be deleted.\
        \
        **Sandbox:** Even though the endpoint may return a success no real partner will be deleted.
      operationId: "membershipContractorDelete"
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: "ID of the partner to be deleted"
      responses:
        200:
          description: "Partner was deleted successfully"
        400:
          $ref: '#/components/responses/BadRequestError'
          description: "Missing parameters, unparsable request or invalid user input"
        401:
          $ref: '#/components/responses/UnauthorizedError'
        500:
          description: An internal server error occurred. The cause is described in the error element of the response.
          headers:
            X-RateLimit-Limit:
              "$ref": "#/components/headers/x-rate-limit-limit"
            X-RateLimit-Remaining:
              "$ref": "#/components/headers/x-rate-limit-remaining"
            X-RateLimit-Reset:
              "$ref": "#/components/headers/x-rate-limit-reset"
            X-RateLimit-Cost:
              "$ref": "#/components/headers/x-rate-limit-cost"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'

components:
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
  responses:
    BadRequestError:
      description: Error parsing the request. Please check the request format and parameters.
      headers:
        X-RateLimit-Limit:
          "$ref": "#/components/headers/x-rate-limit-limit"
        X-RateLimit-Remaining:
          "$ref": "#/components/headers/x-rate-limit-remaining"
        X-RateLimit-Reset:
          "$ref": "#/components/headers/x-rate-limit-reset"
        X-RateLimit-Cost:
          "$ref": "#/components/headers/x-rate-limit-cost"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnauthorizedError:
      description: Access token is missing or invalid. Please provide a valid token in the Authorization header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - "request_id"
      properties:
        request_id:
          type: "string"
          description: "unique request identifier"
        error:
          type: "string"
          description: "error message"
    QueryArchiveRequest:
      type: object
      required:
        - "query"
      properties:
        query:
          type: "string"
          description: "cleartext query string in solR syntax"
          example: 'belegnummer:123* AND belegtyp:"Rechnung" AND belegdatum:[2025-01-01T00:00:00.000Z TO *]'
        rows:
          type: "number"
          description: "number of rows to return"
          minimum: 1
          maximum: 1000
          default: 1000
        include_metadata:
          type: "boolean"
          description: Indicates whether metadata should be included in the response.
          default: false
    QueryArchiveResponse:
      type: object
      required:
        - "result"
      properties:
        result:
          type: "array"
          items:
            $ref: '#/components/schemas/ObjectMetadata'
    ArchiveObjectTuple:
      type: object
      required:
        - metadata
        - b64_obj_data
      properties:
        metadata:
          $ref: "#/components/schemas/ObjectMetadata"
        b64_obj_data:
          type: string
          description: base64 encoded data to store as object
          example:
            JVBERi0xLjQKJcOiw6PDj8OTCjEgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cKICAgL1BhZ2VzIDIgMCBSCj4+CmVuZG9iagoyIDAgb2JqCjw8IC9UeXBlIC9QYWdlcwogICAvS2lkcyBbMyAwIFJdCiAgIC9Db3VudCAxCj4+CmVuZG9iagozIDAgb2JqCjw8IC9UeXBlIC9QYWdlCiAgIC9QYXJlbnQgMiAwIFIKICAgL01lZGlhQm94IFswIDAgNjEyIDc5Ml0KICAgL0NvbnRlbnRzIDQgMCBSCiAgIC9SZXNvdXJjZXMgPDwgPj4KPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiA+PgpzdHJlYW0KQlQKL0YxIDEyIFRmCjEwMCA3MDAgVGQKKFNhbXBsZSBQREYpIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iagoxNAplbmRvYmoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4gCjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3OCAwMDAwMCBuIAowMDAwMDAwMjk1IDAwMDAwIG4gCjAwMDAwMDAzNTQgMDAwMDAgbiAKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUgogICAvU2l6ZSA2Cj4+CnN0YXJ0eHJlZgo0MDkKJSVFT0Y=
    ArchiveStoreResponse:
      type: object
      required:
        - object_id
      properties:
        object_id:
          type: string
          description: The unique identifier of the archive object.
      example:
        object_id: storageserverV2://53d55620-3922-11ef-9c8c-525400123456
    UpdateMetadataRequest:
      type: object
      required:
        - id
        - metadata
      properties:
        id:
          type: string
          description: the unique archive object identifier
        metadata:
          $ref: "#/components/schemas/ObjectMetadata"
      example:
        id: storageserverV2://53d55620-3922-11ef-9c8c-525400123456
        metadata:
          stored_date: "2025-01-01T00:00:00.000Z"
          belegnummer: "1234"

    InvoiceValidationResult:
      type: object
      xml:
        name: validationResult
      properties:
        obwyseResult:
          type: object
          xml:
            name: obwyseResult
          properties:
            identification:
              allOf:
                - $ref: '#/components/schemas/InvoiceIdentification'
                - type: object
                  xml:
                    name: identification
                  properties:
                    isPDF:
                      type: boolean
                      example: true
                      xml:
                        name: isPDF
                    hasFileEmbedded:
                      type: boolean
                      example: true
                      xml:
                        name: hasFileEmbedded
                    embeddedIsXML:
                      type: boolean
                      example: true
                      xml:
                        name: embeddedIsXML
                    fileCorrectEmbedded:
                      type: boolean
                      example: true
                      xml:
                        name: fileCorrectEmbedded
                    fileEmbeddedType:
                      type: string
                      xml:
                        name: fileEmbeddedType
                    embeddedFilenameCorrect:
                      type: boolean
                      example: true
                      xml:
                        name: embeddedFilenameCorrect
                    embeddedFilename:
                      type: string
                      xml:
                        name: embeddedFilename
                    xmlReadable:
                      type: boolean
                      example: true
                      xml:
                        name: xmlReadable
                    xmlReadableError:
                      type: string
                      xml:
                        name: xmlReadableError
                    hasValidRootElement:
                      type: boolean
                      example: true
                      xml:
                        name: hasValidRootElement
                    rootElementName:
                      type: string
                      xml:
                        name: rootElementName
                    hasValidSyntax:
                      type: boolean
                      example: true
                      xml:
                        name: hasValidSyntax
                    hasValidProfile:
                      type: boolean
                      example: true
                      xml:
                        name: hasValidProfile
                    profileName:
                      type: string
                      xml:
                        name: profileName
                    PDFAConformanceLevel:
                      type: string
                      xml:
                        name: PDFAConformanceLevel
                    hasAllNamespaces:
                      type: boolean
                      example: true
                      xml:
                        name: hasAllNamespaces
                    missingNamespaces:
                      type: array
                      items:
                        type: string
                        xml:
                          name: namespace
                      xml:
                        name: missingNamespaces
                        wrapped: true
            specification:
              type: string
              example: FULLY_VALID
              enum: [FULLY_VALID, STRUCTURED_DATA_VALID, RESULTS_DIFFER, INVALID, UNKNOWN]
              xml:
                name: specification
            recommendation:
              type: string
              example: ACCEPT_FULLY_VALID
              enum: [REJECT_NOT_COMPLIANT_WITH_LAW, REJECT_ONLY_ACCOUNTING_AID, REJECT_INVALID, ACCEPT_DEPRECATED_VERSION_ON_AGREEMENT, ACCEPT_VALID_STRUCTURED_DATA, ACCEPT_FULLY_VALID, RESULTS_DIFFER, UNKNOWN]
              xml:
                name: recommendation
            annotations:
              type: array
              items:
                type: object
              description: "Annotations about the validation result, e.g. when unprioritized validators find the invoice to be invalid, even though the most prioritized validator finds it to be valid."
              xml:
                name: annotations
            validatorInformation:
              type: array
              items:
                $ref: '#/components/schemas/InvoiceValidationResultValidatorInformation'
              description: "Information about the validators that were used for validation."
              xml:
                name: validatorInformation
                wrapped: true
            invoiceOverview:
              $ref: '#/components/schemas/InvoiceValidationResultInvoiceOverview'
              description: "Overview about the validated invoice."
              xml:
                name: invoiceOverview
        reports:
          type: object
          xml:
            name: reports
          properties:
            mustangReport:
              type: object
              xml:
                name: mustangReport
              properties:
                validation:
                  type: object
                  xml:
                    name: validation
                  properties:
                    filename:
                      type: string
                      example: Ausgangsrechnung_Zugferd.csv.pdf
                      xml:
                        name: filename
                    datetime:
                      type: string
                      format: date-time
                      example: 2024-11-14T11:05:58
                      xml:
                        name: datetime
                    summary:
                      type: object
                      xml:
                        name: summary
                      properties:
                        status:
                          type: string
                          example: valid
                          xml:
                            name: status
            kositReport:
              type: object
              xml:
                name: kositReport
            valitoolReport:
              type: object
              xml:
                name: valitoolReport

    InvoiceValidationResultValidatorInformation:
      type: object
      xml:
        name: validator
      properties:
        type:
          type: string
          description: type of validator
          example: MUSTANG
          enum:
            - MUSTANG
            - KOSIT
            - VALITOOL
          xml:
            name: type
        version:
          type: string
          description: used version of the validator
          example: 2.22.0
          xml:
            name: version
        priority:
          type: integer
          description: Priority used for the validator during the validation. A higher number translates to a higher priority.
          example: 150
          xml:
            name: priority

    InvoiceValidationResultInvoiceOverview:
      type: object
      properties:
        invoiceNumber:
          type: string
          description: Invoice number (BT-1)
          xml:
            name: invoiceNumber
        invoiceDate:
          type: string
          description: "Invoice date (BT-2) - in 'yyyy-MM-dd' format"
          example: 2026-01-31
          xml:
            name: invoiceDate
        orderNumber:
          type: string
          description: Order number (BT-13)
          xml:
            name: orderNumber
        buyerName:
          type: string
          description: Buyer name (BT-44)
          xml:
            name: buyerName
        buyerCountry:
          type: string
          description: Buyer country code (BT-55)
          example: DE
          xml:
            name: buyerCountry
        buyerId:
          type: string
          description: Buyer ID (BT-46) - without scheme
          xml:
            name: buyerId
        buyerGLN:
          type: string
          description: "Buyer GLN (BT-46) - with schemeID '0088'"
          xml:
            name: buyerGLN
        buyerVatId:
          type: string
          description: "Buyer VAT ID (BT-48) - with schemeID 'VA' or 'VAT'"
          xml:
            name: buyerVatId
        sellerName:
          type: string
          description: Seller name (BT-27)
          xml:
            name: sellerName
        sellerCountry:
          type: string
          description: Seller country code (BT-40)
          example: DE
          xml:
            name: sellerCountry
        sellerId:
          type: string
          description: Seller ID (BT-29) - without scheme
          xml:
            name: sellerId
        sellerGLN:
          type: string
          description: "Seller GLN (BT-29) - with schemeID '0088'"
          xml:
            name: sellerGLN
        sellerVatId:
          type: string
          description: "Seller VAT ID (BT-31) - with schemeID 'VA' or 'VAT'"
          xml:
            name: sellerVatId
        sellerTaxId:
          type: string
          description: "Seller local tax ID (BT-32) - with schemeID 'FC'"
          xml:
            name: sellerTaxId

    InvoiceExtractionResponse:
      type: object
      properties:
        identification:
          $ref: '#/components/schemas/InvoiceIdentification'
        invoice:
          #$ref: '#/components/schemas/Invoice'
          # TODO add Invoice Object schema
          type: object

    InvoiceIdentification:
      type: object
      properties:
        filename:
          type: string
          example: Ausgangsrechnung_Zugferd.pdf
        isElectronicInvoice:
          type: boolean
          example: true
        xmlSyntax:
          type: string
          example: CII
        format:
          type: string
          example: ZUGFERD
        profile:
          type: string
          example: EXTENDED
        version:
          type: string
          example: 2.x
        subProfile:
          type: string
        subVersion:
          type: string

    ObjectMetadata:
      type: object
      properties:
        id:
          type: "string"
          description: "unique identifier of the object"
          example: "storageserverV2://117142a0-ce2b-11ef-999e-0800277591df"
        stored_date:
          type: string
          description: datetime string representing the import time
        filedate:
          type: string
          description: datetime string representing the import objects creation date (import file date)
        filesize:
          type: integer
          description: The size of the object in bytes
        filename:
          type: string
          description: The original filename of the imported object
        content-type:
          type: string
          description: The MIME type of the object
        mandant:
          type: string
          description: The technical identifier of the mandant
        untermandant:
          type: string
          description: The organizational unit to which the object belongs
        workflow:
          type: string
          description: The latest workflow that the object was or is part of
        belegnummer:
          type: string
          description: The internal document number of the object
        externebelegnummer:
          type: string
          description: The external document number of the object
        belegdatum:
          type: string
          description: The document date of the object (the date when it was created or became effective)
        belegtyp:
          type: string
          description: The document type of the object
        anlagedatum:
          type: string
          description: The logical creation date of the object
        datenherkunft:
          type: string
          description: import channel information
        belegseitenzahl:
          type: integer
          description: The number of pages in the document
        absendername:
          type: string
          description: sender name
        absenderstrasse:
          type: string
          description: sender address street
        absenderort:
          type: string
          description: sender address area
        absendernummer:
          type: string
          description: sender masterdata number
        empfaengername:
          type: string
          description: receiver name
        empfaengerstrasse:
          type: string
          description: receiver address street
        empfaengerort:
          type: string
          description: receiver address area
        empfaengernummer:
          type: string
          description: receiver masterdata number
        frachtfuehrername:
          type: string
          description: carrier's name
        frachtfuehrerstrasse:
          type: string
          description: carrier's address street
        frachtfuehrerort:
          type: string
          description: carrier's address area
        frachtfuehrernummer:
          type: string
          description: carrier's masterdata number
        skontosatz1:
          type: string
          description: discount 1 percent
        skontobetrag1:
          type: number
          description: discount 1 amount
        skontozeitpunkt1:
          type: string
          description: discount 1 until datetime
        skontosatz2:
          type: string
          description: discount 2 percent
        skontobetrag2:
          type: number
          description: discount 2 amount
        skontozeitpunkt2:
          type: string
          description: discount 2 until datetime
        skontosatz3:
          type: string
          description: discount 3 percent
        skontobetrag3:
          type: number
          description: discount 3 amount
        skontozeitpunkt3:
          type: string
          description: discount 3 until datetime
        skontosatzgesamt:
          type: string
          description: discount total percent
        skontobetraggesamt:
          type: number
          description: discount total amount
        skontozeitpunktgesamt:
          type: string
          description: discount total until datetime
        scankraft:
          type: string
          description: scanning personnel
        scandatum:
          type: string
          description: datetime of scanning
        barcodetext:
          type: array
          items:
            type: string
          description: barcode text
        barcodetyp:
          type: array
          items:
            type: string
          description: barcode type
        barcodex:
          type: array
          items:
            type: number
          description: relative x position on page
        barcodey:
          type: array
          items:
            type: number
          description: relative y position on page
        barcodebreite:
          type: array
          items:
            type: number
          description: barcode width
        barcodehoehe:
          type: array
          items:
            type: number
          description: barcode height
        barcodequality:
          type: array
          items:
            type: number
          description: quality of identification
        rechnungnummer:
          type: string
          description: invoice number
        rechnungdatum:
          type: string
          description: invoice date
        rechnungleistungsdatum:
          type: string
          description: invoice service fullfilment date
        rechnunglieferscheinnummer:
          type: array
          items:
            type: string
          description: invoice delivery statement number
        rechnungwaehrung1:
          type: string
          description: invoice currency 1
        rechnungbrutto1:
          type: number
          description: invoice gross amount 1
        rechnungnetto1:
          type: number
          description: invoice net amount 1
        rechnungmehrwertsteuer1:
          type: number
          description: invoice VAT amount 1
        rechnungsteuersatz1:
          type: number
          description: invoice VAT percent 1
        rechnungwaehrung2:
          type: string
          description: invoice currency 2
        rechnungbrutto2:
          type: number
          description: invoice gross amount 2
        rechnungnetto2:
          type: number
          description: invoice net amount 2
        rechnungmehrwertsteuer2:
          type: number
          description: invoice VAT amount 2
        rechnungsteuersatz2:
          type: number
          description: invoice VAT percent 2
        rechnungwaehrung3:
          type: string
          description: invoice currency 3
        rechnungbrutto3:
          type: number
          description: invoice gross amount 3
        rechnungnetto3:
          type: number
          description: invoice net amount 3
        rechnungmehrwertsteuer3:
          type: number
          description: invoice VAT amount 3
        rechnungsteuersatz3:
          type: number
          description: invoice VAT percent 3
        rechnungwaehrunggesamt:
          type: string
          description: invoice currency total
        rechnungbruttogesamt:
          type: number
          description: invoice gross amount total
        rechnungnettogesamt:
          type: number
          description: invoice net amount total
        rechnungmehrwertsteuergesamt:
          type: number
          description: invoice VAT amount total
        rechnungsteuersatzgesamt:
          type: number
          description: invoice VAT percent total
        rechnungfaelligkeitsdatum:
          type: string
          description: invoice due date
        rechnungvaluta:
          type: string
          description: invoice date of effective valuation
        rechnungnebenkostennetto:
          type: number
          description: invoice extra costs
        rechnungzahlbetrag:
          type: number
          description: invoice amount payable
        rechnungstornonummer:
          type: string
          description: invoice revocation number
        kreditorname:
          type: string
          description: creditor name
        kreditornummer:
          type: string
          description: creditor masterdata number
        kreditorstrasse:
          type: string
          description: creditor address street
        kreditorort:
          type: string
          description: creditor address area
        kreditorplz:
          type: string
          description: creditor address zip code
        kreditorvatid:
          type: string
          description: creditor VAT id
        kreditorsteuernummer:
          type: string
          description: creditor tax administrative number
        debitorname:
          type: string
          description: debtor name
        debitornummer:
          type: string
          description: debtor masterdata number
        debitorstrasse:
          type: string
          description: debtor address street
        debitorort:
          type: string
          description: debtor address area
        debitorplz:
          type: string
          description: debtor address zip code
        debitorvatid:
          type: string
          description: debtor VAT id
        debitorsteuernummer:
          type: string
          description: debtor tax administrative number
        katagreferenzenkundennummer:
          type: string
          description: customer reference number
        katagreferenzenempfaengerkundennummer:
          type: string
          description: receiving customer reference number
        katagreferenzenlieferantennummer:
          type: string
          description: supplier reference number
        katagkontoauszugbelegart:
          type: string
          description: statement of account document type
        katagkontoauszugnummer:
          type: number
          description: statement of account number
        katagkontoauszugkonto:
          type: string
          description: statement of account account number
        katagkontoauszugdatum:
          type: string
          description: statement of account date
        sapUpdate:
          type: string
          description: index update information field (e.g. flagging or source)
        identifieruuid:
          type: string
          description: archive object UUID
        identifiermigrationaltsystem:
          type: string
          description: archive object UUID in the source archive if object was migrated
        identifiertransformationserver:
          type: string
          description: unique identifier for backend transformations (preprocessing before import)
        druckprotokoll:
          type: string
          description: outputmanagement used protocol (e.g. lpd, smtp)
        druckdatum:
          type: string
          description: outputmanagement date of last output
        drucknachrichtenformat:
          type: string
          description: outputmanagement output format
        druckempfangsadresse:
          type: string
          description: outputmanagement to address
        druckempfangsbestaetigung:
          type: string
          description: outputmanagement receiver's receipt
        druckauftragsnummer:
          type: string
          description: outputmanagement transaction id
        nachdruckbenutzer:
          type: array
          items:
            type: string
          description: outputmanagement reprinting user
        nachdruckdatum:
          type: array
          items:
            type: string
          description: outputmanagement reprinting date
        nachdruckprotokoll:
          type: array
          items:
            type: string
          description: outputmanagement reprinting protocol
        nachdrucknachrichtenformat:
          type: array
          items:
            type: string
          description: outputmanagement reprinting output format
        nachdruckempfangsadresse:
          type: array
          items:
            type: string
          description: outputmanagement reprinting to address
        nachdruckempfangsbestaetigung:
          type: array
          items:
            type: string
          description: outputmanagement reprinting receiver's receipt
        nachdruckauftragsnummer:
          type: array
          items:
            type: string
          description: outputmanagement reprinting transaction id
        errornummer:
          type: integer
          description: error number
        errortext:
          type: string
          description: error text
        speditionauftragnummerversender:
          type: array
          items:
            type: string
          description: carrier sender's order number
        speditionunterauftragnummerversender:
          type: array
          items:
            type: string
          description: carrier sender's subcontract number
        speditionfirma:
          type: string
          description: carrier company
        speditiondossiernummer:
          type: string
          description: carrier file number
        speditionfahrzeug:
          type: string
          description: carrier vehicle
        speditionmatchcode1:
          type: string
          description: carrier location match code 1
        speditionmatchcode2:
          type: string
          description: carrier location match code 2
        sendungnummer:
          type: array
          items:
            type: string
          description: carrier tracking number
        packstuecknummer:
          type: array
          items:
            type: string
          description: carrier packaging number
        mandantindividuelltext1:
          type: string
          description: individually assigned metadata
        mandantindividuelltext2:
          type: string
          description: individually assigned metadata
        mandantindividuelltext3:
          type: string
          description: individually assigned metadata
        mandantindividuelltext4:
          type: string
          description: individually assigned metadata
        mandantindividuelltext5:
          type: string
          description: individually assigned metadata
        mandantindividuelltext6:
          type: string
          description: individually assigned metadata
        mandantindividuelltext7:
          type: string
          description: individually assigned metadata
        mandantindividuellmultitext1:
          type: array
          items:
            type: string
          description: individually assigned metadata
        mandantindividuellmultitext2:
          type: array
          items:
            type: string
          description: individually assigned metadata
        mandantindividuellmultitext3:
          type: array
          items:
            type: string
          description: individually assigned metadata
        mandantindividuelldatum1:
          type: string
          description: individually assigned metadata (datetime)
        mandantindividuelldatum2:
          type: string
          description: individually assigned metadata (datetime)
        mandantindividuelldatum3:
          type: string
          description: individually assigned metadata (datetime)
        mandantindividuelldatum4:
          type: string
          description: individually assigned metadata (datetime)
        mandantindividuellmultidatum1:
          type: array
          items:
            type: string
          description: individually assigned metadata
    InvoiceCreationRequest:
      type: object
      properties:
        dokument:
          $ref: '#/components/schemas/InvoiceCreationDokument'
        verkaeufer:
          $ref: '#/components/schemas/InvoiceCreationVerkaeufer'
        leistungsempfaenger:
          $ref: '#/components/schemas/InvoiceCreationLeistungsempfaenger'
        kaeufer:
          $ref: '#/components/schemas/InvoiceCreationKaeufer'
        geschaeftsabwicklung:
          $ref: '#/components/schemas/InvoiceCreationGeschaeftsabwicklung'
        zahlungsmittel:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationZahlungsmittel'
        positionen:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationPositionen'
        optionen:
          $ref: '#/components/schemas/InvoiceCreationOptionen'
    InvoiceCreationDokument:
      type: object
      description: Information that applies to the entire document, including headers, footers for the PDF, or total amount details.
      required:
        - format
        - version
        - profil
      properties:
        format:
          type: string
          enum:
            - zugferd
            - xrechnung
          description: >
            E-invoice format:
            * `zugferd` - ZUGFeRD
            * `xrechnung` - XRechnung
        version:
          type: string
          enum:
            - "2.0"
            - "2.1"
            - "2.2"
            - "2.3"
            - "2.4"
            - "3.0"
          description: >
            E-invoice format version:
            * `2.0` - xrechnung
            * `2.1` - zugferd
            * `2.2` - zugferd, xrechnung
            * `2.3` - zugferd, xrechnung
            * `2.4` - zugferd
            * `3.0` - xrechnung
        profil:
          type: string
          enum:
            - en16931
            - extended
            - standard
          description: >
            E-invoice format profile:
            * `en16931` - zugferd 
            * `extended` - zugferd
            * `standard` - xrechnung
        pdf_template_name:
          type: string
          description: >
            Name of the PDF Template
            * `invoice` - Outgoing Invoice logo left (German) 
            * `invoice_logo_right` - Outgoing Invoice logo right (German)
            * `invoice_en` - Outgoing Invoice logo left (English)
            * `invoice_en_logo_right` - Outgoing Invoice logo right (English)
          enum:
            - invoice
            - invoice_logo_right
            - invoice_en
            - invoice_en_logo_right
          default: invoice
        rechnung:
          type: object
          required:
            - rechnungstyp
            - rechnungsname
            - rechnungsnummer
            - rechnungsdatum
          properties:
            rechnungstyp:
              type: string
              description: >
                Defines the invoice type.
                * `380` - Rechnung, Ausgangsrechnung, Handelsrechnung, invoice, Commercial invoice
                * `381` - Stornorechnung, credit note, Kaufmännische Gutschrift
                * `384` - Korrekturrechnung, Rechnungskorrektur, corrected invoice
                * `389` - Eigenrechnung, Steuerrechtliche Gutschrift, self-billed invoice
                * `751` - Buchungshilfe, invoice Information for Accounting purposes
                * `875` - Abschlagsrechnung
                * `876` - Teilschlussrechnung
                * `877` - Schlussrechnung
                * `325` - Proforma, Proforma Rechnung, Proformarechnung, proforma invoice
              enum:
                - "380"
                - "381"
                - "384"
                - "389"
                - "751"
                - "875"
                - "876"
                - "877"
                - "325"
            rechnungsname:
              type: string
              description: Defines the name or label of the invoice.
              enum: [ "rechnung",
                      "invoice",
                      "ausgangsrechnung",
                      "commercial invoice",
                      "handelsrechnung",
                      "gutschriftsanzeige",
                      "credit note",
                      "stornorechnung",
                      "gutschrift",
                      "kaufmännische gutschrift",
                      "korrekturrechnung",
                      "rechnungskorrektur",
                      "corrected invoice",
                      "eigenrechnung",
                      "steuerrechtliche gutschrift",
                      "self-billed invoice",
                      "buchungshilfe",
                      "invoice information for accounting purposes",
                      "abschlagsrechnung",
                      "teilschlussrechnung",
                      "schlussrechnung",
                      "proforma",
                      "proforma rechnung",
                      "proformarechnung",
                      "proforma invoice" ]
            kopfzeile:
              type: string
              description: >
                Header text to appear on the invoice.
                If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
            fusszeile:
              type: string
              description: >
                Footer text to appear on the invoice.
                If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
            rechnungsnotizen:
              type: array
              description: Additional remarks or notes included on the invoice.
              items:
                type: string
            rechnungsnummer:
              type: string
              description: Invoice number
            rechnungsdatum:
              type: string
              format: date-time
              description: Invoice date
            test:
              type: boolean
              description: Flag indicating if the invoice is a test invoice
            buyerreference:
              type: string
              description: Buyer-specific routing ID (Leitweg-ID)
    InvoiceCreationVerkaeufer:
      type: object
      description: If 'use_configured_invoice_settings' option is set, this field may not be required if the respective default configuration includes all necessary information.
      properties:
        information:
          $ref: '#/components/schemas/InvoiceCreationVerkaeuferInformation'
        regulierung:
          $ref: '#/components/schemas/InvoiceCreationRegulierung'
    InvoiceCreationVerkaeuferInformation:
      type: object
      description: If 'use_configured_invoice_settings' option is set, this field may not be required if the respective default configuration includes all necessary information.
      required:
        - verkaeufer_unternehmen
        - verkaeufer_land
        - verkaeufer_plz
        - verkaeufer_ort
        - verkaeufer_adresse
      properties:
        verkaeufer_unternehmen:
          type: string
          description: >
            Company name.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_zusatz:
          type: string
          description: >
            Name of the department or registered office.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_zusatz2:
          type: string
          description: >
            Name of sub department.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_kontakt_id:
          type: string
          description: ID of the contact
        verkaeufer_kontakt_name:
          type: string
          description: >
            Name of the contact.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_kontakt_mail:
          type: array
          description: >
            Mail address of the contact.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
          items:
            $ref: '#/components/schemas/InvoiceCreationVerkaeuferKontaktMail'
        verkaeufer_kontakt_telefon:
          type: string
          description: >
            Phone number of the contact.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_kontakt_fax:
          type: string
          description: >
            Fax number of the contact.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_land:
          type: string
          description: >
            Country of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
          enum: [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CD", "CG", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MK", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" ]
        verkaeufer_plz:
          type: string
          description: >
            Postcode of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_ort:
          type: string
          description: >
            City of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_adresse:
          type: string
          description: >
            Address 1 of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_adresse_2:
          type: string
          description: Address 2 of the company
        verkaeufer_adresse_3:
          type: string
          description: Address 3 of the company
        verkaeufer_webseite:
          type: string
          description: >
            Web site of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_steuernummer:
          type: string
          description: >
            VAT ID of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_ust_idnr:
          type: string
          description: >
            VAT registration number of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_gln:
          type: string
          description: >
            GLN of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        verkaeufer_swift_id:
          type: string
          description: S.W.I.F.T. ID of the company
        verkaeufer_duns_id:
          type: string
          description: D-U-N-S ID of the company
        verkaeufer_odette_id:
          type: string
          description: ODETTE ID of the company
        verkaeufer_leitweg_id:
          type: string
          description: Leitweg ID of the company
    InvoiceCreationVerkaeuferKontaktMail:
      type: object
      properties:
        adresse:
          type: string
    InvoiceCreationRegulierung:
      type: object
      properties:
        hauptsitz:
          type: string
          description: >
            Main office of the company.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        handelsregister:
          type: string
          description: >
            Commercial register entry.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        handelsregisternummer:
          type: string
          description: >
            Commercial register number.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        art_unternehmensfuehrung:
          type: string
          description: >
            Type of company management, e.g. Managing Director.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
        unternehmensfuehrung:
          type: array
          description: >
            Name list of the management.
            If 'use_configured_invoice_settings' option is set, this value is filled by the respective default configuration when nothing is provided.
          items:
            type: string

    InvoiceCreationLeistungsempfaenger:
      type: object
      properties:
        information:
          $ref: '#/components/schemas/InvoiceCreationLeistungsempfaengerInformation'
    InvoiceCreationLeistungsempfaengerInformation:
      type: object
      required:
        - leistungsempfaenger_unternehmen
      properties:
        leistungsempfaenger_unternehmen:
          type: string
          description: Company name
        leistungsempfaenger_zusatz:
          type: string
          description: Name of the department or registered office
        leistungsempfaenger_zusatz2:
          type: string
          description: Name of sub department
        leistungsempfaenger_kontakt_id:
          type: string
          description: ID of the contact
        leistungsempfaenger_kontakt_name:
          type: string
          description: Name of the contact
        leistungsempfaenger_kontakt_mail:
          type: array
          description: Mail address of the contact
          items:
            $ref: '#/components/schemas/InvoiceCreationLeistungsempfaengerKontaktMail'
        leistungsempfaenger_kontakt_telefon:
          type: string
          description: Phone number of the contact
        leistungsempfaenger_kontakt_fax:
          type: string
          description: Fax number of the contact
        leistungsempfaenger_land:
          type: string
          description: Country of the company
          enum: [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CD", "CG", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MK", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" ]
        leistungsempfaenger_plz:
          type: string
          description: Postal code of the company
        leistungsempfaenger_ort:
          type: string
          description: City of the company
        leistungsempfaenger_adresse:
          type: string
          description: Street and house number of the company
        leistungsempfaenger_adresse_2:
          type: string
          description: Additional address information (Address line 2)
        leistungsempfaenger_adresse_3:
          type: string
          description: Additional address information (Address line 3)
    InvoiceCreationLeistungsempfaengerKontaktMail:
      type: object
      properties:
        adresse:
          type: string
    InvoiceCreationKaeufer:
      type: object
      properties:
        information:
          $ref: '#/components/schemas/InvoiceCreationKaeuferInformation'
    InvoiceCreationKaeuferInformation:
      type: object
      properties:
        kaeufer_unternehmen:
          type: string
          description: Company name
        kaeufer_zusatz:
          type: string
          description: Name of the department or registered office
        kaeufer_zusatz2:
          type: string
          description: Name of sub department
        kaeufer_kontakt_id:
          type: string
          description: ID of the contact
        kaeufer_kontakt_name:
          type: string
          description: Name of the contact
        kaeufer_kontakt_mail:
          type: array
          description: Mail address of the contact
          items:
            $ref: '#/components/schemas/InvoiceCreationKaeuferKontaktMail'
        kaeufer_kontakt_telefon:
          type: string
          description: Phone number of the contact
        kaeufer_kontakt_fax:
          type: string
          description: Fax number of the contact
        kaeufer_land:
          type: string
          description: Country of the company
          enum: [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CD", "CG", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MK", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" ]
        kaeufer_plz:
          type: string
          description: Postal code of the company
        kaeufer_ort:
          type: string
          description: Street and house number of the company (Address line 1)
        kaeufer_adresse:
          type: string
          description: Additional address information (Address line 2)
        kaeufer_adresse_2:
          type: string
          description: Additional address information (Address line 3)
        kaeufer_adresse_3:
          type: string
          description: Website of the company
        kaeufer_webseite:
          type: string
          description: VAT ID of the company
        kaeufer_ust_idnr:
          type: string
          description: VAT ID number of the company
        kaeufer_gln:
          type: string
          description: Global ID of the company
        kaeufer_swift_id:
          type: string
          description: S.W.I.F.T. ID of the company
        kaeufer_duns_id:
          type: string
          description: D-U-N-S ID of the company
        kaeufer_odette_id:
          type: string
          description: ODETTE ID of the company
        kaeufer_leitweg_id:
          type: string
          description: Leitweg ID of the company
    InvoiceCreationKaeuferKontaktMail:
      type: object
      properties:
        adresse:
          type: string
    InvoiceCreationGeschaeftsabwicklung:
      type: object
      properties:
        steueraufschluesselung:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationSteueraufschluesselung'
        lieferung:
          $ref: '#/components/schemas/InvoiceCreationLieferung'
        waehrung:
          type: string
        zahlungsreferenz:
          type: string
        zahlungsbedingungen:
          $ref: '#/components/schemas/InvoiceCreationZahlungsbedingungen'
        summierung:
          $ref: '#/components/schemas/InvoiceCreationSummierung'
        vereinbarung:
          $ref: '#/components/schemas/InvoiceCreationVereinbarung'
        preisanpassungen:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationPreisanpassungen'
        referenzierte_dokumente:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationReferenzierteDokumente'
        buchhaltung_konto:
          type: string
    InvoiceCreationSteueraufschluesselung:
      type: object
      required:
        - steuerbasis
        - steuerbetrag
        - steuersatz
      properties:
        steuerbasis:
          type: number
          description: Net taxable amount for trade tax.
        steuerbetrag:
          type: number
          description: Calculated amount of trade tax.
        steuersatz:
          type: number
          format: double
          description: Tax rate (in percent) applied to the taxable amount.
        befreiungs_code:
          type: string
          description: >
            Tax category code to be applied when an invoice is not subject to the standard rate.
            * `E` - tax-exempt
            * `Z` - zero-rated
            * `AE` - Reverse Charge
            * `K` - Exempt for intra-community supply
            * `G` - Free Export item, tax not charged
            * `O` - Services outside scope of tax
          enum: [ "E", "Z", "AE", "K", "G", "O" ]
        befreiungs_grund:
          type: string
          description: Reason for the trade tax exemption
    InvoiceCreationLieferung:
      type: object
      properties:
        leistungszeitraum:
          $ref: '#/components/schemas/InvoiceCreationLeistungszeitraum'
        lieferzeitpunkt:
          type: string
          format: date-time
        referenzierte_dokument:
          $ref: '#/components/schemas/InvoiceCreationReferenzierteDokument'
    InvoiceCreationLeistungszeitraum:
      type: object
      properties:
        von:
          type: string
          format: date-time
          description: Performance period for the transaction (start date)
        bis:
          type: string
          format: date-time
          description: Performance period for the transaction (end date)
    InvoiceCreationReferenzierteDokument:
      type: object
      properties:
        id:
          type: string
          description: ID of the referenced document.
        datum:
          type: string
          format: date-time
          description: Issue date of the referenced document.
    InvoiceCreationZahlungsbedingungen:
      type: object
      required:
        - faelligkeitsdatum
      properties:
        skonto:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationSkonto'
        faelligkeitsdatum:
          type: string
          format: date-time
          description: Due date for payment as per payment terms.
        zahlungsanweisung:
          type: string
          description: Payment terms description.
    InvoiceCreationSkonto:
      type: object
      properties:
        tage:
          type: integer
          format: int32
          description: Number of days within which the discount applies.
        prozent:
          type: number
          format: double
          description: Discount percentage applied if paid within the specified days.
    InvoiceCreationSummierung:
      type: object
      required:
        - brutto
        - netto
      properties:
        brutto:
          type: number
          description: Total gross amount of the transaction.
        netto:
          type: number
          description: Total net amount of the transaction.
        zuschlag:
          type: number
          description: Total surcharges applied at document level.
        abschlag:
          type: number
          description: Total discounts (allowances) applied at document level.
        steuerbasis:
          type: number
          description: Total taxable base amount of the transaction.
        steuerbetrag:
          type: number
          description: Total tax amount of the transaction.
        vorauszahlung:
          type: number
          description: Total prepaid amount for the transaction.
        zahlungspflichtig:
          type: number
          description: Final amount payable after all calculations.
    InvoiceCreationVereinbarung:
      type: object
      properties:
        anhaenge:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationAnhaenge'
        auftrags_dokument:
          $ref: '#/components/schemas/InvoiceCreationAuftragsDokument'
        vertrags_dokument:
          $ref: '#/components/schemas/InvoiceCreationVertragsDokument'
        projekt_dokument:
          $ref: '#/components/schemas/InvoiceCreationProjektDokument'
    InvoiceCreationAnhaenge:
      type: object
      properties:
        inhalt:
          type: string
          description: Base64-encoded content of the attachment.
        dateiname:
          type: string
          description: File name of the attachment.
        id:
          type: string
          description: Identifier or name of the attachment.
        typecode:
          type: string
          description: Type code of the attachment. For example, "916" stands for order-related attachments.
          enum:
            - "916"
        mime_typ:
          type: string
          description: MIME type of the attachment (e.g., application/pdf).
    InvoiceCreationAuftragsDokument:
      type: object
      properties:
        id:
          type: string
          description: Identifier or name of the order document.
        datum:
          type: string
          description: Date the order document was issued.
    InvoiceCreationVertragsDokument:
      type: object
      properties:
        id:
          type: string
          description: Identifier or name of the contract document.
        datum:
          type: string
          description: Date  the contract document was issued.
    InvoiceCreationProjektDokument:
      type: object
      properties:
        id:
          type: string
          description: Identifier or name of the project document.
        name:
          type: string
          description: Name of the project document
    InvoiceCreationPreisanpassungen:
      type: object
      required:
        - code
      properties:
        schalter:
          type: boolean
          description: Indicates whether the transaction includes an allowance or charge.
        prozentsatz:
          type: number
          description: Percentage rate applied to the allowance or charge.
        steuerbasis:
          type: number
          description: Monetary base amount for calculating the allowance or charge.
        grund:
          type: string
          description: Justification or reason for the allowance or charge.
        steuersatz:
          type: number
          format: double
          description: Tax rate (in percent) applied to the allowance or charge.
    InvoiceCreationReferenzierteDokumente:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the referenced document.
        datum:
          type: string
          format: date-time
          description: Date the referenced document was issued.
    InvoiceCreationZahlungsmittel:
      type: object
      properties:
        typ:
          type: string
          description: Type of payment method.
          enum: [ "ueberweisung", "bankueberweisung", "zahlung an bankkonto", "bankkarte", "kreditkarte", "debitkarte", "online zahlungsdienst", "sepa lastschrift", "bankeinzug", "lastschriftverfahren" ]
        konto:
          type: array
          description: >
            The first account stated in this list is the seller's account.
            It will be used for the electronic invoice data of regular invoices.
            That account will also be displayed on the PDF footer of invoices, although this may vary between pdf templates.
            A second account may be used to state the buyer's account.
            That account will be used in the electronic invoice data in case of invoice cancellations and invoice corrections.
            If 'use_configured_invoice_settings' option is set, this value is filled by the default seller bank account configuration when nothing is provided and the type of payment method is a bank transfer.
          items:
            $ref: '#/components/schemas/InvoiceCreationKonto'
    InvoiceCreationKonto:
      type: object
      properties:
        kredit_institut:
          type: string
          description: Name of the financial institution.
        bezeichnung:
          type: string
          description: Name of the account.
        iban:
          type: string
          description: IBAN (International Bank Account Number) of the payment account.
        bic:
          type: string
          description: BIC (Bank Identifier Code) of the payment account.
    InvoiceCreationPositionen:
      type: object
      required:
        - position
        - menge
        - einheit
        - brutto
      properties:
        position:
          type: string
          description: Identifier or label for the line item.
        freitext:
          type: string
          description: Description of the product or service provided.
        lieferdatum:
          type: string
          description: Delivery date of the item or service.
        menge:
          type: number
          description: Position quantity
        einheit:
          $ref: '#/components/schemas/InvoiceCreationEinheit'
        brutto:
          $ref: '#/components/schemas/InvoiceCreationBrutto'
        netto:
          $ref: '#/components/schemas/InvoiceCreationNetto'
        produkt:
          $ref: '#/components/schemas/InvoiceCreationProdukt'
    InvoiceCreationEinheit:
      type: object
      properties:
        code:
          type: string
          enum: [ "XBA", "XAE", "XAM", "XAP", "XAT", "XBB", "XBC", "XBD", "XBE", "XBF", "XBG", "XBO", "XBX", "XCS", "XCT", "XCX", "XNE", "XPX", "XRO", "XSA", "H87", "E25", "DAY", "H18", "HUR", "KGM", "KMT", "KWH", "LS", "LTR", "MIN", "MON", "MMK", "MMT", "MTK", "MTQ", "MTR", "NAR", "PR", "P1", "QAN", "SET", "TNE", "WEE", "WTT" ]
    InvoiceCreationBrutto:
      type: object
      required:
        - einzelpreis
      properties:
        einzelpreis:
          type: number
          description: Unit price of the item (after calculating item surcharges and discounts)
    InvoiceCreationNetto:
      type: object
      properties:
        einzelpreis:
          type: number
          description: Unit price of the item (before calculating item surcharges and discounts)
    InvoiceCreationProdukt:
      type: object
      required:
        - name
        - steuerbasis
      properties:
        name:
          type: string
          description: Name of the product
        beschreibung:
          type: string
          description: Description of the product
        gtin:
          type: string
          description: ID of the product, e.g. GTIN (Global Trade Item Number)
        gesamtbetrag:
          description: Total gross amount of the product (after surcharges and discounts).
          type: number
        steuerbasis:
          type: number
          description: Net amount of the product after offsetting discounts and surcharges
        steuern:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationSteuern'
        abrechnungszeitraum:
          $ref: '#/components/schemas/InvoiceCreationAbrechnungszeitraum'
        preisanpassungen:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCreationPreisanpassungen'
        kaeufer_id:
          type: string
          description: ID of the product for buyer
        verkaeufer_id:
          type: string
          description: ID of the product for seller
        zuschlag_gesamt:
          type: number
          description: Sum of the surcharges for the product
        abschlag_gesamt:
          type: number
          description: Total discounts for the product
    InvoiceCreationSteuern:
      type: object
      required:
        - steuersatz
      properties:
        steuersatz:
          type: number
          format: double
          description: Percentage tax rate used for calculating the tax amount
        steuerbasis:
          type: number
          description: The taxable amount of the product
        befreiungs_code:
          type: string
          description: >
            Tax category code to be applied when an invoice is not subject to the standard rate.
            * `E` - tax-exempt
            * `Z` - zero-rated
            * `AE` - Reverse Charge
            * `K` - Exempt for intra-community supply
            * `G` - Free Export item, tax not charged
            * `O` - Services outside scope of tax
          enum: [ "E", "Z", "AE", "K", "G", "O" ]
        befreiungs_grund:
          type: string
          description: Exemption reason for the trade tax of the product
    InvoiceCreationAbrechnungszeitraum:
      type: object
      properties:
        von:
          type: string
          format: date-time
          description: Billing period of the product (start date)
        bis:
          type: string
          format: date-time
          description: Billing period of the product (end date)
    InvoiceCreationOptionen:
      type: object
      properties:
        archivieren:
          type: boolean
          description: Option to archive the invoice
        senden_an:
          type: string
          description: Option to send the invoice via email. Automatically enables archiving.
        senden_cc_an:
          type: string
          description: Option to send the invoice via mail as CC
        senden_bcc_an:
          type: string
          description: Option to send the invoice via mail as BCC
        senden_an_template:
          type: string
          description: The obwyse E-Mail Template ID used
        logo:
          type: string
          description: "base64 encoded logo image (JPEG, PNG). recommended dimensions: 550 x 250 px"
        use_configured_invoice_settings:
          type: boolean
          description: >
            Option to use the configured settings and details configured in the obwyse system for the invoice creation.
            The configurations will be used as default values and will be overridden by any values provided in the invoice creation request body.
            Affected fields include header and footer texts, seller details and bank account details.
            The affected fields are further described in this documentation.
          default: false
    InvoiceCreationResponse:
      type: object
      required:
        - archiveId
      properties:
        archiveId:
          type: string
          description: The unique identifier of the archived invoice file.
        shippingId:
          type: string
          description: The unique identifier of the shipment, if the invoice was dispatched.
    ShippingStatusResponse:
      type: object
      required:
        - id
        - archiveId
        - status
        - statusDate
      properties:
        id:
          type: string
          description: Unique identifier of the shipment.
        archiveId:
          type: string
          description: Unique identifier of the archived object related to this shipment.
        status:
          type: string
          description: >
            Current status of the shipment:
            * `WAITING` - Waiting to be sent
            * `WAITING_FOR_ATTACHMENTS` - Waiting for missing attachments
            * `IN_WORKFLOW` - Currently in a workflow
            * `IN_PROCESS` - Currently being sent
            * `SENT` - Email has been sent
            * `ERROR` - An error occurred during shipment
            * `SUCCESS` - Shipment (non-email) was successful
          enum:
            - WAITING
            - WAITING_FOR_ATTACHMENTS
            - IN_WORKFLOW
            - IN_PROCESS
            - SENT
            - ERROR
            - SUCCESS
        statusDate:
          type: string
          description: Timestamp of the last status update.
          format: date-time
        errorMessage:
          type: string
          description: Reason for the error, if the status is `ERROR`.
    EmailTemplatesResponse:
      type: array
      description: List of available email templates for a specific use-case, like invoice creation.
      items:
        type: object
        description: Email template object.
        required:
          - id
          - name
        properties:
          id:
            type: string
            description: Unique identifier of the email template.
          name:
            type: string
            description: Name of the email template.
          description:
            type: string
            description: Detailed description of the email template.
    OrderCreationRequest:
      type: object
      description: Request JSON used to start electronic order creation processes.
      required:
        - order
        - options
      properties:
        options:
          $ref: '#/components/schemas/OrderCreationOptions'
          description: Options to choose for the order creation process.
        additionalData:
          $ref: '#/components/schemas/OrderCreationAdditionalData'
          description: Additional and optional data for the order to be created.
        order:
          $ref: '#/components/schemas/OrderCreationOrder'
          description: Data of order to be created.
    OrderCreationOptions:
      type: object
      description: Options to choose for the order creation process.
      required:
        - archive
        - format
        - fileFormat
      properties:
        archive:
          type: boolean
          description: 'Toggle if the created order is archived. If the order is archived, the response of the created will be a "OrderCreationResponse". If not, the response will be the file content of the created electronic order.'
        format:
          type: string
          description: 'The electronic order format to be created. The chosen identifier determines the format (e.g. "Order-X"), the profile (e.g. "Comfort") and the version (e.g. "1.0") of the electronic order.'
          example: ORDER_X_COMFORT_V1_0
          enum:
            - ORDER_X_BASIC_V1_0
            - ORDER_X_COMFORT_V1_0
            - ORDER_X_EXTENDED_V1_0
        fileFormat:
          type: string
          description: The file format of the electronic order to be created. Can be used to choose between XML-only or the hybrid format of PDFs with an embedded electronic order XML.
          enum:
            - XML
            - HYBRID
        language:
          type: string
          description: 'The language used to localize codelist codes to be used on PDFs, e.g. "NL" -> "Netherlands" for CountryCode localization. Note that most codelist code names are only localized in english and that english will be used as a fallback for these names. Also note that the localization of the pdf-template itself is not effected by this setting. Every pdf template has its own static language.'
          default: DE
          enum:
            - DE
            - EN
        pdfTemplateName:
          type: string
          description: The name of the PDF template to be used for PDF creation of hybrid electronic orders. Per default, only one pdf template is available, which is also the default when not set.
          default: electronic_order.xslt
          enum:
            - electronic_order.xslt
        orderFilename:
          type: string
          description: 'The filename of the electronic order to be created. May not contain file extensions, since those are auto-generated based on the requested file format. May not contain file directory separators like "\" or "/". This filename only affects the "outer" filename of the electronic order, so it does not effect the name of XMLs that are embedded in PDF.'
          default: electronic_order
        shipping:
          $ref: '#/components/schemas/OrderCreationShippingOptions'
          description: 'Shipping options for the dispatch of the electronic order to be created. These options are only applied when the "archive" option is active.'
    OrderCreationShippingOptions:
      type: object
      description: 'Shipping options for the dispatch of the electronic order to be created. These options are only applied when the "archive" option is active.'
      required:
        - mailTemplateId
        - toAddresses
      properties:
        mailTemplateId:
          type: string
          description: The identifier of an existing electronic order dispatch mail template. Existing mail templates may be fetched using the corresponding API.
          example: ET00001
        toAddresses:
          type: array
          description: List of to-addresses to dispatch the created electronic order to. Must contain atleast one address. Must only contain well-formed e-mail addresses.
          items:
            type: string
            description: Well-formed e-mail address.
            example: "example@email.address"
        ccAddresses:
          type: array
          description: List of cc-addresses to dispatch the created electronic order to. Must only contain well-formed e-mail addresses.
          items:
            type: string
            description: Well-formed e-mail address.
            example: "example@email.address"
        bccAddresses:
          type: array
          description: List of bcc-addresses to dispatch the created electronic order to. Must only contain well-formed e-mail addresses.
          items:
            type: string
            description: Well-formed e-mail address.
            example: "example@email.address"
    OrderCreationAdditionalData:
      type: object
      description: Additional and optional data for the order to be created.
      properties:
        logo:
          $ref: '#/components/schemas/OrderCreationImage'
          description: "Logo to be used on the PDF of a hybrid electronic order. Recommended dimensions: 550 x 250 px"
        logoPosition:
          $ref: '#/components/schemas/OrderCreationLogoPosition'
          description: Position to display the logo on the PDF of a hybrid electronic order.
          default: RIGHT
        regulatoryInformation:
          $ref: '#/components/schemas/OrderCreationRegulatoryInformation'
          description: Structured regulatory information about the document creator. Used to auto-generate an included note for the electronic order XML and used to be printed on the PDF of hybrid electronic orders.
    OrderCreationLogoPosition:
      type: string
      enum:
        - "LEFT"
        - "MIDDLE"
        - "RIGHT"
    OrderCreationImage:
      type: object
      properties:
        base64:
          type: string
          description: Base64 encoded content of the image (JPEG, PNG)
    OrderCreationRegulatoryInformation:
      type: object
      description: Structured regulatory information about the document creator. Used to auto-generate an included note for the electronic order XML and used to be printed on the PDF of hybrid electronic orders.
      properties:
        companyManagements:
          type: array
          description: List of the managing persons of the company.
          items:
            $ref: '#/components/schemas/OrderCreationCompanyManagement'
            description: A single manager.
        companyManagementLabel:
          type: string
          description: Type of company management.
          example: Geschäftsführer
        mainOffice:
          type: string
          description: Main office location of the company.
          example: Berlin
        registrarOfCompany:
          type: string
          description: Commercial register entry.
          example: Amtsgericht Charlottenburg
        commercialRegisterNumber:
          type: string
          description: Commercial register number of the company.
          example: HRB 1234567
    OrderCreationCompanyManagement:
      type: object
      description: Name of a company manager used to state regulatory information.
      required:
        - firstName
        - lastName
      properties:
        firstName:
          type: string
          description: First name of the manager
          example: Max
        lastName:
          type: string
          description: Last name of the manager
          example: Mustermann
    OrderCreationOrder:
      type: object
      description: >
        Data of order to be created.
        Please note that the given values may not be mapped based on the used order format.
        For example, the Order-X Basic format may not support all fields that may be filled in this JSON structure.
        Please be cautious about that, since stating unsupported values in a specific profile may result in them being used on PDFs of hybrid electronic orders, but not in the actual electronic order XML.
        This is the hierarchy of the Order-X formats: Basic -> Comfort -> Extended. Extended fields support all possible fields of the request structure.
        If no profile information is stated for a field, either all profiles support it, or its usability heavily relies on the context and overlying structures of that field.
        Note that if e.g. a field of a structure is supported by all formats from Comfort, but the overlying structure is only supported at Extended, the field will only be supported when using the Extended profile.
        For further assistance, please read this documentation carefully, examine the official documentation of the chosen electronic order format or contact our support.
      required:
        - document
        - transaction
      properties:
        document:
          $ref: '#/components/schemas/OrderCreationDocument'
          description: Details about the order document. Is mandatory for orders.
        transaction:
          $ref: '#/components/schemas/OrderCreationTransaction'
          description: Details about the transaction of the order. Is mandatory for orders.
    OrderCreationDocument:
      type: object
      description: Details about the order document.
      required:
        - orderType
        - documentNumber
        - issueDate
      properties:
        testIndicator:
          type: boolean
          description: Indicates if this order is a document for testing purposes.
        copyIndicator:
          type: boolean
          description: Indicates if this order is just a copy of an actual order.
        processType:
          type: string
          description: Used to specify the business process that this order stems from.
        orderType:
          type: string
          description: >
            The type of this order. Is mandatory for orders.
            * `ORDER` - Original order document to request certain products or services. Sent by the buyer.
            * `ORDER_CHANGE` - Order change request for a previously sent order. Sent by the buyer.
            * `ORDER_RESPONSE` - Response to an order request. Sent by the seller.
          enum:
            - ORDER
            - ORDER_CHANGE
            - ORDER_RESPONSE
        documentNumber:
          type: string
          description: Document number of this order document. Is mandatory for orders.
        documentName:
          type: string
          description: Name or title of this order document.
        issueDate:
          type: string
          description: 'Issue date of this order document. Must be in the date format "yyyy-MM-dd". Is mandatory for orders.'
          example: "2025-01-01"
        effectivePeriod:
          $ref: '#/components/schemas/OrderCreationPeriod'
          description: Period that this order document is effective for. Usable from Order-X Comfort profile.
        statusCode:
          type: string
          description: Code to specify the current status of this order document. Must be a code from codelist "UNTDID_1373_D20A".
        purposeCode:
          type: string
          description: Code to specify the purpose of this order document. Must be a code from codelist "UNTDID_1225_D20A".
        requestedResponse:
          type: string
          description: 'Used to request a specific response by the other party. Per specification, only a "ORDER_RESPONSE" may be requested (set as "AC" (Acknowledgement) in the order XML file).'
          enum:
            - ORDER_RESPONSE
        headerNote:
          $ref: '#/components/schemas/OrderCreationNote'
          description: Note to be printed on the PDF of hybrid electronic orders as the header note. Will be contained as an included note in the electronic order XML.
        footerNote:
          $ref: '#/components/schemas/OrderCreationNote'
          description: Note to be printed on the PDF of hybrid electronic orders as the footer note. Will be contained as an included note in the electronic order XML.
        notes:
          type: array
          description: List of notes regarding this order document.
          items:
            $ref: '#/components/schemas/OrderCreationNote'
            description: A single note.
    OrderCreationPeriod:
      type: object
      description: A period with start and end timestamps used for various statements of orders.
      properties:
        startDateTime:
          type: string
          description: Start timestamp of the period. Must be in the timestamp format "yyyy-MM-dd HH:mm".
          example: "2025-01-01 08:00"
        endDateTime:
          type: string
          description: Start timestamp of the period. Must be in the timestamp format "yyyy-MM-dd HH:mm".
          example: "2025-01-01 18:00"
    OrderCreationNote:
      type: object
      description: A note for an order document or an order document line.
      required:
        - content
      properties:
        content:
          type: string
          description: The content of the note. Is mandatory for notes.
        subjectCode:
          type: string
          description: Code to specify the subject of this note. Must be a code from codelist "UNTDID_4451_D20A".
        contentCode:
          type: string
          description: Mutually defined code for the content of this note. Must be synonymous with the content. Usable at Order-X Extended profile.
    OrderCreationTransaction:
      type: object
      description: Details about the transaction of the order.
      required:
        - agreement
        - delivery
        - settlement
      properties:
        documentLines:
          type: array
          description: 'Document lines of the order. Must not be empty for order types "ORDER" and "ORDER_CHANGE".'
          items:
            $ref: '#/components/schemas/OrderCreationDocumentLine'
            description: A single document line.
        agreement:
          $ref: '#/components/schemas/OrderCreationAgreement'
          description: Agreement details of the order. Is mandatory for orders transactions.
        delivery:
          $ref: '#/components/schemas/OrderCreationDelivery'
          description: Delivery details of the order. Is mandatory for order transactions.
        settlement:
          $ref: '#/components/schemas/OrderCreationSettlement'
          description: Settlement details of the order. Is mandatory for order transactions.
    OrderCreationDocumentLine:
      type: object
      description: A document line of an order.
      required:
        - lineId
        - agreement
        - delivery
        - settlement
      properties:
        lineId:
          type: string
          description: The line identifier of this line. Is mandatory for document lines.
        statusCode:
          type: string
          description: Code to specify the status of this specific document line. Must not be set for orders of type "ORDER" and must be set for orders of type "ORDER_RESPONSE". Must be a code from codelist "UNTDID_1229_D20A".
        product:
          $ref: '#/components/schemas/OrderCreationProduct'
          description: 'Product of this line. Must be set for orders of types "ORDER" and "ORDER_CHANGE".'
        substitutedProduct:
          $ref: '#/components/schemas/OrderCreationSubstitutedProduct'
          description: 'Substituted product for this line. Must not be set for orders of types "ORDER" and "ORDER_CHANGE".'
        agreement:
          $ref: '#/components/schemas/OrderCreationLineAgreement'
          description: Agreement details of this line. Is mandatory for document lines.
        delivery:
          $ref: '#/components/schemas/OrderCreationLineDelivery'
          description: Delivery details of this line. Is mandatory for document lines.
        settlement:
          $ref: '#/components/schemas/OrderCreationLineSettlement'
          description: Settlement details of this line. Is mandatory for document lines.
        notes:
          type: array
          description: List of notes regarding this document line.
          items:
            $ref: '#/components/schemas/OrderCreationNote'
            description: A single note.
    OrderCreationProduct:
      type: object
      description: Product of an order document line.
      properties:
        id:
          type: string
          description: Unique identifier of the product. Usable at Order-X Extended profile.
        globalIds:
          type: array
          description: List of global identifiers of the product based on an official ID scheme. Single usage possible from Order-X Basic profile, multiple usages at Order-X Extended profile.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        sellerAssignedId:
          type: string
          description: An identifier assigned by the seller for the product.
        buyerAssignedId:
          type: string
          description: An identifier assigned by the buyer for the product.
        name:
          type: string
          description: Name of the product. Usage is highly recommended.
        description:
          type: string
          description: Description of the product. Usable from Order-X Comfort profile.
        characteristics:
          type: array
          description: Characteristics of the product. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationProductCharacteristic'
            description: A single product characteristic
        packaging:
          $ref: '#/components/schemas/OrderCreationProductPackaging'
          description: Packaging information for the product. Usable from Order-X Comfort profile.
        originCountry:
          type: string
          description: 'Country code to specify the origin country of the product. Must be a code from codelist "ISO_1366_1_ALPHA_2_20250814". Usable from Order-X Comfort profile.'
        additionalDocuments:
          type: array
          description: Additionally referenced documents for the product. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationProductAdditionalDocument'
            description: A single additional document.
    OrderCreationGlobalId:
      type: object
      description: A global identifier based on an official ID scheme.
      required:
        - id
        - schemeId
      properties:
        id:
          type: string
          description: The ID value of the global identifier. Is mandatory for global identifiers.
        schemeId:
          type: string
          description: 'Code to specify the scheme of the global identifier. Must be a code from codelist "ISO_6523_ZF233". Is mandatory for global identifiers.'
    OrderCreationId:
      type: object
      description: An identifier that may optionally be based on an official ID scheme.
      required:
        - id
      properties:
        id:
          type: string
          description: The ID value of the identifier. Is mandatory for identifiers.
        schemeId:
          type: string
          description: 'Code to specify the scheme of the identifier. Must be a code from codelist "ISO_6523_ZF233".'
    OrderCreationProductCharacteristic:
      type: object
      description: A characteristic of a product.
      required:
        - description
        - value
      properties:
        typeCode:
          type: string
          description: 'Code to specify the type of characteristic. Must be a code from one of the codelists "UNTDID_6313_D20A" and "BT_X_11_ZF233". Shall be synonymous with the content of description.'
        description:
          type: string
          description: Description of the type of characteristic. Is mandatory for product characteristics.
          example: Color
        value:
          type: string
          description: Value of the characteristic. Is mandatory for product characteristics.
          example: Red
    OrderCreationProductPackaging:
      type: object
      description: Packaging information for a product.
      properties:
        typeCode:
          type: string
          description: 'Code to specify the type of packaging. Must be a code from codelist "UNECE_PACKAGE_TYPE_CODE_2006".'
    OrderCreationProductAdditionalDocument:
      type: object
      description: An additionally referenced document of an order document line product.
      properties:
        typeCode:
          type: string
          description: 'Code to specify the document type of the referenced document. Must be a code from codelist "UNTDID_1001_D20A".'
        id:
          type: string
          description: Unique issuer assigned ID of the referenced document.
        externalLocationUri:
          type: string
          description: Unique URI for the referenced document.
        description:
          type: string
          description: Description of the referenced document.
        attachedBinary:
          $ref: '#/components/schemas/OrderCreationAttachedBinary'
          description: Attached binary of the referenced document.
    OrderCreationLineAdditionalDocument:
      type: object
      description: An additionally referenced document of an order document line.
      properties:
        typeCode:
          type: string
          description: 'Code to specify the document type of the referenced document. Must be one of the codes ["50", "130", "916"] from codelist "UNTDID_1001_D20A".'
          enum:
            - "50"
            - "130"
            - "916"
        referenceTypeCode:
          type: string
          description: 'Code to specify the type of reference of the referenced document. Must be a code from codelist "UNTDID_1153_D20A".'
        id:
          type: string
          description: Unique issuer assigned ID of the referenced document.
        lineId:
          type: string
          description: Identifier of the referenced section or line of the referenced document.
        externalLocationUri:
          type: string
          description: Unique URI for the referenced document.
        description:
          type: string
          description: Description of the referenced document.
        referenceDate:
          type: string
          description: 'Issue date of the referenced document. Must be in the date format "yyyy-MM-dd". Usable at Order-X Extended profile.'
          example: "2025-01-01"
        attachedBinary:
          $ref: '#/components/schemas/OrderCreationAttachedBinary'
          description: Attached binary of the referenced document.
    OrderCreationAdditionalDocument:
      type: object
      description: An additionally referenced document of an order.
      required:
        - typeCode
      properties:
        typeCode:
          type: string
          description: 'Code to specify the document type of the referenced document. Must be one of the codes ["50", "130", "916"] from codelist "UNTDID_1001_D20A". Is mandatory for additional documents on order level.'
          enum:
            - "50"
            - "130"
            - "916"
        referenceTypeCode:
          type: string
          description: 'Code to specify the type of reference of the referenced document. Must be a code from codelist "UNTDID_1153_D20A".'
        id:
          type: string
          description: Unique issuer assigned ID of the referenced document.
        externalLocationUri:
          type: string
          description: Unique URI for the referenced document.
        description:
          type: string
          description: Description of the referenced document.
        referenceDate:
          type: string
          description: 'Issue date of the referenced document. Must be in the date format "yyyy-MM-dd". Usable at Order-X Extended profile.'
          example: "2025-01-01"
        attachedBinary:
          $ref: '#/components/schemas/OrderCreationAttachedBinary'
          description: Attached binary of the referenced document.
    OrderCreationAttachedBinary:
      type: object
      description: Attached binary of a referenced document.
      required:
        - filename
        - mimeType
        - base64
      properties:
        filename:
          type: string
          description: Filename of the document. Mandatory for attached binaries.
        mimeType:
          type: string
          description: File / Content type of the document. Mandatory for attached binaries.
          enum:
            - application/pdf
            - image/png
            - image/jpeg
            - text/csv
            - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
            - application/vnd.oasis.opendocument.spreadsheet
        base64:
          type: string
          description: Base64 encoded content of the document. Mandatory for attached binaries.
    OrderCreationSubstitutedProduct:
      type: object
      description: Substituted product of an order document line.
      properties:
        id:
          type: string
          description: Unique identifier of the substituted product. Usable at Order-X Extended profile.
        globalIds:
          type: array
          description: List of global identifiers of the substituted product based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        sellerAssignedId:
          type: string
          description: An identifier assigned by the seller for the substituted product.
        buyerAssignedId:
          type: string
          description: An identifier assigned by the buyer for the substituted product.
        name:
          type: string
          description: Name of the substituted product. Usage is highly recommended.
        description:
          type: string
          description: Description of the substituted product. Usable from Order-X Comfort profile.
    OrderCreationLineAgreement:
      type: object
      description: Agreement details of an order document line.
      required:
        - netPrice
      properties:
        minOrderableQuantity:
          type: number
          description: Minimum allowed quantity of the line product to be ordered. References the same unit as the requested quantity of the document line. Usable at Order-X Extended profile.
        maxOrderableQuantity:
          type: number
          description: Maximum allowed quantity of the line product to be ordered. References the same unit as the requested quantity of the document line. Usable at Order-X Extended profile.
        netPrice:
          $ref: '#/components/schemas/OrderCreationNetPrice'
          description: Net price details about the order document line. Is mandatory for order document line agreements.
        grossPrice:
          $ref: '#/components/schemas/OrderCreationGrossPrice'
          description: Gross price details about the order document line. Usable from Order-X Comfort profile.
        quotation:
          $ref: '#/components/schemas/OrderCreationLineReferencedDocument'
          description: Quotation or quotation section referenced for the order document line. Usable from Order-X Comfort profile.
        contract:
          $ref: '#/components/schemas/OrderCreationLineReferencedDocument'
          description: Contract or contract section referenced for the order document line. Usable at Order-X Extended profile.
        additionalDocuments:
          type: array
          description: Additionally referenced documents for the document line. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationLineAdditionalDocument'
            description: A single additional document.
    OrderCreationNetPrice:
      type: object
      description: Net price details for an order document line.
      required:
        - amount
      properties:
        amount:
          type: number
          description: Value of the net document line price. Exclusive of VAT but inclusive of price level discounts and charges. Is mandatory for net prices.
        baseQuantity:
          type: number
          description: Base quantity that the price value applies to. References the same unit as the requested quantity of the document line.
    OrderCreationGrossPrice:
      type: object
      description: Gross price details for an order document line.
      required:
        - amount
      properties:
        amount:
          type: number
          description: Value of the gross document line price. Exclusive of VAT and exclusive of price level discounts and charges. Is mandatory for gross prices.
        baseQuantity:
          type: number
          description: Base quantity that the price value applies to. References the same unit as the requested quantity of the document line.
        allowanceCharges:
          type: array
          description: List of allowances and charges for the document line price.
          items:
            $ref: '#/components/schemas/OrderCreationPriceAllowanceCharge'
            description: A single allowance or charge.
    OrderCreationPriceAllowanceCharge:
      type: object
      description: A single allowance or charge statement for an order document line price.
      required:
        - chargeIndicator
        - actualAmount
      properties:
        chargeIndicator:
          type: boolean
          description: Indicator if this statement is an allowance or a charge. Value is "true" for charges and "false" for allowances. Is mandatory for allowance charges.
        actualAmount:
          type: number
          description: The amount that is charged or discounted. Is mandatory for allowance charges.
        basisAmount:
          type: number
          description: The base amount used in conjunction with the calculation percent to determine the actual amount. Usable at Order-X Extended profile for document line prices.
        calculationPercent:
          type: number
          description: The calculation percent used in conjunction with the base amount to determine the actual amount. Usable at Order-X Extended profile for document line prices.
        reason:
          type: string
          description: The textual reason for this allowance or charge.
        reasonCode:
          type: string
          description: 'Code to specify the reason of this allowance or charge. Must be synonymous with the textual reason. Must be a code from codelist "UNTDID_5189_D20A" for allowances. Must be a code from codelist "UNTDID_7161_D20A" for charges.'
    OrderCreationLineAllowanceCharge:
      type: object
      description: A single allowance or charge statement for an order document line.
      required:
        - chargeIndicator
        - actualAmount
      properties:
        chargeIndicator:
          type: boolean
          description: 'Indicator if this statement is an allowance or a charge. Value is "true" for charges and "false" for allowances. Is mandatory for allowance charges.'
        actualAmount:
          type: number
          description: The amount that is charged or discounted. Is mandatory for allowance charges.
        basisAmount:
          type: number
          description: The base amount used in conjunction with the calculation percent to determine the actual amount.
        calculationPercent:
          type: number
          description: The calculation percent used in conjunction with the base amount to determine the actual amount.
        reason:
          type: string
          description: The textual reason for this allowance or charge.
        reasonCode:
          type: string
          description: 'Code to specify the reason of this allowance or charge. Must be synonymous with the textual reason. Must be a code from codelist "UNTDID_5189_D20A" for allowances. Must be a code from codelist "UNTDID_7161_D20A" for charges.'
    OrderCreationHeaderAllowanceCharge:
      type: object
      description: A single allowance or charge statement on order level.
      required:
        - chargeIndicator
        - actualAmount
      properties:
        chargeIndicator:
          type: boolean
          description: Indicator if this statement is an allowance or a charge. Value is "true" for charges and "false" for allowances. Is mandatory for allowance charges.
        actualAmount:
          type: number
          description: The amount that is charged or discounted. Is mandatory for allowance charges.
        basisAmount:
          type: number
          description: The base amount used in conjunction with the calculation percent to determine the actual amount.
        calculationPercent:
          type: number
          description: The calculation percent used in conjunction with the base amount to determine the actual amount.
        reason:
          type: string
          description: The textual reason for this allowance or charge.
        reasonCode:
          type: string
          description: 'Code to specify the reason of this allowance or charge. Must be synonymous with the textual reason. Must be a code from codelist "UNTDID_5189_D20A" for allowances. Must be a code from codelist "UNTDID_7161_D20A" for charges.'
        sequence:
          type: integer
          description: The sequence number for applying this allowance or charge when using multiple statements. Usable at Order-X Extended profile.
        baseQuantity:
          $ref: '#/components/schemas/OrderCreationQuantityOptionalUnit'
          description: Base quantity of the allowance or charge. Usable at Order-X Extended profile.
        tradeTax:
          $ref: '#/components/schemas/OrderCreationCategoryTradeTax'
          description: Trade tax details that apply to this allowance or charge.
    OrderCreationLineReferencedDocument:
      type: object
      description: A referenced document or document section for an order document line.
      properties:
        id:
          type: string
          description: Unique issuer assigned ID of the referenced document.
        lineId:
          type: string
          description: Identifier of the referenced section or line of the referenced document.
        referenceDate:
          type: string
          description: 'Issue date of the referenced document. Must be in the date format "yyyy-MM-dd". Usable at Order-X Extended profile.'
          example: "2025-01-01"
    OrderCreationReferencedDocument:
      type: object
      description: A referenced document of an order.
      required:
        - id
      properties:
        id:
          type: string
          description: Unique issuer assigned ID of the referenced document. Is mandatory for referenced documents on order level.
        referenceDate:
          type: string
          description: 'Issue date of the referenced document. Must be in the date format "yyyy-MM-dd". Usable at Order-X Extended profile.'
          example: "2025-01-01"
    OrderCreationLineDelivery:
      type: object
      description: Delivery details of an order document line.
      required:
        - requestedQuantity
      properties:
        partialDeliveryAllowed:
          type: boolean
          description: Indicator if the delivery of this order document line can be partially executed.
        requestedQuantity:
          $ref: '#/components/schemas/OrderCreationQuantityMandatoryUnit'
          description: Requested quantity for this document line. Used in conjunction with the document line net price to determine the line summation details if agreed quantity is not given. Is mandatory for order document line deliveries.
        agreedQuantity:
          $ref: '#/components/schemas/OrderCreationQuantityMandatoryUnit'
          description: 'Agreed quantity for this document line that may be stated in order responses. Used in conjunction with the document line net price to determine the line summation details. Must not be set for orders of types "ORDER" and "ORDER_CHANGE".'
        shipTo:
          $ref: '#/components/schemas/OrderCreationLineTradeParty'
          description: Details about the trade party that receives the goods and services of this order document line. Usable at Order-X Extended profile.
        ultimateShipTo:
          $ref: '#/components/schemas/OrderCreationLineTradeParty'
          description: Details about the trade party that ultimately receives the goods and services of this order document line. Usable at Order-X Extended profile.
        deliveryEvents:
          type: array
          description: Requested delivery events for this order document line. Stating deliveries is mutually exclusive to stating pickups. Single usage possible from Order-X Comfort profile, multiple usages at Order-X Extended profile.
          items:
            $ref: '#/components/schemas/OrderCreationLineDeliveryEvent'
            description: A single line delivery event.
        pickupEvents:
          type: array
          description: Requested pick-up events for this order document line. Stating pick-ups is mutually exclusive to stating deliveries. Single usage possible from Order-X Comfort profile, multiple usages at Order-X Extended profile.
          items:
            $ref: '#/components/schemas/OrderCreationLineDeliveryEvent'
            description: A single line pick-up event.
    OrderCreationQuantityMandatoryUnit:
      type: object
      description: Quantity details with mandatory unit for various statements of orders.
      required:
        - quantity
        - unitCode
      properties:
        quantity:
          type: number
          description: Quantity value. Is mandatory for quantity statements.
        unitCode:
          type: string
          description: 'Unit code to specify the unit of this quantity. Must be a code from one of the codelists "UNECE_RECOMMENDATION_20_ZF233" and "UNECE_RECOMMENDATION_21_ZF233". Is mandatory for this type of quantity.'
    OrderCreationQuantityOptionalUnit:
      type: object
      description: Quantity details with optional unit for various statements of orders.
      required:
        - quantity
      properties:
        quantity:
          type: number
          description: Quantity value. Is mandatory for quantity statements.
        unitCode:
          type: string
          description: 'Unit code to specify the unit of this quantity. Must be a code from one of the codelists "UNECE_RECOMMENDATION_20_ZF233" and "UNECE_RECOMMENDATION_21_ZF233".'
    OrderCreationLineTradeParty:
      type: object
      description: Details about a trade party on line level.
      required:
        - name
      properties:
        id:
          type: string
          description: Unique identifier of the line trade party.
        globalIds:
          type: array
          description: List of global identifiers of the line trade party based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        name:
          type: string
          description: The full formal name the line trade party. Is mandatory for trade parties.
        contacts:
          type: array
          description: List of contacts for the line trade party.
          items:
            $ref: '#/components/schemas/OrderCreationContact'
            description: A single contact.
        vatRegistrations:
          type: array
          description: List of VAT registration identifiers of the line trade party.
          items:
            type: string
            description: A single VAT registration number.
        taxRegistrations:
          type: array
          description: List of tax registration identifiers of the line trade party.
          items:
            type: string
            description: A single tax registration number.
        electronicAddress:
          $ref: '#/components/schemas/OrderCreationElectronicAddress'
          description: Electronic address of the line trade party.
        legalOrganization:
          $ref: '#/components/schemas/OrderCreationLegalOrganization'
          description: Details about the legal organization of the line trade party.
        postalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the line trade party.
    OrderCreationBuyerTradeParty:
      type: object
      description: 'Details about the buyer trade party of an order. Is the trade party that initiates the order process. The buyer must either have an "id", an entry in "vatRegistrations" or a "legalOrganization.registrationId".'
      required:
        - name
        - postalAddress
      properties:
        id:
          type: string
          description: Unique identifier of the buyer trade party.
        globalIds:
          type: array
          description: List of global identifiers of the buyer trade party based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        name:
          type: string
          description: The full formal name the buyer trade party. Is mandatory for trade parties.
        contacts:
          type: array
          description: List of contacts for the buyer trade party. Single usage possible from Order-X Basic profile, multiple usages from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationContact'
            description: A single contact.
        vatRegistrations:
          type: array
          description: 'List of VAT registration identifiers of the buyer trade party. Single usage possible from Order-X Basic profile, double usage from Order-X Comfort profile and unlimited usages at Order-X Extended profile. Be aware that entries from "taxRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single VAT registration number.
        taxRegistrations:
          type: array
          description: 'List of tax registration identifiers of the buyer trade party. Double usage possible from Order-X Comfort profile, unlimited usages at Order-X Extended profile. Be aware that entries from "vatRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single tax registration number.
        electronicAddress:
          $ref: '#/components/schemas/OrderCreationElectronicAddress'
          description: Electronic address of the buyer trade party. May be used to indicate the address to which order responses shall be delivered.
        legalOrganization:
          $ref: '#/components/schemas/OrderCreationLegalOrganizationWithAddress'
          description: Details about the legal organization of the buyer trade party. May include an additional legal postal address.
        postalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the buyer trade party. Is mandatory for the buyer trade party.
        additionalLegalInformation:
          type: string
          description: Additional legal information about the buyer. Usable at Order-X Extended profile.
    OrderCreationSellerTradeParty:
      type: object
      description: 'Details about the seller trade party of an order. Is the trade party that receives the order. The seller must either have an "id", an entry in "vatRegistrations" or a "legalOrganization.registrationId".'
      required:
        - name
      properties:
        id:
          type: string
          description: Unique identifier of the seller trade party.
        globalIds:
          type: array
          description: List of global identifiers of the seller trade party based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        name:
          type: string
          description: The full formal name the seller trade party. Is mandatory for trade parties.
        contacts:
          type: array
          description: List of contacts for the seller trade party. Single usage possible from Order-X Basic profile, multiple usages from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationContact'
            description: A single contact.
        vatRegistrations:
          type: array
          description: 'List of VAT registration identifiers of the seller trade party. Single usage possible from Order-X Basic profile, double usage from Order-X Comfort profile and unlimited usages at Order-X Extended profile. Be aware that entries from "taxRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single VAT registration number.
        taxRegistrations:
          type: array
          description: 'List of tax registration identifiers of the seller trade party. Double usage possible from Order-X Comfort profile, unlimited usages at Order-X Extended profile. Be aware that entries from "vatRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single tax registration number.
        electronicAddress:
          $ref: '#/components/schemas/OrderCreationElectronicAddress'
          description: Electronic address of the seller trade party. May be used to indicate the address to which the order is dispatched.
        legalOrganization:
          $ref: '#/components/schemas/OrderCreationLegalOrganizationWithAddress'
          description: Details about the legal organization of the seller trade party. May include an additional legal postal address.
        postalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the seller trade party.
        additionalLegalInformation:
          type: string
          description: Additional legal information about the seller. Usable from Order-X Comfort profile.
    OrderCreationHeaderShipToTradeParty:
      type: object
      description: Details about the ship-to trade party of an order. Is the trade party that receives the ordered goods or services instead of the buyer.
      required:
        - name
        - postalAddress
      properties:
        id:
          type: string
          description: Unique identifier of the ship-to trade party.
        globalIds:
          type: array
          description: List of global identifiers of the ship-to trade party based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        name:
          type: string
          description: The full formal name the ship-to trade party. Is mandatory for trade parties.
        contacts:
          type: array
          description: List of contacts for the ship-to trade party. Single usage possible from Order-X Basic profile, multiple usages from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationContact'
            description: A single contact.
        vatRegistrations:
          type: array
          description: 'List of VAT registration identifiers of the ship-to trade party. Single usage possible from Order-X Basic profile, double usage from Order-X Comfort profile and unlimited usages at Order-X Extended profile. Be aware that entries from "taxRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single VAT registration number.
        taxRegistrations:
          type: array
          description: 'List of tax registration identifiers of the ship-to trade party. Double usage possible from Order-X Comfort profile, unlimited usages at Order-X Extended profile. Be aware that entries from "vatRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single tax registration number.
        electronicAddress:
          $ref: '#/components/schemas/OrderCreationElectronicAddress'
          description: Electronic address of the ship-to trade party.
        legalOrganization:
          $ref: '#/components/schemas/OrderCreationLegalOrganizationWithAddress'
          description: Details about the legal organization of the ship-to trade party. May include an additional legal postal address.
        postalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the ship-to trade party.
    OrderCreationHeaderTradeParty:
      type: object
      description: Details about a trade party on order level.
      required:
        - name
      properties:
        id:
          type: string
          description: Unique identifier of the order trade party.
        globalIds:
          type: array
          description: List of global identifiers of the order trade party based on an official ID scheme.
          items:
            $ref: '#/components/schemas/OrderCreationGlobalId'
            description: A single global identifier.
        name:
          type: string
          description: The full formal name the order trade party. Is mandatory for trade parties.
        contacts:
          type: array
          description: List of contacts for the order trade party. Single usage possible from Order-X Basic profile, multiple usages from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationContact'
            description: A single contact.
        vatRegistrations:
          type: array
          description: 'List of VAT registration identifiers of the order trade party. Single usage possible from Order-X Basic profile, double usage from Order-X Comfort profile and unlimited usages at Order-X Extended profile. Be aware that entries from "taxRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single VAT registration number.
        taxRegistrations:
          type: array
          description: 'List of tax registration identifiers of the order trade party. Double usage possible from Order-X Comfort profile, unlimited usages at Order-X Extended profile. Be aware that entries from "vatRegistrations" also account for the maximum mappable amount of identifiers.'
          items:
            type: string
            description: A single tax registration number.
        electronicAddress:
          $ref: '#/components/schemas/OrderCreationElectronicAddress'
          description: Electronic address of the order trade party.
        legalOrganization:
          $ref: '#/components/schemas/OrderCreationLegalOrganizationWithAddress'
          description: Details about the legal organization of the order trade party. May include an additional legal postal address.
        postalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the order trade party.
    OrderCreationContact:
      type: object
      description: Details about a contact of a trade party.
      properties:
        contactType:
          type: string
          description: 'Code to specify the type of contact. Must be a code from codelist "UNTDID_3139_D20A". Usable from Order-X Comfort profile.'
        personName:
          type: string
          description: Person name of the contact.
        departmentName:
          type: string
          description: Department name of the contact.
        emailAddress:
          type: string
          description: E-mail address of the contact. Must be a well-formed e-mail address.
          example: "example@email.address"
        phoneNumber:
          type: string
          description: Phone number of the contact. Must only contain digits, spaces, dashes, parentheses, and plus signs and must contain at least one digit.
          example: "+49 0123 4567-89"
        faxNumber:
          type: string
          description: Fax number of the contact. Must only contain digits, spaces, dashes, parentheses, and plus signs and must contain at least one digit. Usable at Order-X Extended profile.
          example: "+49 0123 4567-89"
    OrderCreationElectronicAddress:
      type: object
      description: Electronic address with a specific scheme. Can, among other things, be used to state e-mail addresses.
      required:
        - uri
        - schemeId
      properties:
        uri:
          type: string
          description: Value of the electronic address. Is mandatory for electronic addresses.
          example: eletronic-address@as.mail
        schemeId:
          type: string
          description: 'Scheme of the electronic address. Must be a code from codelist "CEF_EAS_ZF233". Is mandatory for electronic addresses.'
          example: "EM"
    OrderCreationLegalOrganization:
      type: object
      description: Details about the legal organization of trade parties.
      properties:
        registrationId:
          $ref: '#/components/schemas/OrderCreationId'
          description: Registration Identifier of the legal organization.
        tradingName:
          type: string
          description: Trading name of the legal organization.
    OrderCreationLegalOrganizationWithAddress:
      type: object
      description: Details about the legal organization of trade parties. May include a legal postal address.
      properties:
        registrationId:
          $ref: '#/components/schemas/OrderCreationId'
          description: Registration Identifier of the legal organization.
        tradingName:
          type: string
          description: Trading name of the legal organization.
        legalPostalAddress:
          $ref: '#/components/schemas/OrderCreationPostalAddress'
          description: Postal address of the legal organization. Usable at Order-X Extended profile.
    OrderCreationPostalAddress:
      type: object
      description: Postal address details for trade parties or legal organizations.
      required:
        - country
      properties:
        addressLineOne:
          type: string
          description: First address line of the postal address.
        addressLineTwo:
          type: string
          description: Second address line of the postal address.
        addressLineThree:
          type: string
          description: Third address line of the postal address.
        postalCode:
          type: string
          description: Postal code of the postal address.
        area:
          type: string
          description: Area or city name of the postal address.
        countrySubdivision:
          type: string
          description: Country subdivision of the postal address.
        country:
          type: string
          description: 'Country code to specify the country of the postal address. Must be a code from codelist "ISO_1366_1_ALPHA_2_20250814". Is mandatory for postal addresses.'
          example: "DE"
    OrderCreationLineDeliveryEvent:
      type: object
      description: Details about a requested delivery or pick-up event for order document lines. Must include a non-empty period or a date.
      properties:
        period:
          $ref: '#/components/schemas/OrderCreationPeriod'
          description: 'Period of the event. Must include a start or end timestamp when "date" is not stated.'
        date:
          type: string
          description: 'Date of the event. Must be in the date format "yyyy-MM-dd". Must be present when "period" is not stated.'
          example: "2025-01-01"
        quantity:
          $ref: '#/components/schemas/OrderCreationQuantityMandatoryUnit'
          description: Quantity to be delivered or picked up in the event. Usable at Order-X Extended profile.
    OrderCreationDeliveryEvent:
      type: object
      description: Details about a requested delivery or pick-up event. Must include a non-empty period or a date.
      properties:
        period:
          $ref: '#/components/schemas/OrderCreationPeriod'
          description: 'Period of the event. Must include a start or end timestamp when "date" is not stated.'
        date:
          type: string
          description: 'Date of the event. Must be in the date format "yyyy-MM-dd". Must be present when "period" is not stated.'
          example: "2025-01-01"
    OrderCreationLineSettlement:
      type: object
      description: Settlement details of an order document line.
      required:
        - summation
      properties:
        allowanceCharges:
          type: array
          description: List of allowances and charges for the order document line. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationLineAllowanceCharge'
            description: A single allowance or charge.
        tradeTax:
          $ref: '#/components/schemas/OrderCreationLineApplicableTradeTax'
          description: VAT details for the order document line. Usable from Order-X Comfort profile.
        summation:
          $ref: '#/components/schemas/OrderCreationLineSummation'
          description: Monetary summation of the order document line. Is mandatory for order document line settlements.
        accountingReference:
          $ref: '#/components/schemas/OrderCreationAccountingReference'
          description: Accounting account specified for this order document line. Usable from Order-X Comfort profile.
    OrderCreationCategoryTradeTax:
      type: object
      description: VAT details to specify the category and rate of the tax.
      required:
        - categoryCode
      properties:
        categoryCode:
          type: string
          description: 'Code to specify the category of the tax. Must be a code from codelist "UNTDID_5305_ZF232_SUBSET". Is mandatory for trade taxes.'
          default: "S"
        ratePercent:
          type: number
          description: 'Rate of the tax in percent. Must not be greater than "0" when category is not "Standard rate" ("S"). Must not be "0" when category is "Standard rate" ("S").'
          example: 19
    OrderCreationLineApplicableTradeTax:
      type: object
      description: VAT details for a order document line.
      required:
        - categoryCode
      properties:
        categoryCode:
          type: string
          description: 'Code to specify the category of the tax. Must be a code from codelist "UNTDID_5305_ZF232_SUBSET". Is mandatory for trade taxes.'
          default: "S"
        ratePercent:
          type: number
          description: 'Rate of the tax in percent. Must not be greater than "0" when category is not "Standard rate" ("S"). Must not be "0" when category is "Standard rate" ("S").'
          example: 19
        calculatedAmount:
          type: number
          description: The calculated amount of the tax. Usable at Order-X Extended profile.
        exemptionReason:
          type: string
          description: Textual reason for a tax exemption. Usable at Order-X Extended profile.
        exemptionReasonCode:
          type: string
          description: 'Code to specify a tax exemption reason. Must be synonymous with the textual reason. Must be a code from codelist "CEF_VATEX_ZF233". Usable at Order-X Extended profile.'
    OrderCreationHeaderApplicableTradeTax:
      type: object
      description: A single tax statement on order level.
      required:
        - typeCode
        - categoryCode
        - calculatedAmount
        - basisAmount
      properties:
        typeCode:
          type: string
          description: 'Code to specify the type of tax. Must be a code from codelist "UNTDID_5153_D20A". Is mandatory for order level trade taxes.'
          default: "VAT"
        categoryCode:
          type: string
          description: 'Code to specify the category of the tax. Must be a code from codelist "UNTDID_5305_ZF232_SUBSET". Is mandatory for trade taxes.'
          default: "S"
        ratePercent:
          type: number
          description: 'Rate of the tax in percent. Must not be greater than "0" when category is not "Standard rate" ("S"). Must not be "0" when category is "Standard rate" ("S").'
          example: 19
        calculatedAmount:
          type: number
          description: The calculated amount of the tax. Is mandatory for order level trade taxes.
        basisAmount:
          type: number
          description: The total basis amount that this tax applies to. Is mandatory for order level trade taxes.
        lineTotalBasisAmount:
          type: number
          description: The partial basis amount that this tax applies to from order document lines.
        allowanceChargeBasisAmount:
          type: number
          description: The partial basis amount that this tax applies to from order level allowances and charges.
        exemptionReason:
          type: string
          description: Textual reason for a tax exemption.
        exemptionReasonCode:
          type: string
          description: 'Code to specify a tax exemption reason. Must be synonymous with the textual reason. Must be a code from codelist "CEF_VATEX_ZF233".'
        dueDateCode:
          type: string
          description: 'Code to specify the due date of the tax. Must be a code from codelist "UNTDID_2005_ZF233_SUBSET".'
    OrderCreationLineSummation:
      type: object
      description: Monetary summation of an order document line.
      required:
        - lineTotalAmount
      properties:
        lineTotalAmount:
          type: number
          description: Total amount of this order document line. Exclusive of VAT and inclusive of line level allowance and charges. Is mandatory for order document line summations.
        chargeTotalAmount:
          type: number
          description: Total amount of charges on this order document line. Usable at Order-X Extended profile.
        allowanceTotalAmount:
          type: number
          description: Total amount of allowances on this order document line. Usable at Order-X Extended profile.
        taxTotalAmount:
          type: number
          description: Total amount of VAT applicable for this order document line. Usable at Order-X Extended profile.
    OrderCreationAccountingReference:
      type: object
      description: Accounting account details to be specified for orders or order document lines.
      required:
        - id
      properties:
        id:
          type: string
          description: Identifier of the accounting account. Is mandatory for accounting accounts.
        typeCode:
          type: string
          description: 'Code to specify the type of accounting account. Must be a code from codelist "BT_X_290_ZF233". Usable at Order-X Extended profile.'
    OrderCreationAgreement:
      type: object
      description: Agreement details of an order.
      required:
        - buyer
        - seller
      properties:
        buyerReference:
          type: string
          description: 'An identifier assigned by the buyer for routing purposes. For example a "Leitweg-ID".'
        buyer:
          $ref: '#/components/schemas/OrderCreationBuyerTradeParty'
          description: Details about the buyer trade party of the order. Is the trade party that initiates the order process. Is mandatory for order agreements.
        seller:
          $ref: '#/components/schemas/OrderCreationSellerTradeParty'
          description: Details about the seller trade party of the order. Is the trade party that receives the order. Is mandatory for order agreements.
        deliveryTerms:
          $ref: '#/components/schemas/OrderCreationDeliveryTerms'
          description: Details about the agreed terms of delivery for the order.
        salesOrder:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a sales order issued by the seller. Usable from Order-X Comfort profile.
        buyerOrder:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a purchase order issued by the buyer.
        quotation:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a quotation issued by the seller.
        contract:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a contract.
        blanketOrder:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a blanket order issued by the buyer or a buyer requisitioner.
        previousOrder:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: Reference of a previous order issued by the buyer or a buyer requisitioner.
        previousOrderChange:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: 'Reference of a previous order change issued by the buyer or a buyer requisitioner. Must not be set for orders of type "ORDER".'
        previousOrderResponse:
          $ref: '#/components/schemas/OrderCreationReferencedDocument'
          description: 'Reference of a previous order response issued by the seller. Must not be set for orders of type "ORDER".'
        project:
          $ref: '#/components/schemas/OrderCreationProject'
          description: Reference of a procuring project of the order. Usable from Order-X Comfort profile.
        additionalDocuments:
          type: array
          description: Additionally referenced documents for the order. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationAdditionalDocument'
            description: A single additional document.
    OrderCreationDeliveryTerms:
      type: object
      description: Details about the agreed terms of delivery for an order.
      properties:
        deliveryCode:
          type: string
          description: 'Code to specify the responsibilities regarding the delivery. Must be a code from one of the codelists "UNTDID_4053_D20A" and "INCOTERMS_ZF233".'
        deliveryMode:
          type: string
          description: 'Code to further specify the delivery. Must be a code from codelist "UNTDID_4055_D20A". Recommended are codes "4" (Collected by customer) and "7" (Delivered by supplier) to specify delivery or pick-up.'
        description:
          type: string
          description: Textual description of the terms of delivery. Usable from Order-X Comfort profile.
        locationId:
          type: string
          description: Identifier of the destination location. Usable from Order-X Comfort profile.
        locationName:
          type: string
          description: Name of the destination location. Usable from Order-X Comfort profile.
    OrderCreationProject:
      type: object
      description: Reference of a procuring project of an order.
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Identifier of the project. Is mandatory for projects.
        name:
          type: string
          description: Name of the project. Is mandatory for projects.
    OrderCreationDelivery:
      type: object
      description: Delivery details of an order.
      properties:
        shipTo:
          $ref: '#/components/schemas/OrderCreationHeaderShipToTradeParty'
          description: Details about the ship-to trade party of the order. Is the trade party that receives the ordered goods or services instead of the buyer.
        ultimateShipTo:
          $ref: '#/components/schemas/OrderCreationHeaderTradeParty'
          description: Details about the ultimate ship-to trade party of the order. Is the trade party that ultimately receives the ordered goods or services instead of the ship-to party. Usable at Order-X Extended profile.
        shipFrom:
          $ref: '#/components/schemas/OrderCreationHeaderTradeParty'
          description: Details about the ship-from trade party of the order. Is the trade party from which the ordered goods or services are delivered or picked up from instead of the seller.
        deliveryEvents:
          type: array
          description: Requested delivery events for this order. Stating deliveries is mutually exclusive to stating pickups.
          items:
            $ref: '#/components/schemas/OrderCreationDeliveryEvent'
            description: A single delivery event.
        pickupEvents:
          type: array
          description: Requested pick-up events for this order. Stating pick-ups is mutually exclusive to stating deliveries.
          items:
            $ref: '#/components/schemas/OrderCreationDeliveryEvent'
            description: A single pick-up event.
    OrderCreationSettlement:
      type: object
      description: Settlement details of an order.
      required:
        - currency
        - summation
      properties:
        currency:
          type: string
          description: 'Currency code to specify the currency of all monetary amounts of this order document. Must be a code from codelist "ISO_4217_ZF211". Is mandatory for order settlements.'
        invoicer:
          $ref: '#/components/schemas/OrderCreationHeaderTradeParty'
          description: Details about the invoicer trade party for the order. Is the trade party that will issue or send a future invoice for the order on behalf of the seller. Usable at Order-X Extended profile.
        invoicee:
          $ref: '#/components/schemas/OrderCreationHeaderTradeParty'
          description: Details about the invoicee trade party for the order. Is the trade party to which a future invoice for the order shall be sent to instead of the buyer. Usable from Order-X Comfort profile.
        paymentMeans:
          $ref: '#/components/schemas/OrderCreationPaymentMeans'
          description: Details about the means for how the payment is expected to be or already has been settled. Usable from Order-X Comfort profile.
        allowanceCharges:
          type: array
          description: List of allowances and charges for the order. Usable from Order-X Comfort profile.
          items:
            $ref: '#/components/schemas/OrderCreationHeaderAllowanceCharge'
            description: A single allowance or charge.
        taxBreakdown:
          type: array
          description: List of applicable taxes of different categories, rates and exemption reasons for the order. Usable at Order-X Extended profile.
          items:
            $ref: '#/components/schemas/OrderCreationHeaderApplicableTradeTax'
            description: A single tax statement.
        paymentTerms:
          $ref: '#/components/schemas/OrderCreationPaymentTerms'
          description: Details about the terms that apply to the amount due for payment. Usable from Order-X Comfort profile.
        summation:
          $ref: '#/components/schemas/OrderCreationSummation'
          description: Monetary summation of the order. Is mandatory for order settlements.
        accountingReference:
          $ref: '#/components/schemas/OrderCreationAccountingReference'
          description: Accounting account specified for this order.
    OrderCreationPaymentMeans:
      type: object
      description: Details about the means for how a payment is settled.
      properties:
        code:
          type: string
          description: 'Code to specify the means of payment. Must be a code from codelist "UNTDID_4461_D20A".'
        descriptions:
          type: array
          description: Textual descriptions of the means of payment. Single usage possible from Order-X Comfort profile, multiple usages at Order-X Extended profile.
          items:
            type: string
            description: A single textual description.
    OrderCreationPaymentTerms:
      type: object
      description: Details about the terms that apply to an amount due for payment.
      required:
        - descriptions
      properties:
        descriptions:
          type: array
          description: Textual descriptions of the terms of payment. Single usage possible from Order-X Comfort profile, multiple usages at Order-X Extended profile.
          items:
            type: string
            description: A single textual description.
    OrderCreationSummation:
      type: object
      description: Monetary summation of an order.
      required:
        - lineTotalAmount
        - taxBasisTotalAmount
        - grandTotalAmount
      properties:
        lineTotalAmount:
          type: number
          description: Summation of all order document line amounts. Exclusive of taxes and inclusive of all document line allowances and charges. Is mandatory for order summations.
        chargeTotalAmount:
          type: number
          description: Total amount of charges on this order document. This amount does not include charges from document lines.
        allowanceTotalAmount:
          type: number
          description: Total amount of allowances on this order document. This amount does not include allowances from document lines.
        taxBasisTotalAmount:
          type: number
          description: 'Total net amount of this order. Is the "lineTotalAmount" inclusive of all order level allowances and charges. Is mandatory for order summations.'
        taxTotalAmount:
          type: number
          description: Total tax amount of this order.
        grandTotalAmount:
          type: number
          description: 'Total gross amount of this order. Is the "taxBasisTotalAmount" inclusive of taxes. Is mandatory for order summations.'
        prepaidAmount:
          type: number
          description: Amount that was already prepaid for this order. Usable at Order-X Extended profile.
        duePayableAmount:
          type: number
          description: Amount that is still due to be paid for this order. Usable at Order-X Extended profile.
    OrderCreationResponse:
      type: object
      description: 'Response of electronic order creation processes that used the "archive" option.'
      required:
        - archiveId
      properties:
        archiveId:
          type: string
          description: The unique identifier of the archived order file. May be used to fetch the file.
        shippingId:
          type: string
          description: The unique identifier of the shipment. Only present if the order was dispatched.
    CodelistListResponse:
      type: array
      description: List of relevant codelist names for a specific use-case, like order creation.
      items:
        type: string
        description: Technical codelist identifier.
    CodelistOverviewResponse:
      type: object
      description: Overview of all possible values for a specific codelist.
      properties:
        id:
          type: string
          description: Technical identifier of the requested codelist.
        urn:
          type: string
          description: URN of the requested codelist.
        name:
          type: string
          description: Name of the requested codelist.
        description:
          type: string
          description: Description of the requested codelist.
        version:
          type: string
          description: Version of the requested codelist.
        values:
          type: array
          description: List of possible codelist values.
          items:
            $ref: '#/components/schemas/CodelistDetailsResponse'
            description: Details of a single codelist value.
    CodelistDetailsResponse:
      type: object
      description: Details of a single codelist value.
      properties:
        value:
          type: string
          description: Technical code of the requested code.
        name:
          type: string
          description: Title of the requested code.
        abbreviation:
          type: string
          description: Abbreviation for the requested code. Is only maintained for a few values of codelists.
        description:
          type: string
          description: Description of the requested code.
    MembershipContractor:
      type: object
      required:
        - type
        - partnerId
        - name
      properties:
        id:
          type: string
          example: C00001
          description: "Technical ID of the contractor"
        type:
          $ref: '#/components/schemas/MembershipContractorType'
          description: "Type of the contractor"
        partnerId:
          type: string
          description: "Unique, user defined Partner ID of the contractor"
          maxLength: 255
        name:
          type: string
          description: "Name of the contractor"
          maxLength: 255
        nickname:
          type: string
          description: "Nickname of the contractor"
          maxLength: 255
        designator:
          type: string
          description: "Designator of the contractor"
          minLength: 2
          maxLength: 4
        glnNumber:
          type: string
          description: "GLN number of the contractor"
          maxLength: 255
        externalReference:
          type: string
          description: "External reference of the contractor (e.g. 'Leitweg-ID for XRechnung')"
          maxLength: 255
        localTaxId:
          type: string
          description: "Local tax id of the contractor"
          maxLength: 255
        vatId:
          type: string
          description: "Vat-ID of the contractor. Is validated during processing."
          maxLength: 255
        currency:
          type: string
          description: "Currency of the contractor"
          minLength: 3
          maxLength: 3
        membershipCategory:
          type: string
          description: "User defined (membership) category of the contractor"
          maxLength: 255
        industrySector:
          type: string
          description: "User defined industry sector of the contractor"
          maxLength: 255
        status:
          type: string
          description: "User defined status of the contractor"
          maxLength: 255
        region:
          type: string
          description: "User defined region of the contractor"
          maxLength: 255
        website:
          type: string
          description: "Website of the contractor"
          maxLength: 255
        comment:
          type: string
          description: "Comment for the contractor"
          maxLength: 65535
        mainContact:
          $ref: '#/components/schemas/MembershipNestedMainContact'
          description: "Main contact of the contractor"
        mainAddress:
          $ref: '#/components/schemas/MembershipNestedMainAddress'
          description: "Main address of the contractor"
        mainMailAddress:
          $ref: '#/components/schemas/MembershipNestedMainMailAddress'
          description: "Main mail address of the contractor"
        mainBankAccount:
          $ref: '#/components/schemas/MembershipNestedMainBankAccount'
          description: "Main bank account of the contractor"
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the contractor"
    MembershipExistingContractor:
      type: object
      required:
        - id
        - type
        - partnerId
        - name
      properties:
        id:
          type: string
          example: C00001
          description: "Technical ID of the existing contractor"
        type:
          $ref: '#/components/schemas/MembershipContractorType'
          description: "Type of the contractor"
        partnerId:
          type: string
          description: "Unique, user defined Partner ID of the contractor"
          maxLength: 255
        name:
          type: string
          description: "Name of the contractor"
          maxLength: 255
        nickname:
          type: string
          description: "Nickname of the contractor"
          maxLength: 255
        designator:
          type: string
          description: "Designator of the contractor"
          minLength: 2
          maxLength: 4
        glnNumber:
          type: string
          description: "GLN number of the contractor"
          maxLength: 255
        externalReference:
          type: string
          description: "External reference of the contractor (e.g. 'Leitweg-ID for XRechnung')"
          maxLength: 255
        localTaxId:
          type: string
          description: "Local tax id of the contractor"
          maxLength: 255
        vatId:
          type: string
          description: "Vat-ID of the contractor. Is validated during processing."
          maxLength: 255
        currency:
          type: string
          description: "Currency of the contractor"
          minLength: 3
          maxLength: 3
        membershipCategory:
          type: string
          description: "User defined (membership) category of the contractor"
          maxLength: 255
        industrySector:
          type: string
          description: "User defined industry sector of the contractor"
          maxLength: 255
        status:
          type: string
          description: "User defined status of the contractor"
          maxLength: 255
        region:
          type: string
          description: "User defined region of the contractor"
          maxLength: 255
        website:
          type: string
          description: "Website of the contractor"
          maxLength: 255
        comment:
          type: string
          description: "Comment for the contractor"
          maxLength: 65535
        mainContact:
          $ref: '#/components/schemas/MembershipNestedMainContact'
          description: "Main contact of the contractor"
        mainAddress:
          $ref: '#/components/schemas/MembershipNestedMainAddress'
          description: "Main address of the contractor"
        mainMailAddress:
          $ref: '#/components/schemas/MembershipNestedMainMailAddress'
          description: "Main mail address of the contractor"
        mainBankAccount:
          $ref: '#/components/schemas/MembershipNestedMainBankAccount'
          description: "Main bank account of the contractor"
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the contractor"
    MembershipNestedMainContact:
      type: object
      required:
        - lastName
      properties:
        id:
          type: string
          example: P00001
          description: "Technical ID of the contact. Is always ignored when processing nested sub objects."
        contractorId:
          type: string
          example: C00001
          description: "Technical ID of the contractor that this contact belongs to. Is always ignored when processing nested sub objects."
        type:
          $ref: '#/components/schemas/MembershipContactType'
          description: "Type of the contact. Is always replaced with 'MAIN' during processing for nested main contacts."
        firstName:
          type: string
          description: "First name of the contact"
          maxLength: 255
        lastName:
          type: string
          description: "Last name of the contact"
          maxLength: 255
        salutation:
          type: string
          description: "Salutation of the contact"
          maxLength: 255
        title:
          type: string
          description: "Title of the contact"
          maxLength: 255
        position:
          type: string
          description: "User defined position of the contact"
          maxLength: 255
        role:
          type: string
          description: "User defined role of the contact"
          maxLength: 255
        mailAddress:
          $ref: '#/components/schemas/MembershipNestedMainContactMailAddress'
          description: "Mail address of the contact"
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the contact"
    MembershipNestedMainAddress:
      type: object
      required:
        - addressLineOne
        - area
        - country
      properties:
        id:
          type: string
          example: A00001
          description: "Technical ID of the address. Is always ignored when processing nested sub objects."
        contractorId:
          type: string
          example: C00001
          description: "Technical ID of the contractor that this address belongs to. Is always ignored when processing nested sub objects."
        type:
          $ref: '#/components/schemas/MembershipAddressType'
          description: "Type of the address. Is always replaced with 'MAIN' during processing for nested main addresses."
        companyName:
          type: string
          description: "Company name associated with the address"
          maxLength: 255
        addressLineOne:
          type: string
          description: "Address line one of the address"
          maxLength: 255
        addressLineTwo:
          type: string
          description: "Address line two of the address"
          maxLength: 255
        addressLineThree:
          type: string
          description: "Address line three of the address"
          maxLength: 255
        postalCode:
          type: string
          description: "Postal code of the address"
          maxLength: 255
        area:
          type: string
          description: "Area or city of the address"
          maxLength: 255
        country:
          type: string
          description: "Country of the address"
          minLength: 2
          maxLength: 2
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the address"
    MembershipNestedMainMailAddress:
      type: object
      required:
        - mailAddress
      properties:
        id:
          type: string
          example: MA00001
          description: "Technical ID of the mail address. Is always ignored when processing nested sub objects."
        contractorId:
          type: string
          example: C00001
          description: "Technical ID of the contractor that this mail address belongs to. Is always ignored when processing nested sub objects."
        type:
          $ref: '#/components/schemas/MembershipMailAddressType'
          description: "Type of the mail address. Is always replaced with 'MAIN' during processing for nested main mail addresses."
        mailAddress:
          type: string
          description: "Mail address string of the mail address. Is validated during processing."
          maxLength: 255
        cc:
          type: array
          description: "Cc addresses for the mail address"
          items:
            description: "Individual Cc address. Is validated during processing."
            type: string
        bcc:
          type: array
          description: "Bcc addresses for the mail address"
          items:
            description: "Individual Bcc address. Is validated during processing."
            type: string
        description:
          type: string
          description: "Description for the mail address"
          maxLength: 65535
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the mail address"
    MembershipNestedMainContactMailAddress:
      type: object
      required:
        - mailAddress
      properties:
        id:
          type: string
          example: MA00001
          description: "Technical ID of the mail address. Is always ignored when processing nested sub objects."
        contractorId:
          type: string
          example: C00001
          description: "Technical ID of the contractor that this mail address belongs to. Is always ignored when processing nested sub objects."
        type:
          $ref: '#/components/schemas/MembershipMailAddressType'
          description: "Type of the mail address. Is always replaced with 'MAIN_PERSON' during processing for nested main contact mail addresses."
        mailAddress:
          type: string
          description: "Mail address string of the mail address. Is validated during processing."
          maxLength: 255
        cc:
          type: array
          description: "Cc addresses for the mail address"
          items:
            description: "Individual Cc address. Is validated during processing."
            type: string
        bcc:
          type: array
          description: "Bcc addresses for the mail address"
          items:
            description: "Individual Bcc address. Is validated during processing."
            type: string
        description:
          type: string
          description: "Description for the mail address"
          maxLength: 65535
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the mail address"
    MembershipNestedMainBankAccount:
      type: object
      required:
        - accountHolder
      properties:
        id:
          type: string
          example: BA00001
          description: "Technical ID of the bank account. Is always ignored when processing nested sub objects."
        contractorId:
          type: string
          example: C00001
          description: "Technical ID of the contractor that this bank account belongs to. Is always ignored when processing nested sub objects."
        type:
          $ref: '#/components/schemas/MembershipBankAccountType'
          description: "Type of the bank account. Is always replaced with 'MAIN' during processing for nested main bank accounts."
        accountNumber:
          type: string
          description: "Account number of the bank account"
          maxLength: 255
        accountHolder:
          type: string
          description: "Account holder of the bank account"
          maxLength: 255
        iban:
          type: string
          description: "IBAN of the bank account. Is validated during processing."
          maxLength: 255
        bic:
          type: string
          description: "BIC of the bank account"
          maxLength: 255
        latestChange:
          type: string
          format: date-time
          description: "Time stamp of the latest change of the bank account"
    MembershipContractorType:
      type: string
      enum:
        - "PARTNER"
        - "CUSTOMER"
        - "SUPPLIER"
        - "SUBCONTRACTOR"
        - "SUBSIDIARY"
    MembershipContactType:
      type: string
      enum:
        - "MAIN"
        - "INVOICING"
        - "SUBCONTRACTOR"
        - "TECHNICAL"
        - "PROJECT"
        - "CONTRACT"
        - "BACKUP"
    MembershipAddressType:
      type: string
      enum:
        - "MAIN"
        - "BILLING"
        - "FILIAL"
        - "DELIVERY"
        - "OTHERS"
        - "PERSON"
    MembershipMailAddressType:
      type: string
      enum:
        - "MAIN"
        - "BILLING"
        - "REMINDING"
        - "CONTACT"
        - "ADVERTISING"
        - "ALTERNATIVE"
        - "MAIN_PERSON"
        - "PERSON"
    MembershipBankAccountType:
      type: string
      enum:
        - "MAIN"
        - "ALTERNATIVE"
    MembershipContractorFilter:
      type: object
      properties:
        sort:
          $ref: '#/components/schemas/MembershipContractorSort'
          description: "Sort information"
        filter:
          type: array
          items:
            $ref: '#/components/schemas/MembershipContractorCriteria'
          description: "Criteria for filtering. The list of individual criteria is combined as AND."
    MembershipContractorSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/MembershipContractorField'
          description: "Field to sort by"
          default: "id"
        direction:
          $ref: '#/components/schemas/MembershipSortDirection'
          description: "Direction to sort by"
          default: "ASC"
    MembershipContractorCriteria:
      type: object
      description: "A single criteria definition for filtering contractors. The lists of keys, values and operations must be equal in length. Each pair of key, value and operation is a single criterion. The various criteria in this definition are combined as OR."
      required:
        - keys
        - operations
      properties:
        keys:
          type: array
          items:
            $ref: '#/components/schemas/MembershipContractorField'
          description: "Fields to filter by"
        values:
          type: array
          items:
            type: string
          description: "Values to filter by. Individual values may be null."
        operations:
          type: array
          items:
            $ref: '#/components/schemas/MembershipSearchOperation'
          description: "Operations to filter with"
    MembershipSortDirection:
      type: string
      oneOf:
        - const: "ASC"
          title: "ASC"
          description: "Ascending sort direction"
        - const: "DESC"
          title: "DESC"
          description: "Descending sort direction"
    MembershipSearchOperation:
      type: "string"
      oneOf:
        - const: "EQUAL"
          title: "EQUAL"
          description: "Equal operation. Value must equal the field value."
        - const: "EQUAL_IGNORE_CASE"
          title: "EQUAL_IGNORE_CASE"
          description: "Equal operation. String value must equal the field value when ignoring case."
        - const: "MATCH"
          title: "MATCH"
          description: "Match operation. String value must be part of the field value."
        - const: "MATCH_START"
          title: "MATCH_START"
          description: "Match operation. Field value must start with the string value."
        - const: "MATCH_END"
          title: "MATCH_END"
          description: "Match operation. Field value must end with the string value."
        - const: "NULL"
          title: "NULL"
          description: "Null check operation. Field value is ignored."
        - const: "NOT_NULL"
          title: "NOT_NULL"
          description: "Not null check operation. Field value is ignored."
        - const: "IN"
          title: "IN"
          description: "Is contained in operation. Value must be a comma separated list of strings values. One string value must equal the field value."
        - const: "NOT_IN"
          title: "NOT_IN"
          description: "Is not contained in operation. Value must be a comma separated list of strings values. No string value must equal the field value."
        - const: "GREATER_THAN"
          title: "GREATER_THAN"
          description: "Is greater than operation."
        - const: "GREATER_THAN_EQUAL"
          title: "GREATER_THAN_EQUAL"
          description: "Is greater than or equal operation."
        - const: "LESS_THAN"
          title: "LESS_THAN"
          description: "Is less than operation."
        - const: "LESS_THAN_EQUAL"
          title: "LESS_THAN_EQUAL"
          description: "Is less than or equal operation."
    MembershipContractorField:
      type: string
      oneOf:
        - const: "id"
          title: "id"
        - const: "type"
          title: "type"
          description: "Value of this field must be a valid contractor type"
        - const: "partnerId"
          title: "partnerId"
        - const: "name"
          title: "name"
        - const: "nickname"
          title: "nickname"
        - const: "designator"
          title: "designator"
        - const: "glnNumber"
          title: "glnNumber"
        - const: "externalReference"
          title: "externalReference"
        - const: "localTaxId"
          title: "localTaxId"
        - const: "vatId"
          title: "vatId"
        - const: "currency"
          title: "currency"
        - const: "membershipCategory"
          title: "membershipCategory"
          description: "MATCH operations do not work for this field"
        - const: "industrySector"
          title: "industrySector"
          description: "MATCH operations do not work for this field"
        - const: "status"
          title: "status"
          description: "MATCH operations do not work for this field"
        - const: "region"
          title: "region"
          description: "MATCH operations do not work for this field"
        - const: "website"
          title: "website"
        - const: "comment"
          title: "comment"
        - const: "latestChange"
          title: "latestChange"
          description: "Value of this field must be a parsable local date or local date time"
        - const: "mainContact"
          title: "mainContact"
          description: "Only NULL and NOT_NULL operations work for this field"
        - const: "mainContact.id"
          title: "mainContact.id"
        - const: "mainContact.contractorId"
          title: "mainContact.contractorId"
        - const: "mainContact.type"
          title: "mainContact.type"
          description: "Value of this field must be a valid contact type"
        - const: "mainContact.firstName"
          title: "mainContact.firstName"
        - const: "mainContact.lastName"
          title: "mainContact.lastName"
        - const: "mainContact.salutation"
          title: "mainContact.salutation"
        - const: "mainContact.title"
          title: "mainContact.title"
        - const: "mainContact.position"
          title: "mainContact.position"
          description: "MATCH operations do not work for this field"
        - const: "mainContact.role"
          title: "mainContact.role"
          description: "MATCH operations do not work for this field"
        - const: "mainContact.latestChange"
          title: "mainContact.latestChange"
          description: "Value of this field must be a parsable local date or local date time"
        - const: "mainContact.mailAddress"
          title: "mainContact.mailAddress"
          description: "Only NULL and NOT_NULL operations work for this field"
        - const: "mainContact.mailAddress.id"
          title: "mainContact.mailAddress.id"
        - const: "mainContact.mailAddress.contractorId"
          title: "mainContact.mailAddress.contractorId"
        - const: "mainContact.mailAddress.type"
          title: "mainContact.mailAddress.type"
          description: "Value of this field must be a valid mail address type"
        - const: "mainContact.mailAddress.mailAddress"
          title: "mainContact.mailAddress.mailAddress"
        - const: "mainContact.mailAddress.cc"
          title: "mainContact.mailAddress.cc"
          description: "No true list operations are available for this field. Use MATCH operation to check for entries."
        - const: "mainContact.mailAddress.bcc"
          title: "mainContact.mailAddress.bcc"
          description: "No true list operations are available for this field. Use MATCH operation to check for entries."
        - const: "mainContact.mailAddress.description"
          title: "mainContact.mailAddress.description"
        - const: "mainContact.mailAddress.latestChange"
          title: "mainContact.mailAddress.latestChange"
          description: "Value of this field must be a parsable local date or local date time"
        - const: "mainAddress"
          title: "mainAddress"
          description: "Only NULL and NOT_NULL operations work for this field"
        - const: "mainAddress.id"
          title: "mainAddress.id"
        - const: "mainAddress.contractorId"
          title: "mainAddress.contractorId"
        - const: "mainAddress.type"
          title: "mainAddress.type"
          description: "Value of this field must be a valid address type"
        - const: "mainAddress.companyName"
          title: "mainAddress.companyName"
        - const: "mainAddress.addressLineOne"
          title: "mainAddress.addressLineOne"
        - const: "mainAddress.addressLineTwo"
          title: "mainAddress.addressLineTwo"
        - const: "mainAddress.addressLineThree"
          title: "mainAddress.addressLineThree"
        - const: "mainAddress.postalCode"
          title: "mainAddress.postalCode"
        - const: "mainAddress.area"
          title: "mainAddress.area"
        - const: "mainAddress.country"
          title: "mainAddress.country"
        - const: "mainAddress.latestChange"
          title: "mainAddress.latestChange"
          description: "Value of this field must be a parsable local date or local date time"
        - const: "mainMailAddress"
          title: "mainMailAddress"
          description: "Only NULL and NOT_NULL operations work for this field"
        - const: "mainMailAddress.id"
          title: "mainMailAddress.id"
        - const: "mainMailAddress.contractorId"
          title: "mainMailAddress.contractorId"
        - const: "mainMailAddress.type"
          title: "mainMailAddress.type"
          description: "Value of this field must be a valid mail address type"
        - const: "mainMailAddress.mailAddress"
          title: "mainMailAddress.mailAddress"
        - const: "mainMailAddress.cc"
          title: "mainMailAddress.cc"
          description: "No true list operations are available for this field. Use MATCH operation to check for entries."
        - const: "mainMailAddress.bcc"
          title: "mainMailAddress.bcc"
          description: "No true list operations are available for this field. Use MATCH operation to check for entries."
        - const: "mainMailAddress.description"
          title: "mainMailAddress.description"
        - const: "mainMailAddress.latestChange"
          title: "mainMailAddress.latestChange"
          description: "Value of this field must be a parsable local date or local date time"
        - const: "mainBankAccount"
          title: "mainBankAccount"
          description: "Only NULL and NOT_NULL operations work for this field"
        - const: "mainBankAccount.id"
          title: "mainBankAccount.id"
        - const: "mainBankAccount.contractorId"
          title: "mainBankAccount.contractorId"
        - const: "mainBankAccount.type"
          title: "mainBankAccount.type"
          description: "Value of this field must be a valid bank account type"
        - const: "mainBankAccount.accountNumber"
          title: "mainBankAccount.accountNumber"
        - const: "mainBankAccount.accountHolder"
          title: "mainBankAccount.accountHolder"
        - const: "mainBankAccount.iban"
          title: "mainBankAccount.iban"
        - const: "mainBankAccount.bic"
          title: "mainBankAccount.bic"
        - const: "mainBankAccount.latestChange"
          title: "mainBankAccount.latestChange"
          description: "Value of this field must be a parsable local date or local date time"
  headers:
    x-rate-limit-limit:
      example: 200
      schema:
        type: integer
    x-rate-limit-remaining:
      example: 55
      schema:
        type: integer
    x-rate-limit-reset:
      description: epoch unix timestamp
      example: 1739955660
      schema:
        type: integer
        format: timestamp
    x-rate-limit-cost:
      description: cost of the api call
      example: 5
      schema:
        type: integer
