---
title: "Archive an invoice"
method: POST
path: "/v3/invoices/{invoiceId}/archive"
tags: ["invoices"]
---

# Archive an invoice

`POST /v3/invoices/{invoiceId}/archive`

Archive an existing invoice. In the response, the `archived` field is set as `true`.

You can restore an archived invoice with `POST /v3/invoices/{invoiceId}/restore`. There is no change when you archive an archived invoice.

## Path parameters

- `invoiceId` string, required — BILL-generated ID of the invoice. The value begins with `00e`.

## Headers

- `sessionId` string, nullable — API session ID generated with `/v3/login`
- `devKey` string, nullable — Developer key generated with your BILL developer account

## Response `200`

Archive an invoice response

- InvoiceResponseDto — Invoices response.
  - `id` string — BILL-generated ID of the invoice. The value begins with `00e`.
  - `archived` boolean — Set as `true` if the invoice is archived
  - `recordStatus` 'ACTIVE' | 'INACTIVE' | 'DRAFT' | 'UNDEFINED' — Invoice record status. When `recordStatus` is `ACTIVE`, `archived` is set as `false`. For any other `recordStatus` value, `archived` is set as `true`.
  - `invoiceNumber` string — User-generated invoice number. This value can be your chosen number scheme. If you do not set this field, `invoiceNumber` is auto-generated.
  - `invoiceDate` string, date — Invoice creation date. This value is in the `yyyy-MM-dd` format. If you do not set this field, `invoiceDate` is set as the date when the invoice is created.
  - `dueDate` string, date — Invoice due date. The value is in the `yyyy-MM-dd` format. If you do not set this field, `dueDate` is set as the date when the invoice is created.
  - `paymentTermId` string
  - `customerId` string — BILL-generated ID of the customer. The value begins with `0cu`.
  - `totalAmount` number — Invoice total amount
  - `dueAmount` number — Invoice due amount. The value is calculated by subtracting any applied credits (`creditAmount`), scheduled payment (`scheduledAmount`), and cleared payment from `totalAmount`.
  - `scheduledAmount` number — Invoice scheduled amount. The value is set as the customer payment amount that is pending clearance.
  - `creditAmount` number — Credit amount applied to the invoice. When a credit amount is applied to an invoice, the invoice `status` is set as `PARTIAL_PAYMENT` or `PAID_IN_FULL` depending on the invoice `totalAmount`.
  - `status` 'PAID_IN_FULL' | 'OPEN' | 'PARTIAL_PAYMENT' | 'SCHEDULED' | 'UNDEFINED' — Invoice status.
  - `exchangeRate` number — Invoice exchange rate
  - `createdBy` string — BILL-generated ID of the user that created the invoice. The value begins with `006`.
  - `createdTime` string, date-time — Invoice created time
  - `updatedTime` string, date-time — Invoice updated time
  - `invoiceLineItems` InvoiceResponseLineItem[] — Invoice line item information
    - `id` string — BILL-generated ID of the invoice line item. The value begins with `00f`.
    - `description` string — Invoice line item description
    - `price` number — Invoice line item unit price. For an invoice in an international currency (not USD), this value is in the local currency.
    - `quantity` number — Invoice line item unit quantity
    - `classifications` object — General ledger classifications information for the invoice line item
      - `chartOfAccountId` string — BILL-generated ID of the chart of accounts. The value begins with `0ca`.
      - `accountingClassId` string — BILL-generated ID of the accounting class. The value begins with `cls`.
      - `departmentId` string — BILL-generated ID of the department. The value begins with `0de`.
      - `jobId` string — BILL-generated ID of the job. The value begins with `job`.
      - `locationId` string — BILL-generated ID of the location. The value begins with `loc`.
      - `itemId` string — BILL-generated ID of the item. The value begins with `0ii`.
    - `taxable` boolean — Set as true if the invoice line item is taxable
  - `payToChartOfAccountId` string — BILL-generated ID of the chart of accounts for the invoice payment. The value begins with `0ca`.
  - `payments` InvoicePayment[] — Invoice payments information
    - `id` string — BILL-generated ID of the invoice payment. The value begins with `0ip`. This ID is generated when a payment is applied to the listed invoice.
    - `amount` number — Invoice amount paid
    - `status` 'PAID' | 'VOID' | 'SCHEDULED' | 'CANCELED' | 'INITIATED' | 'UNDEFINED' — Invoice payment status.
    - `date` string, date — Invoice payment date. The value is in the `yyyy-MM-dd` format.
  - `classifications` object — General ledger classifications information for the invoice
    - `accountingClassId` string — BILL-generated ID of the accounting class. The value begins with `cls`.
    - `departmentId` string — BILL-generated ID of the department. The value begins with `0de`.
    - `jobId` string — BILL-generated ID of the job. The value begins with `job`.
    - `locationId` string — BILL-generated ID of the location. The value begins with `loc`.
  - `salesTaxItemId` string — BILL-generated ID of the `SALES_TAX` item. The value begins with `0ii`. The tax rate is applied to all the invoice line items set as taxable.
  - `salesTaxTotal` number — Invoice sales tax amount. The value is set based on `salesTaxItemId`.
  - `salesTaxPercentage` number — Invoice sales tax percentage. The value is set based on `salesTaxItemId`.
  - `enableCardPayment` boolean — Set as `true` if the card payment option is enabled for the invoice
  - `convenienceFee` object — Convenience fee information
    - `percentage` number — Convenience fee percentage
  - `invoicePdfId` string — BILL-generated ID of the invoice PDF. The value begins with `att`. The invoice PDF is sent as an email attachment when you send an invoice to a customer. The invoice PDF also appears when the customer clicks the invoice payment link to complete the invoice payment.

## Other responses

- `4XX` — List of errors.
- `5XX` — List of errors.

---

[API](https://skmtc.net/bill/apis/bill-v3-api.md) · [All operations](https://skmtc.net/bill/apis/bill-v3-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bill/bill-v3-api/revisions/0483350c434e/schema)
