Get Invoice Card Metrics
GET /api/v1/Invoice/GetInvoiceCardMetrics
Description
This endpoint is used to get a summary of invoice-related metrics for a specific period. The period can be 'LastWeek', 'LastMonth', 'LastQuarter', 'LastYear', or 'Custom'. It returns a GetDashBoardInvoiceCardsResponseResponse object containing the metrics for invoices.
Headers:
- None
ApiKey:
- No API key required
Content-Type:
-
text/plain
-
application/json
-
text/json
Path Parameters:
- version: string, required
Query Parameters:
- Period: Enum, required (values: 'LastWeek', 'LastMonth', 'LastQuarter', 'LastYear', 'Custom')
Request Body:
- None
URL:
- GET:
{{baseUrl API url}}/api/v1/Invoice/GetInvoiceCardMetrics
Response:
- A GetDashBoardInvoiceCardsResponseResponse object containing the metrics for invoices.
Error Codes:
-
400: Bad Request
-
404: Resource not found
-
500: Internal server error
Example Request URL:
GET /api/v1/Invoice/GetInvoiceCardMetrics?Period=LastMonth
Example:
Request:
GET /api/v1/Invoice/GetInvoiceCardMetrics?Period=LastMonth
Response:
HTTP/1.1 200 OK
{
"totalInvoices": 10,
"totalOverdueInvoices": 3,
"totalDueInvoices": 5,
"totalPaidInvoices": 2,
"totalInvoiceAmount": 1000,
"totalOverdueAmount": 300
}
Method: GET
/api/v1/Invoice/GetInvoiceCardMetrics?Period=1
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Query Params
| Param | value |
|---|---|
| Period | 1 |
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"totalAmountOfPendingInvoices": "<double>",
"totalAmountOfPaidInvoices": "<double>",
"totalAmountOfDueInvoices": "<double>"
}
}
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/Invoice/GetInvoiceCardMetrics \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!