Yokoy Invoice API

In the Yokoy API, invoices can only be created or retrieved. You can only update custom information via API. To update other attributes or delete the invoice, use the Yokoy web app.

OpenAPI Specification

yokoy-invoice-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Public API of the Yokoy Application
  title: Yokoy Card account Invoice API
  version: 1.41.0
servers:
- description: API server scoped to organization with ID `organizationId`
  url: https://api.yokoy.ai/v1/organizations/{organizationId}
  variables:
    organizationId:
      default: AbcDeF1234
      description: Yokoy organization ID
- description: API test server scoped to organization with ID `organizationId`
  url: https://api.test.yokoy.ai/v1/organizations/{organizationId}
  variables:
    organizationId:
      default: AbcDeF1234
      description: Yokoy organization ID
tags:
- description: 'In the Yokoy API, invoices can only be created or retrieved. You can only update custom information via API.

    To update other attributes or delete the invoice, use the Yokoy web app.

    '
  name: Invoice
paths:
  /legal-entities/{legalEntityId}/invoices:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    get:
      description: Retrieves all invoices for the legal entity identified in the path.
      operationId: listInvoices
      parameters:
      - $ref: '#/components/parameters/QueryFilter'
      - $ref: '#/components/parameters/PaginationCount'
      - $ref: '#/components/parameters/PaginationCursor'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  invoices:
                    items:
                      $ref: '#/components/schemas/Invoice'
                    type: array
                  itemsPerPage:
                    $ref: '#/components/schemas/PaginationItemsPerPage'
                  nextCursor:
                    $ref: '#/components/schemas/PaginationNextCursor'
                required:
                - invoices
                type: object
          description: OK
        '400':
          $ref: '#/components/responses/InvalidFilter'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: List all invoices
      tags:
      - Invoice
    post:
      description: Creates a new invoice and returns the created entity.
      operationId: createInvoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
          description: Created
        '400':
          $ref: '#/components/responses/HttpValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Create an invoice
      tags:
      - Invoice
  /legal-entities/{legalEntityId}/invoices/einvoice:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    post:
      description: 'Uploads a new e-invoice for the legal entity specified by its Yokoy unique ID and returns the details for the created invoice.

        '
      operationId: uploadEinvoice
      requestBody:
        content:
          multipart/form-data:
            encoding:
              pdf:
                contentType: application/pdf
            schema:
              properties:
                invoiceData:
                  description: 'All e-invoice structure data, according to the selected standard.

                    It can be expressed as a string as-is or as a base64 encoded version of the data to be used to create the invoice.

                    '
                  type: string
                pdf:
                  description: 'The PDF file to be used as the preview file for the invoice within Yokoy.

                    '
                  format: binary
                  type: string
                standard:
                  description: 'Provides the standard format to which the invoiceData field adheres.

                    `peppolBis` means the e-invoice is in UBL XML format following the Peppol BIS 3.0 specification.

                    '
                  enum:
                  - peppolBis
                  example: peppolBis
                  type: string
              required:
              - standard
              - invoiceData
              - pdf
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              examples:
                peppolBis:
                  value:
                  - country: NL
                    created: '2024-12-03T08:51:48.742Z'
                    currency: EUR
                    customInformation: null
                    date: '2024-12-01'
                    documentData: null
                    dueDate: '2025-01-30'
                    eventLog:
                    - actionType: added
                      autoComment:
                        key: invoiceUploadEInvoice
                      comment: ''
                      name: Yokoy API
                      timestamp: '2024-12-03T08:51:48.742Z'
                    fxRates: null
                    grossAmount: 1620
                    id: njx2YwXAF
                    invoiceNumber: INV-001
                    isCreditNote: false
                    lastModified: '2024-12-03T08:51:48.742Z'
                    legalEntityId: wrOWz6e_33I0vNzQPMWyY
                    lineItems:
                    - categoryId: null
                      costObjectId: null
                      customInformation: null
                      description: Insurance
                      goodsReceiptId: null
                      goodsReceiptItemId: null
                      goodsReceiptNumber: null
                      gross: 1620
                      itemPrice: 1350
                      matchStatus: null
                      net: 1350
                      nonRecoverableTaxAmount: null
                      purchaseOrderId: null
                      purchaseOrderItemId: null
                      purchaseOrderNumber: null
                      quantity: 1
                      selfAssessedTaxAmount: null
                      serviceEndDate: null
                      serviceStartDate: null
                      tags: null
                      taxAmount: null
                      taxRateComponents: null
                      taxRateId: null
                      unit: PC
                    netAmount: 1350
                    oneTimeSupplierInfo: null
                    paymentBlocked: false
                    paymentInformation:
                      bankAccount: 987654321
                      bankCountry: NL
                      bankKey: XXX
                      bankNumber: 124567895
                      externalId: null
                      iban: NL1234567891234445
                      paymentTermId: 06x2u4nagAMEq3gGoMch
                      postingDate: null
                      purchaseOrderIds: []
                      qrInfo: null
                      swiftCode: DEUTDEFFXXX
                    serviceDate:
                    - '2024-12-01'
                    - '2025-01-30'
                    status: new
                    submitters: []
                    supplierId: bbebb9a0-87ef-439c-9ac3-e320e47d85d5
                    taxableAmount: null
              schema:
                $ref: '#/components/schemas/Invoice'
          description: Created
        '400':
          $ref: '#/components/responses/HttpValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Upload a new e-invoice to Yokoy
      tags:
      - Invoice
  /legal-entities/{legalEntityId}/invoices/upload:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    post:
      description: 'Uploads a new invoice to be processed by the Yokoy AI. The invoice‘s attributes may be empty initially but are updated once the AI has run.

        '
      operationId: uploadAiInvoice
      requestBody:
        content:
          multipart/form-data:
            encoding:
              file:
                contentType: application/pdf
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
          description: Created
        '400':
          $ref: '#/components/responses/HttpValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Upload a new invoice to be processed by Yokoy AI
      tags:
      - Invoice
  /legal-entities/{legalEntityId}/invoices/{invoiceId}:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - description: Yokoy unique ID of the invoice.
      example: 9L7rovNzNhTCsJSTkbfq
      in: path
      name: invoiceId
      required: true
      schema:
        pattern: '[\w-]+'
        type: string
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    get:
      description: Retrieves an invoice identified by its Yokoy unique ID.
      operationId: getInvoice
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
          description: OK
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Get an invoice
      tags:
      - Invoice
    patch:
      description: Updates an invoice identified by its Yokoy unique ID.
      operationId: updateInvoice
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/UpdateInvoice'
              - description: Only custom information fields at header and line item level can be updated.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
          description: OK
        '400':
          $ref: '#/components/responses/HttpValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Update an invoice
      tags:
      - Invoice
  /legal-entities/{legalEntityId}/invoices/{invoiceId}/base64:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - description: Yokoy unique ID of the invoice.
      example: 9L7rovNzNhTCsJSTkbfq
      in: path
      name: invoiceId
      required: true
      schema:
        pattern: '[\w-]+'
        type: string
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    get:
      description: 'Retrieves the supplier invoice PDF file. The response contains a base64 string of the PDF file.

        '
      operationId: getInvoiceBase64
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceBase64'
          description: Invoice file in base64 format
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Get the invoice PDF file (base64)
      tags:
      - Invoice
  /legal-entities/{legalEntityId}/invoices/{invoiceId}/presentation:
    parameters:
    - $ref: '#/components/parameters/LegalEntityIdInPath'
    - description: Yokoy unique ID of the invoice.
      example: 9L7rovNzNhTCsJSTkbfq
      in: path
      name: invoiceId
      required: true
      schema:
        pattern: '[\w-]+'
        type: string
    - $ref: '#/components/parameters/YokoyAuthMethod'
    - $ref: '#/components/parameters/YokoyCorrelationId'
    get:
      description: 'Downloads the supplier invoice file in PDF format

        '
      operationId: getInvoicePdf
      responses:
        '200':
          content:
            application/pdf:
              schema:
                format: binary
                type: string
          description: Invoice file in PDF format
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - OAuth2: []
      summary: Get the invoice file in PDF format
      tags:
      - Invoice
components:
  schemas:
    UpdateInvoiceLineItem:
      properties:
        customInformation:
          additionalProperties: true
          description: 'Dictionary of custom information associated with the invoice.

            The data of the object is merged with the existing values on a top level.

            Deeper levels are overwritten by the new data and not merged.

            To reset a specific attribute, set it to `null`. Yokoy treats empty values as `null`.

            '
          nullable: true
          type: object
      type: object
    EventLogEntry:
      properties:
        actionType:
          description: Type of event.
          enum:
          - approve
          - archive
          - backToReview
          - export
          - needsRevision
          - recall
          - reject
          - review
          - submit
          - revertExport
          - imported
          - exportReverted
          - forwardApproval
          example: needsRevision
          type: string
        comment:
          description: Comment made by the user who triggered the event.
          example: Please re-upload the invoice instead of the payment receipt.
          pattern: '[\w-]+'
          type: string
        name:
          description: Name of the user who triggered the event.
          example: Alex Perez
          nullable: true
          type: string
        timestamp:
          description: Timestamp (date and time) of the event. Expressed in ISO 8601 format. Coordinated Universal Time (UTC).
          example: '2022-11-15T17:08:45.478Z'
          format: date-time
          type: string
        userId:
          description: Yokoy unique ID of the user.
          example: 9L7rovNzNhTCsJSTkbfq
          nullable: true
          pattern: '[\w-]+'
          type: string
      type: object
    InvoiceBankAccount:
      description: Information related to the payment of the invoice.
      properties:
        bankAccount:
          description: Bank account number. Often used if no IBAN exists.
          example: '987654321'
          nullable: true
          type: string
        bankCountry:
          description: Country of the bank.
          example: UK
          nullable: true
          type: string
        bankKey:
          description: Bank key (also called branch code).
          example: XXX
          nullable: true
          type: string
        bankNumber:
          description: Bank number (also called bank code).
          example: UBSW
          nullable: true
          type: string
        externalId:
          description: External ID of the bank in ERP systems.
          example: UBS12
          nullable: true
          type: string
        iban:
          description: IBAN (International Bank Account Number).
          example: CH5604835012345678009
          nullable: true
          type: string
        swiftCode:
          description: Swift code (also called the BIC).
          example: UBSWCHZHXXX
          nullable: true
          type: string
      type: object
    PaginationNextCursor:
      description: 'Cursor to be used to fetch the next set of items.

        It is only resulted in calls that pass `count`in the query parameters to retrieve paginated results. When there are no further results, the attribute is not returned.

        '
      example: 06x2u4nagAMEq3gGMoch
      type: string
    Invoice:
      properties:
        country:
          description: Country of the invoice. Expressed as an ISO 3166 Alpha-2 code.
          example: CH
          type: string
        created:
          description: Timestamp (date and time) when the invoice was created. Expressed in ISO 8601 format. Coordinated Universal Time (UTC).
          example: '2022-11-15T17:08:45.478Z'
          format: date-time
          readOnly: true
          type: string
        currency:
          description: Currency of the invoice. ISO 4217 three-letter code.
          example: CHF
          type: string
        customInformation:
          additionalProperties:
            type: string
          description: Dictionary of custom information associated with the invoice.
          example:
            some-key: some-value
          nullable: true
          type: object
        date:
          allOf:
          - $ref: '#/components/schemas/DateString'
          - description: Date of the invoice. Expressed in `YYYY-MM-DD` format.
            example: '2024-01-01'
            nullable: true
        documentData:
          description: 'A base64-encoded string of the document related to the invoice. This document is uploaded and linked to the invoice.

            However, the document is not analyzed by the Yokoy AI.

            The document must be a PDF.

            '
          example: JVBERi0xLjYNJeLjz9MNCjI0IDAgb2JqDTw8L0ZpbHRlci9G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hdGU+CiAgICAgICAgIDx4bXA6TWV0YWRhdGFEYXRlPjIwMTYtMDctMTVUMTA6MTI6MjErMDg6MDA8L3htcDpNZXRhZGF0YURhdGU+CiAgICAgICAgIDx4bXBNTTpEb2N1bWVudElEPnV1aWQ6ZmYzZGNmZDEtMjNmYS00NzZmLTgzOWEtM2U1Y2FlMmRhMmViPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD51dWlkOjM1OTM1MGIzLWFmNDAtNGQ4YS05ZDZjLTAzMTg2YjRmZmIzNjwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPGRjOmZvcm1hdD5hcHBsaWNhdGlvbi9wZGY8L2RjOmZvcm1hdD4KICAgICAgICAgPGRjOnRpdGxlPgogICAgICAgICAgICA8cmRmOkFsdD4KICAgICAgICAgICAgICAgPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ij5CbGFuayBQREYgRG9jdW1lbnQ8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6QWx0PgogICAgICAgICA8L2RjOnRpdGxlPgogICAgICAgICA8ZGM6Y3JlYXRvcj4KICAgICAgICAgICAgPHJkZjpTZXE+CiAgICAgICAgICAgICAgIDxyZGY6bGk+RGVwYXJ0bWVudCBvZiBKdXN0aWNlIChFeGVjdXRpdmUgT2ZmaWNlIG9mIEltbWlncmF0aW9uIFJldmlldyk8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L2RjOmNyZWF0b3I+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4NCmVuZHN0cmVhbQ1lbmRvYmoNMTEgMCBvYmoNPDwvTWV0YWRhdGEgMiAwIFIvUGFnZUxhYmVscyA2IDAgUi9QYWdlcyA4IDAgUi9UeXBlL0NhdGFsb2c+Pg1lbmRvYmoNMjMgMCBvYmoNPDwvRmlsdGVyL0ZsYXRlRGVjb2RlL0xlbmd0aCAxMD4+c3RyZWFtDQpIiQIIMAAAAAABDQplbmRzdHJlYW0NZW5kb2JqDTI4IDAgb2JqDTw8L0RlY29kZVBhcm1zPDwvQ29sdW1ucyA0L1ByZWRpY3RvciAxMj4+L0ZpbHRlci9GbGF0ZURlY29kZS9JRFs8REI3Nzc1Q0NFMjI3RjZCMzBDNDQwREY0MjIxREMzOTA+PEJGQ0NDRjNGNTdGNjEzNEFCRDNDMDRBOUU0Q0ExMDZFPl0vSW5mbyA5IDAgUi9MZW5ndGggODAvUm9vdCAxMSAwIFIvU2l6ZSAyOS9UeXBlL1hSZWYvV1sxIDIgMV0+PnN0cmVhbQ0KaN5iYgACJjDByGzIwPT/73koF0wwMUiBWYxA4v9/EMHA9I/hBVCxoDOQeH8DxH2KrIMIglFwIpD1vh5IMJqBxPpArHYgwd/KABBgAP8bEC0NCmVuZHN0cmVhbQ1lbmRvYmoNc3RhcnR4cmVmDQo0NTc2DQolJUVPRg0K
          format: base64
          nullable: false
          type: string
          writeOnly: true
        dueDate:
          allOf:
          - $ref: '#/components/schemas/DateString'
          - description: Due date of the invoice. Expressed in `YYYY-MM-DD` format.
            example: '2025-01-01'
            nullable: true
        eventLog:
          items:
            $ref: '#/components/schemas/EventLogEntry'
          nullable: true
          type: array
        exportJobId:
          description: Yokoy unique ID of the last export job that the invoice has been included in, if any.
          example: jdfg8s8
          nullable: true
          pattern: '[\w-]+'
          readOnly: true
          type: string
        fxRates:
          description: Foreign exchange reference rates used by Yokoy to convert the original invoice amount to other currencies. All currencies are quoted against the US dollar (base currency). ISO 4217 three-letter code.
          example:
            CHF: 0.902285
            EUR: 0.925917
            JPY: 151.345
            USD: 1
          nullable: true
          type: object
        grossAmount:
          description: Gross amount of the invoice. Aggregated from the invoice's line items.
          example: 466.82
          readOnly: true
          type: number
        id:
          description: Yokoy unique ID of the invoice.
          example: 9L7rovNzNhTCsJSTkbfq
          pattern: '[\w-]+'
          readOnly: true
          type: string
        invoiceNumber:
          description: Invoice number
          example: '12345'
          type: string
        isCreditNote:
          description: 'Indicates whether or not the invoice is a credit note.

            This attribute is read only as Yokoy determines whether the invoice is a credit note based on the invoice gross amount.

            '
          example: true
          nullable: true
          readOnly: true
          type: boolean
        lastModified:
          description: Timestamp (date and time) when the invoice was last modified. Expressed in ISO 8601 format. Coordinated Universal Time (UTC).
          example: '2022-11-15T17:08:45.478Z'
          format: date-time
          readOnly: true
          type: string
        lineItems:
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
          type: array
        netAmount:
          description: Net amount of the invoice. Aggregated from the invoice's line items.
          example: 421.96
          readOnly: true
          type: number
        oneTimeSupplierInfo:
          allOf:
          - $ref: '#/components/schemas/OneTimeSupplierInfo'
          - nullable: false
        paymentBlocked:
          default: false
          description: Indicates whether the invoice has a payment block. A payment block is a restriction set on the invoice to instruct the finance system to avoid paying the invoice during the payment run.
          nullable: true
          type: boolean
        paymentInformation:
          allOf:
          - $ref: '#/components/schemas/InvoiceBankAccount'
          - nullable: true
        paymentTermId:
          description: Yokoy unique ID of the payment terms associated with the invoice.
          example: 06x2u4nagAMEq3gGoMch
          nullable: true
          type: string
        postingDate:
          allOf:
          - $ref: '#/components/schemas/DateString'
          - description: Posting date of the invoice. Expressed in `YYYY-MM-DD` format.
            example: '2024-01-01'
            nullable: true
        purchaseOrderIds:
          description: Array of Yokoy purchase order IDs associated with the invoice.
          example:
          - 9L7rovNzNhTCsJSTkbfq
          - ZPR8UGnX2QoiOB2eDNp9
          items:
            nullable: false
            type: string
          nullable: true
          type: array
        qrInfo:
          $ref: '#/components/schemas/InvoiceQrInformation'
        serviceDate:
          description: 'The invoice''s service date(s). If a single date is passed as a string, then it describes that date.

            Otherwise, if an array is passed with two dates, then it is considered as a range of dates.

            '
          example:
          - '2023-12-01'
          - '2024-01-01'
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/DateString'
            type: null
          - $ref: '#/components/schemas/DateRange'
            maxLength: 2
            type: null
        status:
          description: 'Status of the invoice. Yokoy determines the status of the invoice. It cannot be changed directly.

            The statuses can be draft (`0`), needs revision (`1`), in approval (`2`), in review (`3`), ready for export (`4`), rejected (`5`), exported (`6`), new (`7`), or waiting for async input (`8`).

            '
          enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          - 7
          - 8
          example: '0'
          pattern: '[\w-]+'
          readOnly: true
          type: string
        submitters:
          description: List of Yokoy user IDs who submitted the invoice or who are responsible for coding the invoice.
          example:
          - 9L7rovNzNhTCsJSTkbfq
          - 09NcHB2XRXXQYRHYDC

# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/yokoy/refs/heads/main/openapi/yokoy-invoice-api-openapi.yml