---
title: "Replace all line items of a credit note"
method: PUT
path: "/payable_credit_notes/{credit_note_id}/line_items"
tags: ["Credit notes"]
---

# Replace all line items of a credit note

`PUT /payable_credit_notes/{credit_note_id}/line_items`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items`
- Auth: HTTP bearer

## Path parameters

- `credit_note_id` string, required

## Headers

- `x-monite-version` string, required
- `x-monite-entity-id` string, required

## Request body

- object
  - `data` CreditNoteLineItemCreateRequest[], required: List of credit note line items to replace existing ones
    - `description` string: Detailed description of the line item
    - `name` string: Name or title of the line item
    - `quantity` number, double: Quantity of items
    - `tax` integer: VAT rate in percent [minor units](https://docs.monite.com/references/currencies#minor-units). Example: 12.5% is 1250.
    - `unit` string: Unit of measurement
    - `unit_price` integer: Price per unit in smallest currency unit (e.g. cents)

## Response `200`

Successful Response

- CreditNoteLineItemPaginationResponse: A paginated list of credit note line items.
  - `data` CreditNoteLineItemResponse[], required: List of credit note line items for the current page
    - `id` string, uuid, required: Unique identifier of the line item
    - `created_at` string, date-time, required: Timestamp when the line item was created
    - `updated_at` string, date-time, required: Timestamp when the line item was last updated
    - `created_by_user_id` string, uuid: ID of the user who created the line item
    - `credit_note_id` string, uuid, required: ID of the parent credit note
    - `description` string: Detailed description of the line item
    - `name` string: Name or title of the line item
    - `quantity` number, double: Quantity of items
    - `subtotal` integer: Subtotal amount before tax
    - `tax` integer: Tax percentage
    - `tax_amount` integer: Tax amount
    - `total` integer: Total amount including tax
    - `unit` string: Unit of measurement
    - `unit_price` integer: Price per unit in smallest currency unit
  - `next_pagination_token` string: Token to retrieve the next page of results
  - `prev_pagination_token` string: Token to retrieve the previous page of results

## Other responses

- `401`: The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.
- `403`: The specified access token does not have permissions to perform this operation.
- `404`: Not found
- `422`: Validation Error
- `429`: API rate limit has been exceeded. Check the response headers for the rate limit information.

---

[API](https://skmtc.dev/monite/apis/monite-2.md) - [All operations](https://skmtc.dev/monite/apis/monite-2/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-2/revisions/4299ccf95edb?raw)
