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

# Update administration invoices

> Update administration invoices



## OpenAPI

````yaml /openapi3.json patch /v1/invoices
openapi: 3.0.0
info:
  title: API Endpoints
  description: >-
    This page allows you to explore the available API endpoints. Select a
    resource (e.g. debtors) and an endpoint (e.g. /v1/debtors) to inspect an
    example response and available parameters. An authorization header
    containing a Bearer token is required, see
    [Authentication](/authentication/authorization).
  version: 1.0.0
servers:
  - url: https://api.paytsoftware.com
    description: Production
  - url: https://demo-api.paytsoftware.com
    description: Demo / testing
security:
  - bearerAuth: []
tags:
  - name: administrations
    description: Operations about administrations
  - name: companies
    description: Operations about companies
  - name: contacts
    description: Operations about contacts
  - name: credit_cases
    description: Operations about credit_cases
  - name: debtors
    description: Operations about debtors
  - name: files
    description: Operations about files
  - name: orders
    description: Operations about orders
  - name: order_lines
    description: Operations about order_lines
  - name: invoices
    description: Operations about invoices
  - name: messages
    description: Operations about messages
  - name: notes
    description: Operations about notes
  - name: notifications
    description: Operations about notifications
  - name: payments
    description: Operations about payments
  - name: payment_conditions
    description: Operations about payment_conditions
  - name: payment_plans
    description: Operations about payment_plans
  - name: psp_mandates
    description: Operations about psp_mandates
  - name: psp_transactions
    description: Operations about psp_transactions
  - name: sign_up
    description: Operations about sign_ups
  - name: tasks
    description: Operations about tasks
  - name: vat_rates
    description: Operations about vat_rates
paths:
  /v1/invoices:
    patch:
      tags:
        - invoices
      summary: Update administration invoices
      description: Update administration invoices
      operationId: patchV1Invoices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/patchV1Invoices'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/patchV1Invoices'
        required: true
      responses:
        '200':
          description: Invoices updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_SuccessEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
components:
  schemas:
    patchV1Invoices:
      type: object
      properties:
        administration_id:
          type: string
          description: Administration identifier
        invoices:
          type: array
          items:
            type: object
            properties:
              invoice_number:
                type: string
                description: >-
                  Unique number from your invoicing software that is
                  communicated to the debtor
              invoice_date:
                type: string
                description: Date at which the invoice becomes payable
              amount_open:
                type: string
                description: Open amount in the currency of the invoice
              amount_total:
                type: string
                description: Total amount in the currency of the invoice
              book_amount_open:
                type: string
                description: Open amount in the currency of the administration
              book_amount_total:
                type: string
                description: Total amount in the currency of the administration
              category:
                type: string
                description: Category of the invoice
              currency_code:
                type: string
                description: Currency code of the invoice
              debtor_number:
                type: string
                description: Number of the debtor
              debtor_identifier:
                type: string
                description: Identifier of the debtor
              description:
                type: string
              due_date:
                type: string
                description: Date at which the invoice must have been paid
              invoice_identifier:
                type: string
                description: Unique database identifier from your invoicing software
              order_number:
                type: string
                description: Order number of the invoice
              peppol_identifier:
                type: string
                description: Peppol identifier of the invoice
              contact_identifier:
                type: string
                description: >-
                  Identifier of the invoice contact, when not provided the
                  debtor contact is used
              payment_condition:
                type: string
                description: Payment condition of the invoice
              payment_method:
                type: string
                description: Payment method of the invoice
                enum:
                  - bank_transfer
                  - direct_debit
                  - cash
                  - none
                  - unknown
              sent_at:
                type: string
                format: date-time
                description: >-
                  ISO8601 UTC Timestamp when the invoice was sent. If provided
                  the invoice will not be sent to the debtor, can only be
                  changed if the invoice is not sent yet
              labels:
                type: array
                description: >-
                  Labels of the invoice. If labels are provided then all must be
                  provided, any labels not in the request are removed from the
                  invoice.
                items:
                  type: string
              payment_term:
                type: integer
                format: int32
                description: Payment term of the invoice
              document:
                type: object
                description: Invoice PDF document
                properties:
                  checksum:
                    type: string
                    description: Checksum of the document file content in SHA3-512 Base64
                  filename:
                    type: string
                    description: Filename of the document
                  destroy:
                    type: boolean
                    description: >-
                      If provided the document will be removed from the invoice,
                      can be combined with checksum to remove a specific
                      document
              ubl_document:
                type: object
                description: UBL document
                properties:
                  checksum:
                    type: string
                    description: Checksum of the document file content in SHA3-512 Base64
                  filename:
                    type: string
                    description: Filename of the document
                  destroy:
                    type: boolean
                    description: >-
                      If provided the document will be removed from the invoice,
                      can be combined with checksum to remove a specific
                      document
              payments:
                type: array
                description: >-
                  If payments are provided then all payments for an invoice must
                  be provided and these must be ordered chronological with the
                  oldest first. If the open_amount of the invoice is changed,
                  but no payments are  provided, then Payt will create a payment
                  for the changed amount.
                items:
                  type: object
                  properties:
                    amount:
                      type: string
                      description: >-
                        The amount that was paid, in the currency of the
                        invoice.
                    origin_identifier:
                      type: string
                      description: >-
                        Origin identifier of the payment, should be unique in
                        the administration
                    cost_type:
                      type: string
                      description: >-
                        Indicates whether payment is for the principal amount of
                        the invoice of for one of the cost types added by Payt
                      enum:
                        - principal
                        - administration_costs
                        - interest_costs
                        - debt_collection_costs
                      default: principal
                    payment_date:
                      type: string
                      description: >-
                        Date of the payment. If not provided the current date is
                        used.
                    transaction_type:
                      type: string
                      description: >-
                        Indicates whether it was an actual payment or if there
                        was a different reason to change the open amount of the
                        invoice.
                      enum:
                        - credit
                        - payment
                        - reversal
                        - revaluation
                        - settlement
                        - write_off
                        - ''
                    book_amount:
                      type: string
                      description: >-
                        The amount that was paid, in the currency of the
                        administration. If not provided the book_amount is
                        calculated based on the exchange rate of the invoice.
                    description:
                      type: string
                      description: Description of the payment
                    payment_method:
                      type: string
                      description: >-
                        The method that was used to perform the payment. This is
                        only relevant when the transaction_type is `payment`.
                    reversal_code:
                      type: string
                      description: >-
                        The code provided by the bank which indicates the reason
                        why the direct debit transaction was reversed. This is
                        only relevant when the transaction_type is `reversal`
                  required:
                    - amount
                    - origin_identifier
            required:
              - invoice_number
      required:
        - administration_id
        - invoices
      description: Update administration invoices
    CustomerApi_SuccessEntity:
      type: object
      properties:
        success:
          type: boolean
          description: Request was handled successfully
        count:
          type: integer
          format: int32
          example: 98
          description: Number of records processed, those without errors
        errors:
          type: object
          example:
            '123456':
              - Validation error 1
              - Validation error 2
            '123461':
              - Validation error
          description: List of records that could not be processed and for which reasons
        warnings:
          type: object
          example:
            '123457':
              - Warning message 1
              - Warning message 2
          description: >-
            List of records that were partially processed, the messages contain
            warnings
      required:
        - success
        - count
        - errors
      description: CustomerApi_SuccessEntity model
    CustomerApi_ErrorEntity:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      required:
        - code
        - message
      description: CustomerApi_ErrorEntity model
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        OAuth2 access token or static API token. See
        [Authorization](/authentication/authorization) for how to obtain one.

````