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

# Void an invoice

> Requires the scope invoices.settle.

Required scopes: `invoices.settle`.


## OpenAPI

````yaml POST /v1/invoices/{invoiceId}/void
openapi: 3.1.0
info:
  title: PRINTOOLS API
  version: 1.0.0
  description: >-
    The PRINTOOLS public REST API. This document is generated from the live
    route table and service GraphQL SDL; do not edit it by hand.


    Every 2xx response has {status, message, data}. Every non-2xx response has
    {error, message, status: false}.


    Tenant credential: send X-API-Key only. It is bound to one shop.
    X-PrintTools-Organization-Id is optional for that credential and, if sent,
    must match its shop.


    Partner credential: send X-API-Key, X-API-Secret, Authorization: Bearer
    <Cognito access token>, and X-PrintTools-Organization-Id. The OAuth flow is
    documented at https://app.printools.io/api/index.html#partner-auth.


    Read live limits from GET /v1/reference/limits. Field shapes are projected
    from operation declarations; local endpoints have explicit handler-derived
    schemas.
servers:
  - url: https://api.printools.io
    description: Production
security: []
externalDocs:
  description: Getting started, OAuth and webhook guidance
  url: https://app.printools.io/api/index.html
paths:
  /v1/invoices/{invoiceId}/void:
    post:
      tags:
        - invoices
      summary: Void an invoice.
      description: Requires the scope invoices.settle.
      operationId: post_v1_invoices_invoiceId_void
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
          description: UUID.
        - name: X-PrintTools-Organization-Id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Tenant credential: optional and, when sent, must equal the shop
            bound to the key. Partner credential: required; it selects an
            organisation the user previously authorised.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            Optional client-generated key for write retries. Reusing it with a
            different request returns 409; a replay includes
            Idempotency-Replayed: true.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: >-
                    Why it was voided — surfaced on the invoice and in the audit
                    trail.
            examples:
              example:
                summary: Replace example values with a request for your shop.
                value:
                  reason: example
      responses:
        '201':
          description: Successful response.
          headers:
            Idempotency-Replayed:
              description: >-
                Present and true when this response was replayed from a prior
                Idempotency-Key request.
              schema:
                type: string
                enum:
                  - 'true'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Success'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Output_Invoice'
        '400':
          description: >-
            Validation or request-shape error. Correct the request before
            retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Credential authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            WWW-Authenticate:
              schema:
                type: string
                example: ApiKey
        '403':
          description: >-
            The credential lacks a required scope, or its actor lacks
            permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The resource or endpoint was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Conflict, including idempotency-key reuse or an in-flight idempotent
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: The JSON request body exceeds the published size limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Retry after the returned delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              description: Whole seconds to wait.
              schema:
                type: integer
                minimum: 0
        '500':
          description: An unexpected server error. A retry can be appropriate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - tenantApiKey: []
        - partnerApiKey: []
          partnerApiSecret: []
          partnerBearer: []
      x-codeSamples:
        - lang: curl
          label: Tenant credential
          source: >-
            curl --request POST
            'https://api.printools.io/v1/invoices/11111111-2222-3333-4444-555555555555/void'
            \
              --header 'X-API-Key: $PRINTOOLS_API_KEY' \
              --header 'Content-Type: application/json' \
              --data '{"reason":"example"}'
components:
  schemas:
    Success:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: boolean
          description: >-
            The actual resolver result. It can be false when an operation
            returns false or null without throwing.
        message:
          type: string
          example: OK
        data: {}
      description: Every 2xx response uses this envelope.
    Output_Invoice:
      type: object
      properties:
        id:
          type: string
        quoteId:
          type: string
        clientId:
          type:
            - string
            - 'null'
        contactId:
          type:
            - string
            - 'null'
        invoiceRef:
          type: string
          description: INV-YYYY-NNNN, per-org sequence.
        currency:
          type: string
        subtotalCents:
          type: integer
          description: Money in cents (dollars -> cents, round half-up).
        gstCents:
          type: integer
        amountCents:
          type: integer
        status:
          type: string
          description: >-
            Draft | AwaitingPayment | Pending | Paid | PaymentFailed | Refunded
            | Void
        dueDate:
          type:
            - string
            - 'null'
          format: date
        lineItemsSnapshot:
          description: Locked copy of the quote tree at generation time.
        notes:
          type:
            - string
            - 'null'
        pinchPaymentLinkUrl:
          type:
            - string
            - 'null'
          description: >-
            Hosted Pinch payment link; null for manual-payment invoices.


            Also null — for every read and every mutation return — while the
            org's

            `payments` settings area has `paymentLinksEnabled: false`. The
            column is left

            intact underneath, so re-enabling the toggle restores the link
            without

            re-minting it at Pinch.
        pinchPaymentId:
          type:
            - string
            - 'null'
          description: Pinch payment id (pmt_...) once a platform payment lands (C3).
        xeroInvoiceId:
          type:
            - string
            - 'null'
          description: >-
            Accounting-sync receipts (Epic D): set once pushed; null = not
            synced.
        qboSalesReceiptId:
          type:
            - string
            - 'null'
        xeroPaymentId:
          type:
            - string
            - 'null'
          description: >-
            Xero payment id once the payment is recorded in Xero; null = invoice
            pushed but payment not synced.
        xeroInvoiceUrl:
          type:
            - string
            - 'null'
          description: Deep link to this invoice in Xero; null until pushed.
        qboInvoiceId:
          type:
            - string
            - 'null'
          description: >-
            QB-01 — the COLLECTABLE QuickBooks Invoice, set by
            pushInvoiceToQuickBooks.

            Distinct from qboSalesReceiptId, which is the paid-record document
            the

            dispatcher writes for a shop that never presses the manual action;
            an

            invoice carries one or the other, never both.
        qboPaymentId:
          type:
            - string
            - 'null'
          description: >-
            QuickBooks payment id once the payment is booked there; null =
            invoice pushed but payment not synced.
        qboInvoiceUrl:
          type:
            - string
            - 'null'
          description: Deep link to this invoice in QuickBooks; null until pushed.
        paidMethod:
          type:
            - string
            - 'null'
          description: >-
            pinch | bank_transfer | cash | card | other | xero | quickbooks (how
            Paid happened).
        paidReference:
          type:
            - string
            - 'null'
        paidAt:
          type:
            - string
            - 'null'
          format: date-time
        sentAt:
          type:
            - string
            - 'null'
          format: date-time
        pinchRefundId:
          type:
            - string
            - 'null'
          description: Pinch refund id (rfd_...); null for off-platform refunds.
        refundedAmountCents:
          type:
            - integer
            - 'null'
        refundReason:
          type:
            - string
            - 'null'
        refundedAt:
          type:
            - string
            - 'null'
          format: date-time
        voidReason:
          type:
            - string
            - 'null'
          description: Why the invoice was voided; null unless status is Void.
        voidedAt:
          type:
            - string
            - 'null'
          format: date-time
        paymentClaimedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Client-declared off-platform payment ("remittance advice"),
            submitted from the portal.

            NOT a payment record — the shop must verify it. Cleared by
            markInvoicePaid (confirmed),

            dismissPaymentClaim (rejected) and the Pinch webhook `paid` path (a
            real payment makes

            the claim moot).
        paymentClaimedMethod:
          type:
            - string
            - 'null'
          description: bank_transfer | cash | other — the portal's claim vocabulary.
        paymentClaimedReference:
          type:
            - string
            - 'null'
        paymentClaimedNote:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - quoteId
        - invoiceRef
        - currency
        - subtotalCents
        - gstCents
        - amountCents
        - status
        - lineItemsSnapshot
        - createdAt
        - updatedAt
    Error:
      type: object
      required:
        - error
        - message
        - status
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
        status:
          type: boolean
          const: false
      description: Every non-2xx response uses this envelope.
  securitySchemes:
    tenantApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Tenant credential. This is sufficient by itself.
    partnerApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Partner application client ID.
    partnerApiSecret:
      type: apiKey
      in: header
      name: X-API-Secret
      description: Partner application secret.
    partnerBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cognito access token obtained through OAuth.

````