GET All Credit Notes
Prod Env
{{subdomain}}/api2
Prod Env
{{subdomain}}/api2
GET
{{subdomain}}/api2
Last modified:2025-03-23 23:11:40
Maintainer:Not configured
limit
: Number of records per page (1-1000)page
: Page number for paginationsearch
: Optional search term to filter resultsstart_date
: Optional filter by credit note date (YYYY-MM-DD)end_date
: Optional filter by credit note date (YYYY-MM-DD)client_id
: Optional filter by client IDsort
: Optional field to sort by (id, date, total, etc.)direction
: Optional sort direction (asc or desc){
"result": "success",
"code": 200,
"data": [
{
"CreditNote": {
"id": 345,
"number": "CN-2023-001",
"client_id": 15,
"date": "2023-03-22",
"total": 50.00,
"status": 1,
"currency_code": "USD",
// Additional credit note fields...
},
"Client": {
"id": 15,
"name": "ACME Corp",
// Additional client fields...
},
"InvoiceItem": [
{
"id": 678,
"credit_note_id": 345,
"product_id": 1,
"description": "Premium Widget Return",
"quantity": 1,
"unit_price": 50.00,
"discount": 0,
"tax1": 0.00,
"total": 50.00
// Additional item fields...
}
]
}
// Additional credit notes...
],
"pagination": {
"page": 1,
"page_count": 2,
"total_results": 24,
"prev": null,
"next": "/api2/credit_notes.json?page=2"
}
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET '{{subdomain}}/api2/api2/credit_notes.json?limit=20&page=1&search=&start_date=&end_date=&client_id=&sort=id&direction=desc'
Response Response Example
{
"result": "success",
"code": 200,
"data": [
{
"CreditNote": {
"id": 345,
"number": "CN-2023-001",
"client_id": 15,
"date": "2023-03-22",
"total": 50,
"status": 1,
"currency_code": "USD",
"draft": 0,
"notes": "Partial refund for invoice #123",
"created": "2023-03-22 10:15:22",
"modified": "2023-03-22 10:15:22"
},
"Client": {
"id": 15,
"name": "ACME Corp",
"business_name": "ACME Corporation",
"email": "billing@acmecorp.com"
},
"InvoiceItem": [
{
"id": 678,
"credit_note_id": 345,
"product_id": 1,
"description": "Premium Widget Return",
"quantity": 1,
"unit_price": 50,
"discount": 0,
"tax1": 0,
"total": 50
}
]
},
{
"CreditNote": {
"id": 344,
"number": "CN-2023-002",
"client_id": 16,
"date": "2023-03-21",
"total": 75,
"status": 1,
"currency_code": "USD",
"draft": 0,
"notes": "Overpayment refund",
"created": "2023-03-21 14:30:45",
"modified": "2023-03-21 14:30:45"
},
"Client": {
"id": 16,
"name": "Global Industries",
"business_name": "Global Industries Ltd.",
"email": "ap@globalindustries.com"
},
"InvoiceItem": [
{
"id": 677,
"credit_note_id": 344,
"description": "Invoice overpayment refund",
"quantity": 1,
"unit_price": 75,
"discount": 0,
"tax1": 0,
"total": 75
}
]
}
],
"pagination": {
"page": 1,
"page_count": 2,
"total_results": 24,
"prev": null,
"next": "/api2/credit_notes.json?page=2"
}
}
Request
Query Params
limit
stringÂ
required
Example:
20
page
stringÂ
required
Example:
1
search
stringÂ
required
start_date
stringÂ
required
end_date
stringÂ
required
client_id
stringÂ
required
sort
stringÂ
required
Example:
id
direction
stringÂ
required
Example:
desc