Billing

Updates an invoice

Changed on

Updates a previously created invoice given its ID and updated content

put/v2/billing/invoices/{id}

Request

Path parameters

idinteger required

Invoice ID

Request body */*

invoiceDatestring

Invoice date in ISO format (YYYY-MM-DD).

billingPeriodStartDatestring

Billing period start date in ISO format (YYYY-MM-DD).

billingPeriodEndDatestring

Billing period end date in ISO format (YYYY-MM-DD).

invoiceNotestring

Note to include in the invoice.

dueDatestring

Due date for the invoice in ISO format (YYYY-MM-DD).

invoiceNumberstring

Invoice number.

Example request

{
  "invoiceDate": "2024-01-15T00:00:00.000Z",
  "products": [
    {
      "id": 123,
      "name": "Hardware Support",
      "productId": 456,
      "ticketProductId": 789,
      "taxable": true,
      "price": 500,
      "cost": 250,
      "quantity": 2,
      "description": "Monthly hardware support service"
    }
  ],
  "agreementProducts": [
    {
      "id": 123,
      "name": "Hardware Support",
      "productId": 456,
      "ticketProductId": 789,
      "taxable": true,
      "price": 500,
      "cost": 250,
      "quantity": 2,
      "description": "Monthly hardware support service"
    }
  ],
  "ticketProducts": [
    {
      "id": 123,
      "name": "Hardware Support",
      "productId": 456,
      "ticketProductId": 789,
      "taxable": true,
      "price": 500,
      "cost": 250,
      "quantity": 2,
      "description": "Monthly hardware support service"
    }
  ],
  "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
  "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
  "invoiceNote": "Monthly service invoice",
  "dueDate": "2024-02-15T00:00:00.000Z",
  "invoiceNumber": "INV-2024-001"
}

Response

Invoice successfully updated

idinteger

Unique identifier of the invoice.

invoiceNumberstring

Invoice number.

status'PENDING' | 'APPROVED' | 'COMPLETE' | 'EXPORTING' | 'FAILED' | 'EXPORTED' | 'ARCHIVED'

Invoice status.

billingPeriodStartDatestring

Billing period start date.

billingPeriodEndDatestring

Billing period end date.

invoiceDatestring

Invoice date.

dueDatestring

Due date.

subTotalnumber

Subtotal amount before discount.

discountnumber

Discount amount.

subTotalWithDiscountnumber

Subtotal after discount.

taxRatenumber

Tax rate applied.

totalTaxnumber

Total tax amount.

totalnumber

Total amount including tax.

currencystring

Currency code.

notesstring[]

Invoice notes.

invoiceNotestring

Invoice note field.

intervalstring

Billing interval.

errorDescriptionstring nullable

Error description if failed.

createTimestring

Created date.

updateTimestring

Last update date.

invoiceGenerationType'AUTOMATIC' | 'MANUAL' | 'ONE_OFF'

Invoice generation type.

appUserNamestring

App user name who created/modified the invoice.

failureReasonstring nullable

Failure reason if invoice processing failed.

allowOnlineCreditCardPaymentsboolean

Whether online credit card payments are allowed.

allowOnlineAchPaymentsboolean

Whether online ACH payments are allowed.

hasActiveIntegrationDataboolean

Whether invoice has active integration data.

deletedboolean

Whether the invoice is deleted.

Example response

{
  "id": 123,
  "invoiceNumber": "INV-2024-001",
  "client": {
    "id": 789,
    "name": "Acme Corporation"
  },
  "status": "APPROVED",
  "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
  "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
  "invoiceDate": "2024-02-01T00:00:00.000Z",
  "dueDate": "2024-02-15T00:00:00.000Z",
  "subTotal": 1000,
  "discount": 50,
  "subTotalWithDiscount": 950,
  "taxRate": 0.1,
  "totalTax": 95,
  "total": 1045,
  "currency": "USD",
  "invoiceNote": "Additional invoice information",
  "interval": "MONTHLY",
  "errorDescription": "Failed to export to Xero",
  "createTime": "2024-01-15T10:30:00.000Z",
  "updateTime": "2024-01-20T14:45:00.000Z",
  "invoiceGenerationType": "MANUAL",
  "billContent": {
    "issuerName": "ACME Corp",
    "issuerAddress": "123 Main St, City, State 12345",
    "issuerWebPage": "https://acme.com",
    "issuerPhone": "+1-555-0123",
    "billName": "Client Company",
    "billAddress": "456 Oak Ave, City, State 67890",
    "billEmail": "billing@client.com",
    "billPhone": "+1-555-9876"
  },
  "appUserName": "john.doe@company.com",
  "agreement": {
    "id": 456,
    "name": "Annual Support Agreement"
  },
  "failureReason": "Integration sync failed",
  "allowOnlineCreditCardPayments": true,
  "products": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "agreementProducts": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "ticketProducts": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "oneOffProducts": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "tax": {
    "name": "Sales Tax",
    "taxRates": [
      {
        "name": "State Tax",
        "rate": 0.08
      }
    ]
  }
}

Changes

    • warning

      added the new EXPORTED enum value to the response property for the response status

    • warning

      added the new ONE_OFF enum value to the response property for the response status

    • info

      added the optional property to the response with the status

    • breaking

      the response property became nullable for the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status