---
title: "Updates an invoice"
method: PUT
path: "/v2/billing/invoices/{id}"
tags: ["Billing"]
---

# Updates an invoice

`PUT /v2/billing/invoices/{id}`

## Request

- Base URL: `https://app.ninjarmm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.ninjarmm.com/v2/billing/invoices/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sessionKey`
- TypeScript: <https://skmtc.dev/ninjarmm/apis/ninjaone-public-api-2-0/docs/v2/billing/invoices/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a previously created invoice given its ID and updated content

## Path parameters

- `id` integer, required

## Request body `*/*`

- object: Representation of a ninja billing Invoice update request.
  - `invoiceDate` string: Invoice date in ISO format (YYYY-MM-DD).
  - `products` object[]: List of catalog products to include in the invoice.
    - `id` integer: ID of the invoice product (required for updates, null for new products).
    - `name` string, required: Name of the product.
    - `productId` integer: ID of the product from the catalog.
    - `ticketProductId` integer: ID of the ticket product.
    - `taxable` boolean, required: Whether the product is taxable.
    - `price` number, double, required: Price per unit of the product.
    - `cost` number, double, required: Cost per unit of the product.
    - `quantity` number, required: Quantity of the product.
    - `description` string, required: Description of the product.
  - `agreementProducts` object[]: List of agreement products to include in the invoice.
    - `id` integer: ID of the invoice product (required for updates, null for new products).
    - `name` string, required: Name of the product.
    - `productId` integer: ID of the product from the catalog.
    - `ticketProductId` integer: ID of the ticket product.
    - `taxable` boolean, required: Whether the product is taxable.
    - `price` number, double, required: Price per unit of the product.
    - `cost` number, double, required: Cost per unit of the product.
    - `quantity` number, required: Quantity of the product.
    - `description` string, required: Description of the product.
  - `ticketProducts` object[]: List of ticket products to include in the invoice.
    - `id` integer: ID of the invoice product (required for updates, null for new products).
    - `name` string, required: Name of the product.
    - `productId` integer: ID of the product from the catalog.
    - `ticketProductId` integer: ID of the ticket product.
    - `taxable` boolean, required: Whether the product is taxable.
    - `price` number, double, required: Price per unit of the product.
    - `cost` number, double, required: Cost per unit of the product.
    - `quantity` number, required: Quantity of the product.
    - `description` string, required: Description of the product.
  - `billingPeriodStartDate` string: Billing period start date in ISO format (YYYY-MM-DD).
  - `billingPeriodEndDate` string: Billing period end date in ISO format (YYYY-MM-DD).
  - `invoiceNote` string: Note to include in the invoice.
  - `dueDate` string: Due date for the invoice in ISO format (YYYY-MM-DD).
  - `invoiceNumber` string: Invoice number.

## Response `200`

Invoice successfully updated

- object: Representation of a ninja billing invoice.
  - `id` integer: Unique identifier of the invoice.
  - `invoiceNumber` string: Invoice number.
  - `client` object: Client information associated with this invoice
    - `id` integer: Unique identifier for the client
    - `name` string: Name of the client
    - `deleted` boolean, required: Indicates if the client has been deleted
  - `status` 'PENDING' | 'APPROVED' | 'COMPLETE' | 'EXPORTING' | 'FAILED' | 'EXPORTED' | 'ARCHIVED': Invoice status.
  - `billingPeriodStartDate` string: Billing period start date.
  - `billingPeriodEndDate` string: Billing period end date.
  - `invoiceDate` string: Invoice date.
  - `dueDate` string: Due date.
  - `subTotal` number: Subtotal amount before discount.
  - `discount` number: Discount amount.
  - `subTotalWithDiscount` number: Subtotal after discount.
  - `taxRate` number: Tax rate applied.
  - `totalTax` number: Total tax amount.
  - `total` number: Total amount including tax.
  - `currency` string: Currency code.
  - `notes` string[]: Invoice notes.
  - `invoiceNote` string: Invoice note field.
  - `interval` string: Billing interval.
  - `errorDescription` string, nullable: Error description if failed.
  - `createTime` string: Created date.
  - `updateTime` string: Last update date.
  - `invoiceGenerationType` 'AUTOMATIC' | 'MANUAL' | 'ONE_OFF': Invoice generation type.
  - `billContent` object: Bill content information for invoice.
    - `issuerName` string: Issuer name.
    - `issuerAddress` string: Issuer address.
    - `issuerWebPage` string: Issuer webpage.
    - `issuerPhone` string: Issuer phone.
    - `billName` string: Bill name.
    - `billAddress` string: Bill address.
    - `billEmail` string: Bill email.
    - `billPhone` string: Bill phone.
  - `appUserName` string: App user name who created/modified the invoice.
  - `agreement` object: Basic agreement information.
    - `id` integer: Agreement ID.
    - `name` string: Agreement name.
  - `externalTax` object: External tax information.
    - `id` string
    - `name` string
  - `failureReason` string, nullable: Failure reason if invoice processing failed.
  - `allowOnlineCreditCardPayments` boolean: Whether online credit card payments are allowed.
  - `allowOnlineAchPayments` boolean: Whether online ACH payments are allowed.
  - `hasActiveIntegrationData` boolean: Whether invoice has active integration data.
  - `products` object[]: Invoice products/line items added directly to the invoice.
    - `id` integer: Unique identifier of the invoice product.
    - `productId` integer: Product ID from catalog.
    - `name` string: Product name.
    - `description` string: Description.
    - `price` number: Unit price.
    - `cost` number: Cost.
    - `quantity` number: Quantity.
    - `subTotal` number: Subtotal before discount.
    - `discount` number: Discount amount.
    - `subTotalWithDiscount` number: Subtotal after discount.
    - `taxRate` number: Tax rate applied.
    - `totalTax` number: Total tax amount.
    - `total` number: Total amount including tax.
    - `taxable` boolean: Whether the product is taxable.
    - `billingPeriodStartDate` string: Billing period start date.
    - `billingPeriodEndDate` string: Billing period end date.
    - `accountId` integer: Account ID.
    - `quantityType` string: Quantity type.
    - `createTime` string: Created date.
    - `updateTime` string: Last update date.
    - `agreementProductId` integer: Agreement product ID.
    - `ticketProductId` integer: Ticket product ID.
    - `integrationSettings` object: Integration settings for invoice product.
      - `inheritTaxRateFromAgreement` boolean: Whether to inherit tax rate from agreement.
      - `taxRate` string: Tax rate id from integration
    - `group` boolean: Whether this is a product group.
    - `productIds` integer[]: Product IDs if this is a group.
    - `tax` object, nullable: Snapshot of the tax configuration at the time it was applied to this invoice product.
      - `name` string: Name of the tax configuration.
      - `taxRates` object[]: List of tax rates applied.
        - `name` string: Name of the tax rate.
        - `rate` number: Tax rate value.
        - `compounded` boolean: Whether this rate is compounded on top of previous rates.
  - `agreementProducts` object[]: Invoice products/line items coming from agreements.
    - `id` integer: Unique identifier of the invoice product.
    - `productId` integer: Product ID from catalog.
    - `name` string: Product name.
    - `description` string: Description.
    - `price` number: Unit price.
    - `cost` number: Cost.
    - `quantity` number: Quantity.
    - `subTotal` number: Subtotal before discount.
    - `discount` number: Discount amount.
    - `subTotalWithDiscount` number: Subtotal after discount.
    - `taxRate` number: Tax rate applied.
    - `totalTax` number: Total tax amount.
    - `total` number: Total amount including tax.
    - `taxable` boolean: Whether the product is taxable.
    - `billingPeriodStartDate` string: Billing period start date.
    - `billingPeriodEndDate` string: Billing period end date.
    - `accountId` integer: Account ID.
    - `quantityType` string: Quantity type.
    - `createTime` string: Created date.
    - `updateTime` string: Last update date.
    - `agreementProductId` integer: Agreement product ID.
    - `ticketProductId` integer: Ticket product ID.
    - `integrationSettings` object: Integration settings for invoice product.
      - `inheritTaxRateFromAgreement` boolean: Whether to inherit tax rate from agreement.
      - `taxRate` string: Tax rate id from integration
    - `group` boolean: Whether this is a product group.
    - `productIds` integer[]: Product IDs if this is a group.
    - `tax` object, nullable: Snapshot of the tax configuration at the time it was applied to this invoice product.
      - `name` string: Name of the tax configuration.
      - `taxRates` object[]: List of tax rates applied.
        - `name` string: Name of the tax rate.
        - `rate` number: Tax rate value.
        - `compounded` boolean: Whether this rate is compounded on top of previous rates.
  - `ticketProducts` object[]: Invoice products/line items coming from tickets.
    - `id` integer: Unique identifier of the invoice product.
    - `productId` integer: Product ID from catalog.
    - `name` string: Product name.
    - `description` string: Description.
    - `price` number: Unit price.
    - `cost` number: Cost.
    - `quantity` number: Quantity.
    - `subTotal` number: Subtotal before discount.
    - `discount` number: Discount amount.
    - `subTotalWithDiscount` number: Subtotal after discount.
    - `taxRate` number: Tax rate applied.
    - `totalTax` number: Total tax amount.
    - `total` number: Total amount including tax.
    - `taxable` boolean: Whether the product is taxable.
    - `billingPeriodStartDate` string: Billing period start date.
    - `billingPeriodEndDate` string: Billing period end date.
    - `accountId` integer: Account ID.
    - `quantityType` string: Quantity type.
    - `createTime` string: Created date.
    - `updateTime` string: Last update date.
    - `agreementProductId` integer: Agreement product ID.
    - `ticketProductId` integer: Ticket product ID.
    - `integrationSettings` object: Integration settings for invoice product.
      - `inheritTaxRateFromAgreement` boolean: Whether to inherit tax rate from agreement.
      - `taxRate` string: Tax rate id from integration
    - `group` boolean: Whether this is a product group.
    - `productIds` integer[]: Product IDs if this is a group.
    - `tax` object, nullable: Snapshot of the tax configuration at the time it was applied to this invoice product.
      - `name` string: Name of the tax configuration.
      - `taxRates` object[]: List of tax rates applied.
        - `name` string: Name of the tax rate.
        - `rate` number: Tax rate value.
        - `compounded` boolean: Whether this rate is compounded on top of previous rates.
  - `oneOffProducts` object[]: Invoice products/line items added directly to a one-off invoice (not linked to any catalog product, agreement, or ticket).
    - `id` integer: Unique identifier of the invoice product.
    - `productId` integer: Product ID from catalog.
    - `name` string: Product name.
    - `description` string: Description.
    - `price` number: Unit price.
    - `cost` number: Cost.
    - `quantity` number: Quantity.
    - `subTotal` number: Subtotal before discount.
    - `discount` number: Discount amount.
    - `subTotalWithDiscount` number: Subtotal after discount.
    - `taxRate` number: Tax rate applied.
    - `totalTax` number: Total tax amount.
    - `total` number: Total amount including tax.
    - `taxable` boolean: Whether the product is taxable.
    - `billingPeriodStartDate` string: Billing period start date.
    - `billingPeriodEndDate` string: Billing period end date.
    - `accountId` integer: Account ID.
    - `quantityType` string: Quantity type.
    - `createTime` string: Created date.
    - `updateTime` string: Last update date.
    - `agreementProductId` integer: Agreement product ID.
    - `ticketProductId` integer: Ticket product ID.
    - `integrationSettings` object: Integration settings for invoice product.
      - `inheritTaxRateFromAgreement` boolean: Whether to inherit tax rate from agreement.
      - `taxRate` string: Tax rate id from integration
    - `group` boolean: Whether this is a product group.
    - `productIds` integer[]: Product IDs if this is a group.
    - `tax` object, nullable: Snapshot of the tax configuration at the time it was applied to this invoice product.
      - `name` string: Name of the tax configuration.
      - `taxRates` object[]: List of tax rates applied.
        - `name` string: Name of the tax rate.
        - `rate` number: Tax rate value.
        - `compounded` boolean: Whether this rate is compounded on top of previous rates.
  - `tax` object, nullable: Snapshot of the tax configuration at the time it was applied to this invoice product.
    - `name` string: Name of the tax configuration.
    - `taxRates` object[]: List of tax rates applied.
      - `name` string: Name of the tax rate.
      - `rate` number: Tax rate value.
      - `compounded` boolean: Whether this rate is compounded on top of previous rates.
  - `deleted` boolean: Whether the invoice is deleted.

## Other responses

- `400`: Bad Request - Validation error or invoice is complete
- `403`: Forbidden - Insufficient permissions
- `404`: Invoice not found
- `409`: Conflict - Invoice number already exists

## Changes

- **2026-10-01** `5932b93aea2a`: 2 warning, 1 info
  - added the new `EXPORTED` enum value to the `status` response property for the response status `200`
  - added the new `ONE_OFF` enum value to the `invoiceGenerationType` response property for the response status `200`
  - added the optional property `oneOffProducts` to the response with the `200` status
- **2026-07-26** `753f26d46650`: 1 breaking, 4 info
  - the response property `failureReason` became nullable for the status `200`
  - added the optional property `agreementProducts/items/tax` to the response with the `200` status
  - added the optional property `products/items/tax` to the response with the `200` status
  - added the optional property `tax` to the response with the `200` status
  - …1 more
- **2026-07-12** `dec5d4ed264e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ninjarmm/apis/ninjaone-public-api-2-0/changes/v2/billing/invoices/:id/put.md)

---

[API](https://skmtc.dev/ninjarmm/apis/ninjaone-public-api-2-0.md) - [All operations](https://skmtc.dev/ninjarmm/apis/ninjaone-public-api-2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/ninjarmm/apis/ninjaone-public-api-2-0/revisions/5ce571d1bb71?raw)
