Skip to content
MiJornada

Operations

Absences

Vacations and other absences.

List absences

GET /v1/absences

Absences that overlap the range, for up to a year. Medical leave appears as a plain ABSENCE, with no reason or documents. Requires the absences:read scope.

Parameters

from required string (date) First day, in the company's time zone.
to required string (date) Last day, included. At most 93 days after from, or a year for absences.
employeeId optional string
status optional REQUESTED | APPROVED | REJECTED | CANCELLED
limit optional integer
cursor optional string The nextCursor of the previous page.

Response 200

Each item in data:

id string
employeeId string
employeeName string
employeeCode string | null
type VACATION | ABSENCE
status REQUESTED | APPROVED | REJECTED | CANCELLED
startDate string (date)
endDate string (date)
requestedDays number | null
requestedHours number | null
createdAt string (date-time)
updatedAt string (date-time)

Possible errors: 401, 403, 422, 429.

Example

curl "https://api.mijornada.app/v1/absences?from=2026-10-01&to=2026-10-31" \
  -H "Authorization: Bearer mj_live_…"

Example response

{
  "data": [
    {
      "id": "abc123",
      "employeeId": "abc123",
      "employeeName": "Ana García López",
      "employeeCode": "E014",
      "type": "VACATION",
      "status": "REQUESTED",
      "startDate": "2026-10-15",
      "endDate": "2026-10-15",
      "requestedDays": 5,
      "requestedHours": null,
      "createdAt": "2026-10-15T07:02:11Z",
      "updatedAt": "2026-10-15T07:02:11Z"
    }
  ],
  "nextCursor": null
}

Record an absence

POST /v1/absences

Records an approved absence, as if the company had entered it. The same rules apply as in MiJornada: overlaps are rejected and vacation days are taken from the balance. Medical leave cannot be created here. Requires the absences:write scope.

Parameters

Idempotency-Key optional string Repeat a request with the same value and it runs once. Kept for 24 hours.

Body

employeeId required string
type required VACATION | ABSENCE
startDate required string (date)
endDate required string (date)
reason optional string Stored in MiJornada. Never returned by the API.

Response 201

id string
employeeId string
employeeName string
employeeCode string | null
type VACATION | ABSENCE
status REQUESTED | APPROVED | REJECTED | CANCELLED
startDate string (date)
endDate string (date)
requestedDays number | null
requestedHours number | null
createdAt string (date-time)
updatedAt string (date-time)

Possible errors: 401, 403, 404, 409, 422, 429.

Example

curl -X POST "https://api.mijornada.app/v1/absences" \
  -H "Authorization: Bearer mj_live_…" \
  -H "Content-Type: application/json" \
  -d '{"employeeId":"abc123","type":"VACATION","startDate":"2026-10-15","endDate":"2026-10-15"}'

Example response

{
  "id": "abc123",
  "employeeId": "abc123",
  "employeeName": "Ana García López",
  "employeeCode": "E014",
  "type": "VACATION",
  "status": "REQUESTED",
  "startDate": "2026-10-15",
  "endDate": "2026-10-15",
  "requestedDays": 5,
  "requestedHours": null,
  "createdAt": "2026-10-15T07:02:11Z",
  "updatedAt": "2026-10-15T07:02:11Z"
}

Last updated: .