Skip to main content

Work Card API Reference (WRKCardSE)

This page is the raw reference for the WRKCardSE submission — every endpoint, field, and enum. For task-based guides, go to Workflows. For plain-English explanations of these fields, see the Glossary.

GET Documents/WRKCardSE — retrieve the schema

Returns the expected JSON shape for a WRKCardSE submission.

GET /Documents/WRKCardSE
Authorization: Bearer <accessToken>
{
"Cards": {
"Card": [
{
"f_afm_ergodoti": "f_afm_ergodoti",
"f_aa": "f_aa",
"f_comments": "f_comments",
"Details": {
"CardDetails": [
{
"f_afm": "f_afm",
"f_eponymo": "f_eponymo",
"f_onoma": "f_onoma",
"f_type": "0",
"f_reference_date": "2022-05-13",
"f_date": "2022-05-13T09:21:37.4578278+03:00",
"f_aitiologia": "f_aitiologia"
}
]
}
}
]
}
}

POST Documents/WRKCardSE — submit a check-in or check-out

Request body shape

Cards
└── Card[] one entry per branch
├── f_afm_ergodoti employer's ΑΦΜ
├── f_aa branch number
├── f_comments free-text note (optional)
└── Details
└── CardDetails[] one entry per check-in/check-out event
├── f_afm employee's ΑΦΜ
├── f_eponymo employee surname
├── f_onoma employee first name
├── f_type "0" check-in | "1" check-out
├── f_reference_date yyyy-MM-dd
├── f_date ISO 8601 timestamp with offset
└── f_aitiologia late-justification code, or null

Card fields

FieldTypeRequiredDescription
f_afm_ergodotistring (9 digits)yesEmployer's ΑΦΜ — must match the connected employer.
f_aastringyesBranch number. "0" for the main branch.
f_commentsstring or nullnoFree-text note for this submission.

CardDetails fields

FieldTypeRequiredDescription
f_afmstring (9 digits)yesEmployee's ΑΦΜ.
f_eponymostringyesEmployee surname.
f_onomastringyesEmployee first name.
f_type"0" | "1"yes"0" = check-in, "1" = check-out.
f_reference_datestring, yyyy-MM-ddyesThe work-day this event belongs to.
f_datestring, ISO 8601 with offsetyesExact timestamp of the event.
f_aitiologia"001" | "002" | "003" | nullconditionalRequired only if the event is being submitted outside the 15-minute on-time window. null otherwise.

f_type enum

ValueMeaning
"0"Check-in (Προσέλευση)
"1"Check-out (Αποχώρηση)

f_aitiologia enum

These codes apply only to force-majeure situations described in Late and justified submissions — they are not a general-purpose "late" excuse.

ValueMeaning
"001"Power or telecom outage
"002"Problem in the employer's own systems
"003"Connectivity problem with Ergani

Example request

{
"Cards": {
"Card": [
{
"f_afm_ergodoti": "094187530",
"f_aa": "0",
"f_comments": "test from REST API",
"Details": {
"CardDetails": [
{
"f_afm": "028233026",
"f_eponymo": "ΚΑΠΟΙΟΣ",
"f_onoma": "ΛΑΜΠΡΟΣ",
"f_type": "0",
"f_reference_date": "2024-05-04",
"f_date": "2024-05-04T08:58:00+03:00",
"f_aitiologia": null
}
]
}
}
]
}
}

Success response — 200 OK

[
{
"id": "92",
"protocol": "ΕΥΣ92",
"submitDate": "04/05/2024 08:58"
}
]
FieldDescription
idInternal storage key. Not needed for normal operation.
protocolConfirmation ID — store this.
submitDateTimestamp Ergani recorded the submission, dd/MM/yyyy HH:mm.

Error response — 400 Bad Request

{
"message": "Για το Παράρτημα: 0\\nΤο ΑΦΜ δεν αντιστοιχεί στον συνδεδεμένο εργοδότη."
}

See Error Handling for what this means and how to fix it.

Multiple events in one request

A single POST can contain:

  • Multiple CardDetails entries under one Card — multiple employees/events for the same branch.
  • Multiple Card entries under Cards.Card — events for different branches of the same employer, in one request.

See Bulk submissions for a worked example.

Repeated events for the same employee and day

You can submit more than one check-in/check-out for the same f_afm and f_reference_date — including multiple of the same f_type (e.g. two check-ins). Ergani always treats the most recently submitted event of a given type as the authoritative one for that reference date. This is how split shifts (check-in, check-out, check-in, check-out on the same day) and corrections both work — see Corrections and Split shifts.

GET Documents/WRKCardSE?protocol=...&submittedDate=... — retrieve the submitted PDF

GET /Documents/WRKCardSE?protocol=ΕΥΣ92&submittedDate=20240504
Authorization: Bearer <accessToken>
Query parameterDescription
protocolThe protocol value returned by the successful POST.
submittedDateThe submission date, as yyyymmdd.

Returns the document as a Base64-encoded PDF string.

POST Documents/CancelSubmittedDocument

Revokes a previously submitted declaration. As of this writing, this is supported only for leave declarations (Οργάνωση Χρόνου Εργασίας – Άδειες and their ΟΡΘΗ ΕΠΑΝΑΛΗΨΗ corrections) — not for WRKCardSE. To correct a check-in/check-out, submit a new event for the same employee and reference date — see Corrections.

POST /Documents/CancelSubmittedDocument
Content-Type: application/json
Authorization: Bearer <accessToken>
{
"TypeOfDocument": "00009",
"Protocol": "TA123",
"SubmittedDate": "19800410"
}
FieldDescription
TypeOfDocumentCode of the active submission type.
ProtocolProtocol number of the submission to cancel.
SubmittedDateSubmission date, yyyymmdd.

Success response — 200 OK

{
"message": "Η ακύρωση ολοκληρώθηκε επιτυχώς"
}