> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.monite.com/v2024-01-31/accounts-payable/credit-notes/line-items/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server. # Line items in credit notes (accounts payable) > **Info** > > This guide covers credit notes for accounts payable. Monite also supports [credit notes for accounts receivable](/v2024-01-31/accounts-receivable/credit-notes). ## Overview [Line item](../../references/glossary#line-item) refers to any service or product added to a credit note, along with their descriptions, quantities, rates, and prices. Every [credit note](../../references/glossary#payable) contains descriptions of all items purchased. By default, the `subtotal` and `total` fields of line items are automatically calculated based on the `unit_price`, `quantity`, and `tax` fields, therefore, are read-only and appear only in the response schema. Credit notes cannot *add* new line items or *increase* the unit quantity and price in line items. Instead, the entity should issue a new payable for the additional amount. ## Add line items to a credit note To add line items to a credit note, call the `POST /payable_credit_notes/{credit_note_id}/line_items` endpoint: ```sh curl -X POST 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items' \ -H 'X-Monite-Version: 2024-01-31' \ -H 'X-Monite-Entity-Id: ENTITY_ID' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "Some product", "description": "Description...", "quantity": 1.22, "tax": 1250, "unit": "meter", "unit_price": 1200, }' ``` The successful response contains information about the created line item: ```json { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "Some product", "description": "Description...", "quantity": 1.22, "tax": 1250, "unit": "meter", "unit_price": 1200 } ``` ## List all line items of a credit note To list all line items of a specific credit note, send a `GET` request to the `/payable_credit_notes/{credit_note_id}/line_items` endpoint: ```sh curl GET 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items' \ -H 'X-Monite-Version: 2024-01-31' \ -H 'X-Monite-Entity-Id: ENTITY_ID' \ -H 'Authorization: Bearer ACCESS_TOKEN' ``` You will get a list of all line items present in the informed credit note: ```json { "next_pagination_token": "string", "prev_pagination_token": "string", "data": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "Some product", "description": "Description...", "quantity": 1.22, "tax": 1250, "unit": "meter", "unit_price": 1200 } ] } ``` ## Update a specific line item To update some information about a specific line item in a credit note, call `PATCH /payable_credit_notes/{credit_note_id}/line_items/{line_item_id}`: ```sh curl -X PATCH 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items/{line_item_id}' \ -H 'X-Monite-Version: 2024-01-31' \ -H 'X-Monite-Entity-Id: ENTITY_ID' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "Some product", "description": "Description...", "quantity": 1.22, "tax": 1250, "unit": "meter", "unit_price": 1200 }' ``` ## Remove a line item To remove the line item from the payable, call `DELETE /payable_credit_notes/{credit_note_id}/line_items/{line_item_id}`: ```sh curl -X DELETE 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items/{line_item_id}`' \ -H 'X-Monite-Version: 2024-01-31' \ -H 'X-Monite-Entity-Id: ENTITY_ID' \ -H 'Authorization: Bearer YOUR_PARTNER_TOKEN' ``` > Learn how to manage the line items of credit notes.