Skip to main content
PUT
/
api
/
credit-notes
/
{id}
Update a credit note
curl --request PUT \
  --url https://api.example.com/api/credit-notes/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "customerId": 1,
  "exchangeRate": 3.43,
  "creditNoteDate": "2021-09-01",
  "referenceNo": "123",
  "creditNoteNumber": "123",
  "note": "123",
  "termsConditions": "123",
  "open": false,
  "warehouseId": 1,
  "branchId": 1,
  "entries": [
    {
      "itemId": 1,
      "quantity": 1,
      "rate": 10,
      "taxRateId": 1
    }
  ],
  "pdfTemplateId": 1,
  "discount": 10,
  "discountType": "percentage"
}
'

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Path Parameters

id
number
required

Credit note ID

Body

application/json
customerId
number
required

The customer ID

Example:

1

exchangeRate
number
required

The exchange rate

Example:

3.43

creditNoteDate
string<date-time>
required

The credit note date

Example:

"2021-09-01"

referenceNo
string
required

The reference number

Example:

"123"

creditNoteNumber
string
required

The credit note number

Example:

"123"

note
string
required

The note

Example:

"123"

termsConditions
string
required

The terms and conditions

Example:

"123"

open
boolean
required

The credit note is open

Example:

false

warehouseId
number
required

The warehouse ID

Example:

1

branchId
number
required

The branch ID

Example:

1

entries
string[]
required

The credit note entries

Example:
[
  {
    "itemId": 1,
    "quantity": 1,
    "rate": 10,
    "taxRateId": 1
  }
]
pdfTemplateId
number
required

The pdf template ID

Example:

1

discount
number
required

The discount amount

Example:

10

discountType
enum<string>
required

The discount type

Available options:
percentage,
amount
Example:

"percentage"

Response

Credit note successfully updated