Add New Credit Note
Prod Env
{{subdomain}}/api2
Prod Env
{{subdomain}}/api2
POST
{{subdomain}}/api2
Last modified:2025-04-20 12:10:30
Maintainer:Not configured
client_id
* (integer): ID of the client receiving the credit notestore_id
* (integer): ID of the store/locationinvoice_id
(integer): ID of the related invoice (if applicable)currency_code
* (string): 3-letter currency code (e.g., USD, EUR)date
* (string): Credit note date (YYYY-MM-DD)draft
(integer): Draft status (0: active, 1: draft)notes
(string): Credit note notes/reasonproduct_id
(integer): ID of the product (optional if description is provided)quantity
* (number): Quantity of itemsunit_price
* (number): Price per unitdescription
* (string): Item description (required if product_id not provided)discount
(number): Item-level discountdiscount_type
(integer): Discount type (1: percentage, 2: fixed amount){
"result": "success",
"code": 201,
"data": {
"CreditNote": {
"id": 346,
"number": "CN-2023-003",
// Other credit note fields...
}
},
"message": "Credit note created successfully"
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{subdomain}}/api2/api2/credit_notes.json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"CreditNote": {
"client_id": 15,
"store_id": 1,
"invoice_id": 123,
"currency_code": "USD",
"date": "2023-03-23",
"draft": 0,
"notes": "Partial refund for damaged product",
"InvoiceItem": [
{
"product_id": 1,
"quantity": 1,
"unit_price": 100,
"description": "Premium Widget Return",
"discount": 0,
"discount_type": 1
}
]
}
}'
Response Response Example
201 - Success Response
{
"result": "success",
"code": 201,
"data": {
"CreditNote": {
"id": 346,
"number": "CN-2023-003",
"client_id": 15,
"store_id": 1,
"date": "2023-03-23",
"currency_code": "USD",
"total": 120,
"status": 1,
"draft": 0,
"created": "2023-03-23 15:30:42",
"modified": "2023-03-23 15:30:42"
}
},
"message": "Credit note created successfully"
}
Request
Body Params text/plain