AR Snapshot
Endpoints for AR Snapshot
Endpoints for AR Snapshot
POST/api/v1/ar-snapshots/ar-snapshot-invoice-generate-for-period
Generates AR snapshot invoice for the provided year-month
Authentication: Bearer token (JWT)
application/jsonyearnumberRequiredminimum: 2000maximum: 9999monthnumberRequiredminimum: 1maximum: 12{
"year": 2025,
"month": 8
}This response has no body.
periodAlreadyExists
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired 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": [
{}
]
}unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/ar-snapshot-invoice-generate-for-period \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"year": 2025,
"month": 8
}'POST/api/v1/ar-snapshots/ar-snapshot-payment-generate-for-period
Generates AR snapshot payment for the provided year-month
Authentication: Bearer token (JWT)
application/json{
"year": 2025,
"month": 8
}This response has no body.
periodAlreadyExists
Same fields as Generate AR snapshot invoice for a specific period (400).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/ar-snapshot-payment-generate-for-period \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"year": 2025,
"month": 8
}'POST/api/v1/ar-snapshots/unlocked-period
Accepts year & month (1–12). Only the latest locked month can be unlocked. If you try to unlock in the middle, returns a 409 suggesting the month you must unlock first.
Authentication: Bearer token (JWT)
application/jsonyearnumberRequiredminimum: 2000maximum: 9999monthnumberRequiredminimum: 1maximum: 12{
"year": 2025,
"month": 8
}statusstringRequiredperiodMonthstringRequiredreportingAtstring (date-time)RequiredaffectednumberRequired{
"status": "string",
"periodMonth": "string",
"reportingAt": "2019-08-24T14:15:22Z",
"affected": 0
}unauthorized
This response has no body.
noLockedPeriodsAvailableToUnlock
Same fields as Generate AR snapshot invoice for a specific period (400).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}thisPeriodIsAlreadyUnlocked, noLockedPeriodsAvailableToUnlock, lockedPeriodsMustBeUnlockedInOrderMostRecentFirst
Same fields as Generate AR snapshot invoice for a specific period (400).
curlcurl https://api.subrite.no/api/v1/ar-snapshots/unlocked-period \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"year": 2025,
"month": 8
}'GET/api/v1/ar-snapshots/min-allowed-ar-event-date
Returns minDate as "yyyy-MM-dd". Any earlier date falls in locked months and should be disabled in the UI.
Authentication: Bearer token (JWT)
minDatestringRequired{
"minDate": "string"
}unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/min-allowed-ar-event-date \
--header 'Authorization: Bearer <token>'GET/api/v1/ar-snapshots/trend/open-invoice-outstanding-gross-amount
Authentication: Bearer token (JWT)
monthsstringOptionallocalestringOptional"nb-NO", "en-US", "sv-SE", "da-DK"bucketsobjectRequired when parent is presentlabelstringRequired when parent is presenttotalnumberRequired when parent is present[
{
"buckets": "LT_30",
"label": "January 2025",
"total": 21900
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/trend/open-invoice-outstanding-gross-amount \
--header 'Authorization: Bearer <token>'GET/api/v1/ar-snapshots/trend/open-invoices-count
Authentication: Bearer token (JWT)
monthsstringOptionallocalestringOptional"nb-NO", "en-US", "sv-SE", "da-DK"bucketsobjectRequired when parent is presentlabelstringRequired when parent is presenttotalnumberRequired when parent is present[
{
"buckets": "LT_30",
"label": "January 2025",
"total": 21900
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/trend/open-invoices-count \
--header 'Authorization: Bearer <token>'GET/api/v1/ar-snapshots/trend/open-payments-amount
Authentication: Bearer token (JWT)
monthsstringOptionallocalestringOptional"nb-NO", "en-US", "sv-SE", "da-DK"bucketsobjectRequired when parent is presentlabelstringRequired when parent is presenttotalnumberRequired when parent is present[
{
"buckets": "LT_30",
"label": "January 2025",
"total": 21900
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/trend/open-payments-amount \
--header 'Authorization: Bearer <token>'GET/api/v1/ar-snapshots/trend/open-payments-count
Authentication: Bearer token (JWT)
monthsstringOptionallocalestringOptional"nb-NO", "en-US", "sv-SE", "da-DK"bucketsobjectRequired when parent is presentlabelstringRequired when parent is presenttotalnumberRequired when parent is present[
{
"buckets": "LT_30",
"label": "January 2025",
"total": 21900
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/trend/open-payments-count \
--header 'Authorization: Bearer <token>'POST/api/v1/ar-snapshots/lock-and-generate-ar-reports
Authentication: Bearer token (JWT)
application/json{
"year": 2025,
"month": 8
}This response has no body.
unauthorized
This response has no body.
notFoundTheGivenPeriod
Same fields as Generate AR snapshot invoice for a specific period (400).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}noOpenOrUnlockedPeriodFoundToLocked, arSnapshotPreviousPeriodNotLocked
Same fields as Generate AR snapshot invoice for a specific period (400).
curlcurl https://api.subrite.no/api/v1/ar-snapshots/lock-and-generate-ar-reports \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"year": 2025,
"month": 8
}'GET/api/v1/ar-snapshots/ar-report-history
Authentication: Bearer token (JWT)
monthsstringOptionallocalestringOptional"nb-NO", "en-US", "sv-SE", "da-DK"monthLabelstringRequired when parent is presentperiodMonthstringRequired when parent is presentopenInvoiceCountnumberRequired when parent is presentopenInvoiceGrossAmountnumberRequired when parent is presentopenPaymentCountnumberRequired when parent is presentopenPaymentAmountnumberRequired when parent is presentopenInvoiceIdnumberRequired when parent is presentopenInvoiceSummaryIdnumberRequired when parent is presentopenPaymentIdnumberRequired when parent is presentopenPaymentSummaryIdnumberRequired when parent is presentisPeriodLockedbooleanRequired when parent is presentisImmediateNextPeriodLockedbooleanRequired when parent is presentopenInvoiceStatusstringRequired when parent is present"started", "completed", "failed", "queued"openInvoiceSummaryStatusstringRequired when parent is present"started", "completed", "failed", "queued"openPaymentStatusstringRequired when parent is present"started", "completed", "failed", "queued"openPaymentSummaryStatusstringRequired when parent is present"started", "completed", "failed", "queued"[
{
"monthLabel": "string",
"periodMonth": "string",
"openInvoiceCount": 0,
"openInvoiceGrossAmount": 0,
"openPaymentCount": 0,
"openPaymentAmount": 0,
"openInvoiceId": 0,
"openInvoiceSummaryId": 0,
"openPaymentId": 0,
"openPaymentSummaryId": 0,
"isPeriodLocked": true,
"isImmediateNextPeriodLocked": true,
"openInvoiceStatus": "started",
"openInvoiceSummaryStatus": "started",
"openPaymentStatus": "started",
"openPaymentSummaryStatus": "started"
}
]unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/ar-snapshots/ar-report-history \
--header 'Authorization: Bearer <token>'GET/api/v1/ar-snapshots/{id}
Authentication: Bearer token (JWT)
idnumberRequiredformatstringRequired"csv", "xlsx", "xls", "DAT", "pdf", "xml"This response has no body.
unauthorized
This response has no body.
notFound,invalidFileUrl
Same fields as Generate AR snapshot invoice for a specific period (400).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/ar-snapshots/{id}?format=csv' \
--header 'Authorization: Bearer <token>'