> ## Documentation Index
> Fetch the complete documentation index at: https://exsited.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase credit notes

> Create, read, update, apply and delete purchase credit notes, the credit a supplier owes you, and add or remove their notes.

A purchase credit note is credit a supplier owes you, raised when a payment exceeds its invoices or created against a purchase invoice. These endpoints create, read, update, apply and delete purchase credit notes and add or remove their notes. This area has 8 endpoints, each available in all seven SDKs.

> [!WARNING]
>
> **Creating a purchase credit note cannot be reversed.** The credit note cannot be deleted without the permission to delete purchase credit notes, and the payment it draws on can no longer be deleted. Applying a purchase credit note records a purchase payment, and deleting a purchase credit note cannot be undone.

## At a glance

| Endpoint | Method | Path | What it does |
| - | - | - | - |
| [List purchase credit notes](https://exsited.mintlify.site/api-reference/purchase-credit-notes/list-purchase-credit-notes.md) | GET | `/purchase_credit_notes` | Returns one page of purchase credit notes. |
| [Retrieve a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/retrieve-a-purchase-credit-note.md) | GET | `/purchase_credit_notes/{purchase_credit_note_id}` | Returns one purchase credit note under `purchase_credit_note`. |
| [Update a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/update-a-purchase-credit-note.md) | PATCH | `/purchase_credit_notes/{purchase_credit_note_id}` | Changes fields of a purchase credit note, such as its custom attributes, and returns it under `purchase_credit_note`. |
| [Create a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/create-a-purchase-credit-note.md) | POST | `/purchase_credit_notes` | Credits a purchase invoice and returns the new credit note under `purchase_credit_note`. |
| [Delete a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/delete-a-purchase-credit-note.md) | DELETE | `/purchase_credit_notes/{purchase_credit_note_id}` | Deletes a purchase credit note. Nothing comes back. |
| [Apply a purchase credit note to purchase invoices](https://exsited.mintlify.site/api-reference/purchase-credit-notes/apply-a-purchase-credit-note-to-purchase-invoices.md) | POST | `/purchase_credit_notes/{purchase_credit_note_id}/apply` | Spends a purchase credit note on one or more purchase invoices and returns the credit note under `purchase_credit_note`. |
| [Add a note to a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/add-a-note-to-a-purchase-credit-note.md) | POST | `/purchase_credit_notes/{purchase_credit_note_id}/notes` | Attaches a note, with an optional file, to a purchase credit note. |
| [Delete a note from a purchase credit note](https://exsited.mintlify.site/api-reference/purchase-credit-notes/delete-a-note-from-a-purchase-credit-note.md) | DELETE | `/purchase_credit_notes/{purchase_credit_note_id}/notes/{note_id}` | Deletes one note from a purchase credit note. Nothing comes back. |

## Before you call

Register your API credentials once when your app starts, as shown in
[Authentication](https://exsited.mintlify.site/authentication.md). Every SDK sample on these pages then gets its client in one line.
With cURL, send the access token in an `Authorization` header: `Authorization: Bearer $ACCESS_TOKEN`.

## Things to know

* **Every write body is wrapped in `purchase_credit_note`.** The note create is a multipart form instead.
* **The create takes `purchase_invoice_id` and `amount`.** The credit is drawn from that invoice's payments.
* **The apply, note and delete calls take the `pcn_` id only.** A code returns `400` there, while the reads accept either.
* **The create and apply responses are shorter than a read.** Their `status` is an object with `key` and `value`, where a read sends a string.
* **The delete and the note create need extra permissions.** A client without them gets `403`.
* **Listings page by cursor.** Records are under `data`; pass `pagination.next_cursor` as `cursor` while `pagination.has_more` is `true`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.