---
title: "Archive a vendor credit"
method: POST
path: "/v3/vendor-credits/{vendorCreditId}/archive"
tags: ["vendor-credits"]
---

# Archive a vendor credit

`POST /v3/vendor-credits/{vendorCreditId}/archive`

## Request

- Base URL: `https://gateway.stage.bill.com/connect`
- URL: `https://gateway.stage.bill.com/connect/v3/vendor-credits/{vendorCreditId}/archive`
- Auth: none declared

Archive an existing vendor credit. In the response, the `archived` field is set as `true`. An archived vendor credit cannot be restored.

## Path parameters

- `vendorCreditId` string, required: BILL-generated ID of the vendor credit. The value begins with `vcr`.

## 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 a vendor credit response

- VendorCreditResponseDto: VendorCredit response Dto.
  - `id` string: BILL-generated ID of the vendor credit. The value begins with `vcr`.
  - `vendorId` string: BILL-generated ID of the vendor. The value begins with `009`.
  - `referenceNumber` string: User-generated vendor credit number. This value can be in your chosen number scheme.
  - `creditDate` string, date: Vendor credit issued date. This value is in the `yyyy-MM-dd` format.
  - `description` string: Vendor credit description
  - `archived` boolean: Set as `true` if the vendor credit is archived
  - `applyToChartOfAccountId` string: BILL-generated ID of the chart of accounts used when the vendor credit is applied to a bill payment. The value begins with `0ca`.
  - `applyToBankAccountId` string: BILL-generated ID of the bank account used when the vendor credit is applied to a bill payment. The value begins with `bac`. **Note**: You can set only one of `applyToChartOfAccountId` or `applyToBankAccountId`.
  - `amount` number: Vendor credit amount
  - `appliedAmount` number: Vendor credit amount applied to invoices
  - `status` 'FULLY_APPLIED' | 'NOT_APPLIED' | 'PARTIALLY_APPLIED' | 'IN_PROCESS' | 'UNDEFINED': Vendor credit status.
  - `createdTime` string, date-time: Vendor credit created time
  - `updatedTime` string, date-time: Vendor credit updated time
  - `vendorCreditLineItems` VendorCreditLineItemResponseDto[]: Vendor credit line item information
    - `id` string: BILL-generated ID of the vendor credit line item. The value begins with `vci`.
    - `description` string: Vendor credit line item description
    - `amount` number: Vendor credit line item amount. For a vendor credit in an international currency (not USD), this value is in the local currency.
    - `classifications` object: General ledger classifications information for the vendor credit 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`.
      - `employeeId` string: BILL-generated ID of the employee. The value begins with `emp`.
      - `customerId` string: BILL-generated ID of the customer. The value begins with `0cu`.

## Other responses

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

---

[API](https://skmtc.dev/bill/apis/bill-v3-api.md) - [All operations](https://skmtc.dev/bill/apis/bill-v3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bill/apis/bill-v3-api/revisions/54edddceb0a5?raw)
