Accounting Reports
Endpoints for Accounting Reports
Stay in the loop 🚀
Endpoints for Accounting Reports
GET/api/v1/accounting-reports
Returns a list of months with their report availability, latest version, and status.
Authentication: Bearer token (JWT)
periodMonthstringRequired when parent is presentmonthLabelstringRequired when parent is presentlatestVersionnumberRequired when parent is presentlatestStatusstringRequired when parent is present"queued", "processing", "completed", "failed"totalVersionsnumberRequired when parent is present[
{
"periodMonth": "2025-10-01",
"monthLabel": "Oktober 2025",
"latestVersion": 2,
"latestStatus": "queued",
"totalVersions": 2,
"latestId": 123,
"isGenerating": false,
"isPeriodClosed": true,
"totalInvoicedGross": 125000.5,
"totalPaymentGross": 98500
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/accounting-reports \
--header 'Authorization: Bearer <token>'POST/api/v1/accounting-reports/generate
Generates a new version of all 4 report files (Invoice Summary PDF, Invoice Details Excel, Payment Summary PDF, Payment Details Excel) for the specified month.
Authentication: Bearer token (JWT)
application/jsonyearnumberRequiredminimum: 2020maximum: 2100monthnumberRequiredGET/api/v1/accounting-reports/{periodMonth}/versions
Returns all generated report set versions for a given month.
Authentication: Bearer token (JWT)
periodMonthstringRequiredGET/api/v1/accounting-reports/{id}
Returns details of a specific report set including file availability.
Authentication: Bearer token (JWT)
idnumberRequiredGET/api/v1/accounting-reports/{id}/download
Downloads one of the 4 files from the report set: invoice_summary_pdf, invoice_details_excel, payment_summary_pdf, payment_details_excel.
Authentication: Bearer token (JWT)
idnumberRequiredfileTypestringRequired"invoice_summary_pdf", "invoice_details_excel", "payment_summary_pdf", "payment_details_excel"latestIdnumberRequired when parent is presentisGeneratingbooleanRequired when parent is presentisPeriodClosedbooleanRequired when parent is presenttotalInvoicedGrossnumberRequired when parent is presenttotalPaymentGrossnumberRequired when parent is presentminimum: 1maximum: 12{
"year": 2025,
"month": 10
}idnumberRequiredperiodMonthstringRequiredversionnumberRequiredstatusstringRequired"queued", "processing", "completed", "failed"{
"id": 123,
"periodMonth": "2025-10-01",
"version": 1,
"status": "queued"
}unauthorized
This response has no body.
reportGenerationAlreadyInProgress
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorscurlcurl https://api.subrite.no/api/v1/accounting-reports/generate \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"year": 2025,
"month": 10
}'idnumberRequired when parent is presentperiodMonthstringRequired when parent is presentversionnumberRequired when parent is presentstatusstringRequired when parent is present"queued", "processing", "completed", "failed"totalInvoicedGrossnumberRequired when parent is presenttotalPaymentGrossnumberRequired when parent is presentinvoiceCountnumberRequired when parent is presentpaymentCountnumberRequired when parent is presenthasInvoiceSummaryPdfbooleanhasInvoiceDetailsExcelbooleanhasPaymentSummaryPdfbooleanhasPaymentDetailsExcelbooleancreatedAtstring (date-time)Required when parent is present[
{
"id": 0,
"periodMonth": "string",
"version": 0,
"status": "queued",
"totalInvoicedGross": 0,
"totalPaymentGross": 0,
"invoiceCount": 0,
"paymentCount": 0,
"hasInvoiceSummaryPdf": true,
"hasInvoiceDetailsExcel": true,
"hasPaymentSummaryPdf": true,
"hasPaymentDetailsExcel": true,
"createdAt": "2019-08-24T14:15:22Z"
}
]unauthorized
This response has no body.
curlcurl 'https://api.subrite.no/api/v1/accounting-reports/{periodMonth}/versions' \
--header 'Authorization: Bearer <token>'idnumberRequiredperiodMonthstringRequiredversionnumberRequiredstatusstringRequired"queued", "processing", "completed", "failed"totalInvoicedGrossnumberRequiredtotalPaymentGrossnumberRequiredinvoiceCountnumberRequiredpaymentCountnumberRequiredhasInvoiceSummaryPdfbooleanhasInvoiceDetailsExcelbooleanhasPaymentSummaryPdfbooleanhasPaymentDetailsExcelbooleancreatedAtstring (date-time)Required{
"id": 0,
"periodMonth": "string",
"version": 0,
"status": "queued",
"totalInvoicedGross": 0,
"totalPaymentGross": 0,
"invoiceCount": 0,
"paymentCount": 0,
"hasInvoiceSummaryPdf": true,
"hasInvoiceDetailsExcel": true,
"hasPaymentSummaryPdf": true,
"hasPaymentDetailsExcel": true,
"createdAt": "2019-08-24T14:15:22Z"
}unauthorized
This response has no body.
reportNotFound
Same fields as Generate a new accounting report set (409).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/accounting-reports/{id}' \
--header 'Authorization: Bearer <token>'This response has no body.
unauthorized
This response has no body.
reportNotFound,reportIsNotYetCompleted,fileNotFound
Same fields as Generate a new accounting report set (409).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/accounting-reports/{id}/download?fileType=invoice_summary_pdf' \
--header 'Authorization: Bearer <token>'fieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}