For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • Introduction
    • Welcome to Monite
    • Monite account structure
    • Postman collections
    • Support
  • Get started
    • Step 1. Get your credentials
    • Step 2. Implement server side
      • Overview
      • Countries
        • Overview
        • Credit note lifecycle
        • Manage credit notes
        • Line items
      • Purchase orders
      • Payable history
LogoLogo
API StatusPartner Portal
On this page
  • Overview
  • Add line items to a credit note
  • List all line items of a credit note
  • Update a specific line item
  • Remove a line item
Accounts payableCredit notes

Line items in credit notes (accounts payable)

Learn how to manage the line items of credit notes.
Was this page helpful?
Previous

Purchase orders

Learn how to create and manage purchase orders in Monite.
Next
Built with
This guide covers credit notes for accounts payable. Monite also supports credit notes for accounts receivable.

Overview

Line item refers to any service or product added to a credit note, along with their descriptions, quantities, rates, and prices. Every credit note 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:

1curl -X POST 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "name": "Some product",
8 "description": "Description...",
9 "quantity": 1.22,
10 "tax": 1250,
11 "unit": "meter",
12 "unit_price": 1200,
13 }'

The successful response contains information about the created line item:

1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3 "name": "Some product",
4 "description": "Description...",
5 "quantity": 1.22,
6 "tax": 1250,
7 "unit": "meter",
8 "unit_price": 1200
9}

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:

1curl GET 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

You will get a list of all line items present in the informed credit note:

1{
2 "next_pagination_token": "string",
3 "prev_pagination_token": "string",
4 "data": [
5 {
6 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
7 "name": "Some product",
8 "description": "Description...",
9 "quantity": 1.22,
10 "tax": 1250,
11 "unit": "meter",
12 "unit_price": 1200
13 }
14 ]
15}

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}:

1curl -X PATCH 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items/{line_item_id}' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "name": "Some product",
8 "description": "Description...",
9 "quantity": 1.22,
10 "tax": 1250,
11 "unit": "meter",
12 "unit_price": 1200
13 }'

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}:

1curl -X DELETE 'https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items/{line_item_id}`' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer YOUR_PARTNER_TOKEN'