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

# Void invoice

> Void an `active` or `completed` invoice. This has the same effects as the
admin Void action: applied credit-memo discounts are rolled back, the sales
order's invoiced quantities are rolled back, and a QuickBooks or Xero invoice
is voided on the next accounting sync.

The linked sales order is kept by default. Send `"delete_sales_order": true`
to delete it as well. Only a sales order that Luminous created from the
invoice is deleted; a channel order (for example, from Shopify) is always kept.

Requires the API token user to have the invoice update permission
(`invoices.update`).




## OpenAPI

````yaml /api-reference/build.yaml post /invoices/{invoiceId}/void
openapi: 3.0.0
info:
  title: Luminous API
  version: 1.0.0
  description: API documentation for Luminous
servers:
  - url: https://{companyName}.api.joinluminous.com/external/api/v1
    variables:
      companyName:
        default: companyName
        description: Your company-specific subdomain
security: []
tags:
  - name: Products
    description: Get and manage products
  - name: Pricing
    description: Manage price schedules, levels, and customizations
  - name: BOMs
    description: Manage Bills of Materials (BOMs)
  - name: Labels
    description: Label rendering via Labelary ZPL service
  - name: Companies
    description: Manage business accounts and their associated data
  - name: Contacts
    description: Manage contact information for individuals
  - name: Suppliers
    description: Manage suppliers (factories) — vendors used on purchase orders
  - name: Supplier SKUs
    description: Manage per-supplier SKU and unit-cost overrides for products
  - name: Locations
    description: Manage warehouses and locations
  - name: Inventory
    description: Get and adjust product stock levels
  - name: Lots
    description: Create, update, and delete product lots (batches)
  - name: Transfer Orders
    description: Manage transfer orders
  - name: Fulfillment Orders
    description: Manage fulfillment orders and picklists
  - name: Freight
    description: >-
      Freightview LTL freight — quotes, booking and documents for fulfillment
      orders
  - name: Fulfillment Priority Lists
    description: Configure fulfillment routing priority lists
  - name: Purchase Orders
    description: Get and modify purchase orders
  - name: Supplier Portal
    description: >-
      Read a supplier's response to a purchase order and control the one-click
      portal link
  - name: Receiving Reports
    description: Manage receiving reports
  - name: Payment Obligations
    description: Manage payment obligations for purchase orders
  - name: Sales Orders
    description: Manage sales orders and sales order shipments
  - name: Purgatory
    description: >-
      Inspect and resolve non-posted sales orders in the purgatory staging
      workflow
  - name: PickFlow Warehouse
    description: >-
      Warehouse-floor lookups for PickFlow — barcode resolution, bin and product
      stock, bin search, and receivables
  - name: PickFlow Shipping
    description: >-
      Provider-agnostic shipping rates, services, packages, and label purchase
      for PickFlow
  - name: Cycle Counts
    description: >-
      Create, drive, and post PickFlow cycle counts — batches, per-warehouse
      sessions, and CSV import/export
  - name: Print Stations
    description: List paired print stations and enqueue print jobs to them
  - name: Invoices
    description: Get and manage invoices
  - name: Work Orders
    description: >-
      Manage work orders — production lifecycle, steps, materials, links,
      shipments, and comments
  - name: Production Batches
    description: Group and manage work orders as production batches
  - name: Bills
    description: >-
      Accounts payable bill management, payments, attachments, allocations, and
      variance
  - name: Prepayments
    description: Manage vendor prepayments and applications
  - name: Vendor Credits
    description: Manage vendor credits and applications
  - name: Vendor Returns
    description: Manage vendor returns and credit generation
  - name: Customer Returns
    description: Manage customer returns (sales returns), receiving, and restock behavior
  - name: Stock Snapshot
    description: Point-in-time stock snapshots with export support
  - name: Consumption
    description: Consumption reports and exports
  - name: Inventory Aging
    description: Cost-layer-based inventory aging reports
  - name: Bills Reports
    description: Accounts payable bills aging reports
  - name: Forecast
    description: Materialized forecast data
  - name: Reports
    description: Close the books, inventory discrepancy, transaction COGS, and EDI reports
  - name: Tags
    description: Add/remove tags across various resources
  - name: Custom Fields
    description: Get and set custom fields across various resources
  - name: Currency
    description: Currency configuration, exchange rates, and conversion
  - name: Drive
    description: >
      Browse, upload, tag and manage files in your Luminous Drive. An API token
      sees the shared

      drive only, never My Files or restricted folders and files. Every write
      and download made

      through the API is recorded in the file's activity log (`GET
      /file-cabinet/files/{id}/activity`)

      with `actor_kind: api_token`.
  - name: Integration Mappings
    description: Manage integration mappings for external systems
  - name: Integration Field Mappings
    description: Manage field-level mappings between Luminous and external systems
  - name: Automations
    description: Create, test, and inspect automation rules and their runs
paths:
  /invoices/{invoiceId}/void:
    post:
      tags:
        - Invoices
      summary: Void invoice
      description: >
        Void an `active` or `completed` invoice. This has the same effects as
        the

        admin Void action: applied credit-memo discounts are rolled back, the
        sales

        order's invoiced quantities are rolled back, and a QuickBooks or Xero
        invoice

        is voided on the next accounting sync.


        The linked sales order is kept by default. Send `"delete_sales_order":
        true`

        to delete it as well. Only a sales order that Luminous created from the

        invoice is deleted; a channel order (for example, from Shopify) is
        always kept.


        Requires the API token user to have the invoice update permission

        (`invoices.update`).
      operationId: voidInvoice
      parameters:
        - in: path
          name: invoiceId
          required: true
          schema:
            type: integer
          description: ID of the invoice to void
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delete_sales_order:
                  type: boolean
                  default: false
                  description: >
                    Also delete the linked sales order. Only a sales order that
                    Luminous

                    created from the invoice is deleted; channel orders are
                    always kept.
      responses:
        '200':
          description: Invoice voided; returns the updated invoice
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique identifier for the invoice
                      created_at:
                        type: string
                        format: date-time
                        description: Timestamp when the invoice was created
                      updated_at:
                        type: string
                        format: date-time
                        description: Timestamp when the invoice was last updated
                      status:
                        type: string
                        description: Current status of the invoice
                      payment_status:
                        type: string
                        description: Payment status of the invoice
                      order_date:
                        type: string
                        format: date-time
                        description: Date when the invoice was created
                      ship_by_date:
                        type: string
                        format: date-time
                        description: Required ship by date
                      approval_status:
                        type: string
                        description: Approval status of the invoice
                      customer_po_number:
                        type: string
                        description: Customer PO number
                      payment_terms:
                        type: string
                        nullable: true
                        description: Payment terms for the invoice
                      public_note:
                        type: string
                        nullable: true
                        description: Public note visible to customer
                      private_note:
                        type: string
                        nullable: true
                        description: Private internal note
                      total_qty:
                        type: number
                        format: float
                        description: Total quantity of items
                      total_shipping:
                        type: number
                        format: float
                        description: >-
                          Shipping charge on the invoice, rounded to 2 decimal
                          places (cents, HALF_UP).
                      total_discount:
                        type: number
                        format: float
                        description: >-
                          Discount amount on the invoice, rounded to 2 decimal
                          places (cents, HALF_UP).
                      total:
                        type: number
                        format: float
                        description: >-
                          Net total invoice amount, rounded to 2 decimal places
                          (cents, HALF_UP).
                      total_paid:
                        type: number
                        format: float
                        description: >-
                          Amount paid against the invoice, rounded to 2 decimal
                          places (cents, HALF_UP).
                      total_due:
                        type: number
                        format: float
                        description: >-
                          Outstanding amount due (total minus total_paid),
                          rounded to 2 decimal places (cents, HALF_UP).
                      warehouse_id:
                        type: integer
                        nullable: true
                        description: Associated warehouse ID
                      ship_to:
                        type: object
                        properties:
                          address_1:
                            type: string
                            nullable: true
                          address_2:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          state:
                            type: string
                            nullable: true
                          zip:
                            type: string
                            nullable: true
                          country:
                            type: string
                            nullable: true
                        description: Shipping address details
                      quickbooks_invoice_id:
                        type: string
                        nullable: true
                        description: QuickBooks invoice ID
                      quickbooks_message:
                        type: string
                        description: Message from QuickBooks integration
                      customer:
                        description: Customer information
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Unique identifier for the customer
                          name:
                            type: string
                            description: Business name
                          address_1:
                            type: string
                            nullable: true
                            description: Primary address
                          address_2:
                            type: string
                            nullable: true
                            description: Secondary address
                          city:
                            type: string
                            nullable: true
                            description: City
                          state:
                            type: string
                            nullable: true
                            description: State/Province
                          zip:
                            type: string
                            nullable: true
                            description: Postal code
                          country:
                            type: string
                            nullable: true
                            description: Country
                          phone:
                            type: string
                            nullable: true
                            description: Phone number
                          email:
                            type: string
                            nullable: true
                            description: Email address
                          created_at:
                            type: string
                            format: date-time
                            description: Timestamp when customer was created
                          updated_at:
                            type: string
                            format: date-time
                            description: Timestamp when customer was last updated
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the line item
                            created_at:
                              type: string
                              format: date-time
                              description: Timestamp when the item was created
                            updated_at:
                              type: string
                              format: date-time
                              description: Timestamp when the item was last updated
                            sku:
                              type: string
                              description: Product SKU
                            name:
                              type: string
                              description: Product name
                            product_id:
                              type: integer
                              description: Product identifier
                            qty:
                              type: number
                              format: float
                              description: Quantity ordered
                            unit_price:
                              type: number
                              format: float
                              description: Price per unit
                            discount:
                              type: number
                              format: float
                              nullable: true
                              description: Discount amount
                            total:
                              type: number
                              format: float
                              description: Total line item amount
                            taxable:
                              type: boolean
                              description: >-
                                Whether the line item is subject to sales tax.
                                Defaults to true when not set.
                        description: Line items in the invoice
                      payments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the payment
                            invoice_id:
                              type: integer
                              description: Associated invoice ID
                            gateway:
                              type: string
                              description: Payment gateway used
                            type:
                              type: string
                              description: Payment type
                            charge_type:
                              type: string
                              description: Type of charge
                            amount:
                              type: number
                              format: float
                              description: Payment amount
                            date:
                              type: string
                              format: date-time
                              description: Payment date
                            status:
                              type: string
                              description: Payment status
                            external_id:
                              type: string
                              nullable: true
                              description: External payment identifier
                            notes:
                              type: string
                              nullable: true
                              description: Payment notes
                            reference_id:
                              type: string
                              nullable: true
                              description: Reference identifier
                            gateway_response:
                              type: object
                              properties:
                                status:
                                  type: string
                                  description: Gateway response status
                                code:
                                  type: string
                                  description: Response code
                                message:
                                  type: string
                                  description: Response message
                                metadata:
                                  type: string
                                  description: Additional metadata
                              description: Payment gateway response details
                            created_by:
                              type: integer
                              nullable: true
                              description: User who created the payment
                            created_at:
                              type: string
                              format: date-time
                              description: Timestamp when payment was created
                            updated_at:
                              type: string
                              format: date-time
                              description: Timestamp when payment was last updated
                            deleted_at:
                              type: string
                              format: date-time
                              nullable: true
                              description: Soft delete timestamp
                        description: Payment records for the invoice
                      sales_order:
                        type: object
                        nullable: true
                        description: Sales order associated with the invoice (if any)
                        properties:
                          id:
                            type: integer
                            description: Unique identifier for the sales order
                          created_at:
                            type: string
                            format: date-time
                            description: Timestamp when the order was created
                          updated_at:
                            type: string
                            format: date-time
                            description: Timestamp when the order was last updated
                          status:
                            type: string
                            description: Current status of the order
                          order_id:
                            type: string
                            description: External order identifier
                          order_number:
                            type: string
                            description: Order number
                          order_date:
                            type: string
                            format: date
                            description: Date when the order was placed
                          payment_date:
                            type: string
                            format: date
                            description: Date when payment was received
                          ship_by_date:
                            type: string
                            format: date
                            description: Required ship by date
                          age:
                            type: integer
                            description: Age of the order in days
                          order_status:
                            type: string
                            description: Status of the order
                          customer_id:
                            type: string
                            description: Customer identifier
                          customer_username:
                            type: string
                            description: Customer's username
                          customer_email:
                            type: string
                            description: Customer's email address
                          bill_to:
                            type: object
                            description: Billing information
                          ship_to:
                            type: object
                            description: Shipping information
                          requested_shipping_service:
                            type: string
                            nullable: true
                            description: >-
                              What shipping service to use when shipping this
                              order
                          total:
                            type: number
                            format: float
                            description: Total order amount
                          total_paid:
                            type: number
                            format: float
                            description: Amount paid
                          total_tax:
                            type: number
                            format: float
                            description: Total tax amount
                          total_shipping:
                            type: number
                            format: float
                            description: Total shipping amount
                          customer_notes:
                            type: string
                            description: Notes from the customer
                          internal_notes:
                            type: string
                            description: Internal notes
                          ship_date:
                            type: string
                            format: date
                            description: Date when order was shipped
                          hold_until_date:
                            type: string
                            format: date
                            description: Hold until date
                          user_id:
                            type: integer
                            description: User ID associated with the order
                          externally_fulfilled:
                            type: boolean
                            description: Whether the order is fulfilled externally
                          externally_fulfilled_by:
                            type: string
                            description: Entity fulfilling the order externally
                          is_posted:
                            type: boolean
                            description: Whether the order is posted
                          posted_by:
                            type: string
                            description: User who posted the order
                          not_sync:
                            type: boolean
                            description: Sync status
                          sales_posted:
                            type: boolean
                            description: Sales posting status
                          split_order:
                            type: boolean
                            description: Whether the order is split
                          skip_inventory:
                            type: boolean
                            description: Whether to skip inventory
                          skip_sales_report:
                            type: boolean
                            description: Whether to skip sales report
                          channel_id:
                            type: integer
                            description: Channel identifier
                          total_order_cost:
                            type: number
                            format: float
                            description: Total cost of order
                          total_order_quantity:
                            type: number
                            format: float
                            description: Total quantity of items
                          order_cost_details:
                            type: object
                            description: Detailed order cost information
                          source:
                            type: string
                            description: Order source
                          shipstation_order_id:
                            type: string
                            description: ShipStation order identifier
                          type:
                            type: string
                            description: Order type
                          parent_id:
                            type: integer
                            description: Parent order ID if applicable
                          shipping_revenue:
                            type: number
                            format: float
                            description: Revenue from shipping
                          product_total:
                            type: number
                            format: float
                            description: Total product amount
                          total_discount:
                            type: number
                            format: float
                            description: Total discount amount
                          picking_status:
                            type: string
                            description: Status of picking process
                          starred_description:
                            type: string
                            description: Description for starred orders
                          customer_po_number:
                            type: string
                            description: Customer PO number
                      custom_fields:
                        type: object
                        description: Custom fields for the invoice
                        example:
                          Field Name 1: Some Value
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the tag
                            name:
                              type: string
                              description: Name of the tag
                            description:
                              type: string
                              nullable: true
                              description: Description of the tag
                            icon:
                              type: string
                              nullable: true
                              description: Icon identifier or URL for the tag
                            color:
                              type: string
                              nullable: true
                              description: Color code for the tag
                          required:
                            - id
                            - name
                        description: Tags associated with the invoice
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '403':
          description: Token user lacks the invoice update permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Invoice not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '422':
          description: >
            The invoice cannot be voided: it is already void, its status is not

            `active`/`completed`, it has a price override that is not approved
            yet, or

            it has no valid payment terms. `message` says which (for example

            `Invoice is already void.`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '500':
          description: The void failed while writing its changes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using a bearer token. To create a token, navigate to
        /settings/api-tokens and click Create API Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.