Sales Report
Returns your organization's invoices (sales) for a date range, either as totals per day, week, month, quarter or year, or as a detailed invoice list. Use it for revenue dashboards or to copy invoice data into an accounting system.
GET
/reports/salesSales Report
curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/reports/sales?startDate=09-08-2023&endDate=07-09-2023&timeStep=1&reportDetailsType=2&page=1&per_page=25' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>'{
"code": 200,
"message": "Sales Report Details",
"result": {
"reportDetails": [
{
"invoice_day": "09-08-2023",
"invoices": 9,
"final_amount": 0
},
{
"invoice_day": "10-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "11-08-2023",
"invoices": 3,
"final_amount": 17.66
},
{
"invoice_day": "12-08-2023",
"invoices": 5,
"final_amount": 472
},
{
"invoice_day": "13-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "14-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "15-08-2023",
"invoices": 3,
"final_amount": 1166.12
},
{
"invoice_day": "16-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "17-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "18-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "19-08-2023",
"invoices": 1,
"final_amount": 0
},
{
"invoice_day": "20-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "21-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "22-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "23-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "24-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "25-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "26-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "27-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "28-08-2023",
"invoices": 6,
"final_amount": 200
},
{
"invoice_day": "29-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "30-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "31-08-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "01-09-2023",
"invoices": 0,
"final_amount": 0
},
{
"invoice_day": "02-09-2023",
"invoices": 0,
"final_amount": 0
}
],
"organizationcurrency": {
"currency_id": 49,
"currency_symbol": "₹",
"position": 1,
"num_of_decimals": 2
}
},
"page_context": {
"page": 1,
"per_page": 25,
"has_more_page": true,
"total_rows": 30
}
}Access: Institute admins, plus custom roles with dashboard or sales report access.
Parameters
Note the camelCase names on this endpoint.
Query parameters
1 totals per period (chart), 2 totals per period with tax (table, default if empty), 3 invoice list.startDatestring
First day, as
DD-MM-YYYY.endDatestring
Last day (whole day included), as
DD-MM-YYYY. Send both dates: the defaults don't form a valid range.timeStepinteger
Period for types 1 and 2:
1 day (default), 2 week, 3 month, 4 quarter, 5 year.courseinteger
Only invoices for this course.
searchstring
Type 3 only: matches part of the student's name, email, phone number or the invoice ID.
pageinteger
Page number. Default 1.
per_pageinteger
Rows per page, up to 200. Default 200.
full_pageinteger
1 returns all rows without paging.filtersJSON string
Optional filters (fields below).
isExportinteger
With type 3,
1 downloads the list as a CSV file instead of JSON.selected_viewinteger
With
isExport, 1 exports only the columns of your saved view.Fields in the filters object:
| Name | Required | Type | Description |
|---|---|---|---|
| course_ids | No | array or comma-separated string | Only these courses. |
| membership_ids | No | array or comma-separated string | Only these memberships. |
| event_ids | No | array or comma-separated string | Only these events. |
| mentoring_service_ids | No | array or comma-separated string | Only these mentoring services. |
| invoice_type | No | integer | Only this invoice type. |
| payment_status | No | integer | Only invoices with this payment status. |
| invoice_state | No | integer | Only invoices in this state. |
| amount_type | No | integer | Free or paid invoices only. |
| currency_id | No | integer | Only invoices in this currency. |
| due_date | No | object | {"start_date": ..., "end_date": ...} due-date range. |
| place_of_supply | No | string | Only this place of supply (tax). |
| institution_stream_id | No | array or comma-separated string | Only students who chose these streams. |
| product_type | No | array or comma-separated string | Only these product types. |
Response
codeinteger
Example:
200messagestring
Example:
Sales Report Detailsresultobject
Show child attributesHide child attributes
result.reportDetailsobject[]
Show child attributesHide child attributes
Example:
0Show child attributesHide child attributes
Example:
49Example:
₹Example:
1Example:
2page_contextobject
Show child attributesHide child attributes
page_context.pageinteger
Example:
1page_context.per_pageinteger
Example:
25page_context.has_more_pageboolean
Example:
truepage_context.total_rowsinteger
Example:
30Notes: Dates must be DD-MM-YYYY, otherwise "Invalid Date Input You have Passed". More than 200 per page fails with "You Only Get 200 Records Per Page". Rate limit: 30 requests per minute; going over locks you out for 30 minutes.