Appearance
staff.statements
6 methods on staff.statements. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/statementsList client statements
Statements written, without their pages, for accounts whose group (at the time of the statement) is in the caller's group scope; newest period first, then kind and login. Filters: kind (daily or monthly), period (a date; monthly statements carry the first day of their month), login. Page is 1-based; limit defaults to 100, at most 500.
More details
Rights: the staff member needs at least one of: reports, config.reports.
Parameters
kindstring · queryEmpty = both.
daily monthlyperiodstring · queryThe day, or the first day of the month.
logininteger · queryOne account; empty = any.
pageinteger · query1-based page; default 1.
limitinteger · queryRows per page; default 100.
Returns
Promise<Statement_>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.list({
kind: "daily",
period: "string",
login: 1001
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/statements?kind=daily&period=string&login=1001" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"body": "string",
"created_at": "2026-09-25T10:15:00Z",
"group": "real\\standard",
"kind": "string",
"login": 1001,
"mailed_at": "2026-09-25T10:15:00Z",
"mode": "string",
"period": "string",
"subject": "string"
}
],
"page": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.statements.list(query?: { kind?, period?, login?, page?, limit? }, options?: RequestOptions): Promise<http.pageOf_models.Statement_>listRuns
GET
/admin/v1/statements/runsList statement runs
Every statement generation, newest first, whether queued by staff or by the day end (requested_by 0), with its state and counts: written, skipped (a quiet day, nothing to state), failed (an account a statement could not be written for) and mailed. started_at is when the run turned running, not when it was queued (created_at); it is null while still queued. Page is 1-based; limit defaults to 50, at most 200.
More details
Rights: the staff member needs every one of: config.reports.
Parameters
pageinteger · query1-based page; default 1.
limitinteger · queryRows per page; default 50.
Returns
Promise<StatementRun_>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.listRuns({
page: 1,
limit: 1
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/statements/runs?page=1&limit=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"accounts": 1,
"created_at": "2026-09-25T10:15:00Z",
"error": "string",
"failed": 1,
"finished_at": "2026-09-25T10:15:00Z",
"id": 1,
"kind": "string",
"login": 1001,
"mailed": 1,
"mode": "string",
"period": "string",
"requested_by": 1
}
],
"page": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.statements.listRuns(query?: { page?, limit? }, options?: RequestOptions): Promise<http.pageOf_models.StatementRun_>createRuns
POST
/admin/v1/statements/runsQueue a statement run
Asks the reporting service to write the statements of a day or a month again. kind (daily or monthly) and period (a date; for monthly any day of the month, stored as its first day) are required. login narrows it to one account, which must be in the caller's group scope (else not_found); 0 = every account. resend mails again the statements already mailed. Answers the queued run. Writes a journal line.
More details
Rights: the staff member needs every one of: config.reports.
Request body
kindstringdaily or monthly
loginintegerone account; 0 or left out = every account Login is the numeric identity of every account, trader or staff.
periodstringthe day, 2006-01-02; for monthly any day of the month
resendbooleanmail again the statements already mailed
Returns
Promise<StatementRun>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.createRuns({
kind: "monthly",
login: 1001,
period: "2026-08-01",
resend: true
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/statements/runs" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"kind": "monthly",
"login": 1001,
"period": "2026-08-01",
"resend": true
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"accounts": 1,
"created_at": "2026-09-25T10:15:00Z",
"error": "string",
"failed": 1,
"finished_at": "2026-09-25T10:15:00Z",
"id": 1,
"kind": "string",
"login": 1001,
"mailed": 1,
"mode": "string",
"period": "string",
"requested_by": 1
},
"request_id": "5b7f2c1e"
}ts
staff.statements.createRuns(body: http.docReportsStatementRun, options?: RequestOptions): Promise<models.StatementRun>settings
GET
/admin/v1/statements/settingsRead statement settings
When monthly statements are made (last_day of the month or first_day of the next), the server-clock time of day daily runs queue from (daily_at, HH:MM), and which mail server sends them (0 = the default server).
More details
Rights: the staff member needs every one of: config.reports.
Returns
Promise<StatementSettings>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.settings()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/statements/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"daily_at": "string",
"mail_server_id": 1,
"monthly_at": "string",
"updated_at": "2026-09-25T10:15:00Z"
},
"request_id": "5b7f2c1e"
}ts
staff.statements.settings(options?: RequestOptions): Promise<models.StatementSettings>updateSettings
PUT
/admin/v1/statements/settingsChange statement settings
monthly_at is required: last_day or first_day. daily_at is required: a time of day, e.g. 06:00; a written day's daily run is queued once the server clock reaches it, catching up on any day written earlier the same or a recent day. mail_server_id 0 uses the default server; an unknown server answers invalid_input. updated_at is ignored. Writes a journal line.
More details
Rights: the staff member needs every one of: config.reports.
Request body
daily_atstringserver clock, HH:MM; daily runs queue from this time on
mail_server_idinteger0 = the default server
monthly_atstringlast_day or first_day of the next month
updated_atstringUTC time, RFC 3339.
Returns
Promise<StatementSettings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.updateSettings({
daily_at: "06:00",
mail_server_id: 2,
monthly_at: "last_day"
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/statements/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"daily_at": "06:00",
"mail_server_id": 2,
"monthly_at": "last_day"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"daily_at": "string",
"mail_server_id": 1,
"monthly_at": "string",
"updated_at": "2026-09-25T10:15:00Z"
},
"request_id": "5b7f2c1e"
}ts
staff.statements.updateSettings(body: models.StatementSettings, options?: RequestOptions): Promise<models.StatementSettings>retrieve
GET
/admin/v1/statements/{login}/{kind}/{period}View a client statement
One statement as the HTML page it was mailed as. The account's group on the statement must be in the caller's group scope, else not_found.
More details
Rights: the staff member needs at least one of: reports, config.reports.
Parameters
logininteger · pathrequiredAccount login.
kindstring · pathrequireddaily monthlyperiodstring · pathrequiredThe day, or the first day of the month (2006-01-02).
Returns
Promise<Response>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.statements.retrieve(1001, "daily", "string")bash
curl -X GET "$NOVIQA_API_URL/admin/v1/statements/1001/daily/string" \
-H "Authorization: Bearer $NOVIQA_TOKEN"ts
// text/html file: the SDK returns the raw Responsets
staff.statements.retrieve(login: number, kind: string, period: string, options?: RequestOptions): Promise<Response>