CreditNotes
Create Credit Notes
Create New Credit Notes
post/credit-notes
Request body
Example request
{
"organization_id": "0005",
"user_id": "0000000001",
"account_id": 403,
"prefix": "DRFT",
"reference_number": "0000007",
"credit_note_reason_id": 1,
"bill_to": "Lexzur,KSA",
"related_invoices": 300,
"credit_note_date": "2024-11-13",
"credit_note_type_id": 1,
"transaction_type_id": 1,
"term_id": 1,
"paid_status": "draft",
"display_tax": 1,
"display_discount": "both_item_before_level",
"discount_percentage": 10,
"discount_value_type": "percentage",
"display_adjust": "invoice_level_before_tax",
"adjust_percentage": 12.620106123619676,
"adjust_amount": 88,
"adjust_value_type": "amount",
"adjust_label": "Adjustment",
"lines_total_discount": 76.7,
"lines_total_subtotal": 774,
"lines_total_tax": 39.71,
"lines_totals": 697.3,
"credit_note_details": [
{
"account_id": 384,
"item_id": 22,
"tax_id": 8,
"item_title": "Incorporation",
"unit_price": 352,
"quantity": 1,
"discount_type": "percentage",
"discount_percentage": 11,
"tax_percentage": 5,
"item_description": "item 1",
"item_date": "2024-11-13",
"partner_shares": null
},
{
"account_id": 384,
"item_id": 22,
"tax_id": 7,
"item_title": "Consultancy",
"unit_price": 422,
"quantity": 1,
"discount_type": "percentage",
"discount_percentage": 9,
"tax_percentage": 6,
"item_description": "item 2",
"item_date": "2024-11-13",
"partner_shares": null
}
],
"is_skip_account_fields_checking": 1
}Response
Successful operation
Example response
{
"message": "credit_note has been created.",
"credit_note": {
"id": 401,
"account": {
"id": 403,
"organization_id": "0005",
"name": "Lexzur,KSA",
"account_label": "Lexzur,KSA (SAR)",
"account_data": "Lexzur,KSA",
"system_account": "no",
"account_type_id": 15,
"account_type": "Third Party",
"number": "1",
"currency_id": 194,
"currency": "SAR",
"model_id": 24,
"member_id": 4,
"model_name": "Person",
"model_type": "client",
"organization": {
"id": "0005",
"name": "zatca",
"country": "SA",
"city": "Riyadh",
"state": "Riyadh",
"zip": "1000"
},
"client": {
"id": "00000024",
"discount_percentage": "0.000",
"member_label": "PER00000004"
}
},
"credit_note_number": "DRFT0000015",
"prefix_type": 1,
"prefix": "DRFT",
"reference_number": "0000015",
"bill_to": "Lexzur,KSA",
"credit_note_date": "2024-11-13 00:00:00",
"paid_status": "draft",
"display_tax": 1,
"display_discount": "both_item_before_level",
"display_item_quantity": 1,
"credit_note_reason_id": 1,
"term_id": 1,
"terms": "In Advance",
"lines_total_discount": "76.700000000000",
"lines_total_subtotal": "774.000000000000",
"lines_total_tax": "38.70000000000",
"lines_totals": "697.300000000000",
"total": "736.6000000000000",
"invoices_closed": 755.28,
"exchange_rate": "1.0000000000000000",
"discount_percentage": "10.000000000000",
"discount_amount": "69.730000000000",
"adjust_percentage": "10.00000000000",
"adjust_amount": "69.73",
"adjust_label": "Adjustment",
"created_on": "2024-11-13 16:28:47",
"created_by_name": "System Administrator",
"modified_on": "2024-11-13 16:28:47",
"modified_by_name": "System Administrator",
"sub_total": "774.000000000000",
"total_discount": "146.430000000000",
"total_tax": "38.700000000000",
"taxable": "38.710000000000000000000000000000",
"non_taxable": "697.3000000000000000000000000000",
"sub_total_after_discount": "627.570000000000",
"sub_total_after_adjustment": "627.570000000000",
"services_subtotal": "774.000000000000",
"services_tax": "38.700000000000",
"expenses_subtotal": "0.000000000000",
"expenses_tax": "0.000000000000",
"related_invoices": [
{
"id": 173,
"credit_note_header_id": 401,
"invoice_header_id": 300,
"voucher_header_id": 802,
"total": "755.280000000000",
"invoice_date": "2024-11-13 00:00:00",
"invoice_total": "819.350",
"paid_status": "open",
"invoice_number": "INV0000011",
"balance_due": "819.350000000000"
}
],
"credit_note_details": [
{
"id": 521,
"account_id": 384,
"item_id": 22,
"tax_id": 8,
"item_title": "Incorporation",
"unit_price": "352.000000000000",
"quantity": "1.000000000000",
"discount_percentage": "11.000000000000",
"discount_amount": "38.720000000000",
"tax_percentage": "5.000000000000",
"item_description": "item 1",
"line_sub_total": "352.000000000000",
"tax_amount": "16.070000000000",
"total": "313.280000000000"
}
],
"e_invoicing_key": "saudi",
"credit_note_type_id": 1,
"transaction_type_id": 1
}
}