Planning
Planning records represent scheduled shifts — they assign an employee (persona) to a workplace (local) on a specific date with planned entry and exit times. Each planning record can have one or more Planning Events attached to it, which hold the actual clock timestamps.
Index Plannings
GET https://api.mitrabajo.uy/plannings
Returns a paginated list of all planning records for your account. Supports optional filtering by estado and fecha.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None. Filters are passed as query string using the filter parameter.
| Filter field | Type | Description |
|---|---|---|
filter[estado] |
integer | Filter by status value |
filter[fecha] |
string (date) | Filter by date — format YYYY-MM-DD |
Example
curl "https://api.mitrabajo.uy/plannings?filter[fecha]=2026-07-29" \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
{
"items": [
{
"id": 501,
"persona": 101,
"local": 1,
"fecha": "2026-07-29",
"entrada": "08:00:00",
"salida": "17:00:00",
"estado": 1,
"id_entrada_evento": 210,
"id_descanso_evento": 211,
"id_retorno_evento": 212,
"id_salida_evento": 213
}
],
"_links": {
"self": { "href": "https://api.mitrabajo.uy/plannings?page=1" },
"first": { "href": "https://api.mitrabajo.uy/plannings?page=1" },
"last": { "href": "https://api.mitrabajo.uy/plannings?page=1" }
},
"_meta": {
"totalCount": 1,
"pageCount": 1,
"currentPage": 1,
"perPage": 20
}
}
View Planning
GET https://api.mitrabajo.uy/plannings/{id}
Returns a single planning record.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None.
Example
curl https://api.mitrabajo.uy/plannings/501 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
{
"id": 501,
"persona": 101,
"local": 1,
"fecha": "2026-07-29",
"entrada": "08:00:00",
"salida": "17:00:00",
"estado": 1,
"id_entrada_evento": 210,
"id_descanso_evento": 211,
"id_retorno_evento": 212,
"id_salida_evento": 213
}
Create Planning
POST https://api.mitrabajo.uy/plannings
Creates a new planning record. Returns the created object with 201 Created.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Content-Type |
application/json |
Yes |
Request Body
| Field | Type | Required | Constraints |
|---|---|---|---|
persona |
integer | Yes | Employee ID |
local |
integer | Yes | Workplace ID |
fecha |
string | Yes | Date — format YYYY-MM-DD |
entrada |
string | Yes | Planned entry time — format HH:MM:SS |
salida |
string | Yes | Planned exit time — format HH:MM:SS |
estado |
integer | No | Status code |
Example
curl -X POST https://api.mitrabajo.uy/plannings \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-" \
-H "Content-Type: application/json" \
-d '{
"persona": 101,
"local": 1,
"fecha": "2026-07-30",
"entrada": "08:00:00",
"salida": "17:00:00"
}'
Response
{
"id": 502,
"persona": 101,
"local": 1,
"fecha": "2026-07-30",
"entrada": "08:00:00",
"salida": "17:00:00",
"estado": null,
"id_entrada_evento": null,
"id_descanso_evento": null,
"id_retorno_evento": null,
"id_salida_evento": null
}
Update Planning
PATCH https://api.mitrabajo.uy/plannings/{id}
PUT https://api.mitrabajo.uy/plannings/{id}
Updates an existing planning record. Returns the updated object with 200 OK.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Content-Type |
application/json |
Yes |
Request Body
Same fields as Create Planning. With PATCH, only include the fields to change.
Example
curl -X PATCH https://api.mitrabajo.uy/plannings/502 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-" \
-H "Content-Type: application/json" \
-d '{
"entrada": "09:00:00",
"salida": "18:00:00"
}'
Response
{
"id": 502,
"persona": 101,
"local": 1,
"fecha": "2026-07-30",
"entrada": "09:00:00",
"salida": "18:00:00",
"estado": null
}
Delete Planning
DELETE https://api.mitrabajo.uy/plannings/{id}
Deletes a planning record. Returns 204 No Content on success. Deletion is blocked if the record has attached planning events.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None.
Example
curl -X DELETE https://api.mitrabajo.uy/plannings/502 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
204 No Content — empty body on success.
Index Planning Events
GET https://api.mitrabajo.uy/planning-events
Returns a paginated list of all planning events across your account. Supports optional filtering by fecha.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None. Filters are passed as query string.
| Filter field | Type | Description |
|---|---|---|
filter[fecha] |
string (date) | Filter by event date — format YYYY-MM-DD |
Example
curl "https://api.mitrabajo.uy/planning-events?filter[fecha]=2026-07-29" \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
{
"items": [
{
"id": 210,
"id_planificacion": 501,
"tipo": "E",
"fecha_evento": "2026-07-29",
"hora": "08:02:00",
"texto": "Entrada"
}
],
"_links": {
"self": { "href": "https://api.mitrabajo.uy/planning-events?page=1" }
},
"_meta": {
"totalCount": 1,
"pageCount": 1,
"currentPage": 1,
"perPage": 20
}
}
View Planning Event
GET https://api.mitrabajo.uy/planning-events/{id}
Returns a single planning event.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None.
Example
curl https://api.mitrabajo.uy/planning-events/210 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
{
"id": 210,
"id_planificacion": 501,
"tipo": "E",
"fecha_evento": "2026-07-29",
"hora": "08:02:00",
"texto": "Entrada"
}
Create Planning Event
POST https://api.mitrabajo.uy/planning-events
Creates a new clock event and links it to a planning record. Returns the created object with 201 Created.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Content-Type |
application/json |
Yes |
Request Body
| Field | Type | Required | Constraints |
|---|---|---|---|
id_planificacion |
integer | Yes | ID of the parent planning record |
tipo |
string | Yes | One character: E = Entry, D = Break, R = Return, S = Exit |
fecha_evento |
string | Yes | Event date — format YYYY-MM-DD |
hora |
string | Yes | Event time — format HH:MM:SS |
texto |
string | No | Free-text note |
Example
curl -X POST https://api.mitrabajo.uy/planning-events \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-" \
-H "Content-Type: application/json" \
-d '{
"id_planificacion": 501,
"tipo": "E",
"fecha_evento": "2026-07-29",
"hora": "08:02:00",
"texto": "Entrada registrada"
}'
Response
{
"id": 214,
"id_planificacion": 501,
"tipo": "E",
"fecha_evento": "2026-07-29",
"hora": "08:02:00",
"texto": "Entrada registrada"
}
Update Planning Event
PATCH https://api.mitrabajo.uy/planning-events/{id}
PUT https://api.mitrabajo.uy/planning-events/{id}
Updates an existing planning event. Returns the updated object with 200 OK.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Content-Type |
application/json |
Yes |
Request Body
Same fields as Create Planning Event. With PATCH, only include the fields to change.
Example
curl -X PATCH https://api.mitrabajo.uy/planning-events/214 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-" \
-H "Content-Type: application/json" \
-d '{
"hora": "08:05:00"
}'
Response
{
"id": 214,
"id_planificacion": 501,
"tipo": "E",
"fecha_evento": "2026-07-29",
"hora": "08:05:00",
"texto": "Entrada registrada"
}
Delete Planning Event
DELETE https://api.mitrabajo.uy/planning-events/{id}
Deletes a planning event. Returns 204 No Content on success.
Request Headers
| Header | Value | Required |
|---|---|---|
X-Api-Key |
Your access token | Yes |
Request Body
None.
Example
curl -X DELETE https://api.mitrabajo.uy/planning-events/214 \
-H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
Response
204 No Content — empty body on success.