API Reference

Violations

2 endpoints· Auth: JWT or API Key
get/api/v1/console/hr/violations JWT API Key

The register, newest first.,

`from` and `to` window the incident's own instant by Baghdad business day — the same column and the same windowing payroll uses — so an operator reconciling a payslip against the register sees the same set of incidents the payslip charged for.

Capability
view_hr
API key scope
cap:view_hr (the key's owner must also hold the capability)
Plan feature
hr_payroll must be on the branch's plan, or the call answers 403.

Query parameters

EmployeeId
string (uuid)
—
TypeId
string (uuid)
—
Action
string
One rung of the escalation ladder — `verbal_warning`, `written_warning`, `final_warning`, `financial_penalty`. Null lists every rung.
From
string (date)
Business-day window, inclusive at both ends, over the incident's own instant. <br>Windowed the way payroll windows penalties (FR-HRM-053) — by Baghdad business day, not by a raw UTC calendar range — so the register and the payslip agree about which month an incident fell in. L6 is the failure this avoids.
To
string (date)
—
Page
integer (int32)
—
PerPage
integer (int32)
—
Search
string
Free-text filter. Its meaning is per-resource and documented on the endpoint.
Skip
integer (int32)
Rows to skip, derived — never sent by the caller on this surface.
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/violations" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/hr/violations JWT API Key

Record an incident.,

Two vocabularies meet here: `typeId` is a row in the branch's `violation_type` table — the employer's own disciplinary schedule — while `action` is the closed ladder the code branches on. Only `financial_penalty` carries an amount, and only `financial_penalty` reaches a payslip.

Capability
manage_employees
API key scope
cap:manage_employees (the key's owner must also hold the capability)
Plan feature
hr_payroll must be on the branch's plan, or the call answers 403.

Request body

application/json
{
  "employeeId": "00000000-0000-0000-0000-000000000000",
  "typeId": "00000000-0000-0000-0000-000000000000",
  "action": "string",
  "penaltyAmount": 0,
  "description": "string"
}
employeeId
string (uuid)
—
typeId
string (uuid)
—
action
string
`verbal_warning | written_warning | final_warning | financial_penalty`.
penaltyAmount
integer (int64)
The withholding, in minor units of the branch's currency (IQD's minor unit is the dinar). Non-zero <b>only</b> when the action is `financial_penalty` — see the service, which refuses the combination rather than quietly zeroing it.
description
string
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/violations" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "employeeId": "00000000-0000-0000-0000-000000000000",
  "typeId": "00000000-0000-0000-0000-000000000000",
  "action": "string",
  "penaltyAmount": 0,
  "description": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu