Skip to main content
PUT
/
payable_credit_notes
/
{credit_note_id}
/
line_items
Replace all line items of a credit note
curl --request PUT \
  --url https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/line_items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-monite-entity-id: <x-monite-entity-id>' \
  --header 'x-monite-version: <x-monite-version>' \
  --data '
{
  "data": [
    {
      "description": "Premium version of Product XYZ with extended warranty",
      "name": "Product XYZ",
      "quantity": 2,
      "tax": 1250,
      "unit": "pieces",
      "unit_price": 5000
    }
  ]
}
'
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2024-01-15T14:30:00Z",
      "updated_at": "2024-01-15T14:30:00Z",
      "credit_note_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_by_user_id": "123e4567-e89b-12d3-a456-426614174000",
      "description": "Premium version of Product XYZ with extended warranty",
      "name": "Product XYZ",
      "quantity": 2,
      "subtotal": 10000,
      "tax": 20,
      "tax_amount": 2000,
      "total": 12000,
      "unit": "pieces",
      "unit_price": 5000
    }
  ],
  "next_pagination_token": "eyJwYWdlIjoyfQ==",
  "prev_pagination_token": "eyJwYWdlIjoxfQ=="
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-monite-version
string<date>
required
x-monite-entity-id
string<uuid>
required

The ID of the entity that owns the requested resource.

Example:

"9d2b4c8f-2087-4738-ba91-7359683c49a4"

Path Parameters

credit_note_id
string<uuid>
required

Body

application/json

Schema for replacing all line items of a credit note.

data
object[]
required

List of credit note line items to replace existing ones

Response

Successful Response

A paginated list of credit note line items.

data
object[]
required

List of credit note line items for the current page

next_pagination_token
string

Token to retrieve the next page of results

Example:

"eyJwYWdlIjoyfQ=="

prev_pagination_token
string

Token to retrieve the previous page of results

Example:

"eyJwYWdlIjoxfQ=="