Scales
What is it?
Scale is the structure that organizes the sequence of working and off days over a working cycle (e.g. 6×1, 12×36, 5×2). For each day of the cycle, the scale indicates which journey The collaborator should follow.
Critical dependence: Journeys Before Scales
The scale reference journeys per day. Before creating a scale, the journeys she will use should already be registered.
Difference: Journey vs. Scale
| Shift | Scale |
| Sets | Time of day (entry/exit/range) | Day sequence (work cycle/leave) |
| Granularity | 1 day | Repeatable cycle (e.g. 6×1) |
| Depends on | Nothing. | Days previously registered |
| Example | "Second: 08h–17h, 1h interval" | "6 days with Journey A, 1 day off" |
Common Scale Types
| Type | Description |
5x2 | 5 days worked, 2 days off (conventional week) |
6x1 | 6 days straight, 1 day off |
12x36 | 12 hours worked, 36 hours off (plans) |
4x3 | 4 days week |
Why It Matters In Integration
- The collaborator must be associated with a scale for the routine to be automated
- Scale changes impact sheet and compliance — date of validity must be recorded
- In integrations, scale is often referenced by its integration code
Available Operations
| Method | Endpoint | Description |
| GET | /escalas/ | List Scales |
| POST | /escalas/ | Create Scale |
| GET | /escalas/{id}/ | Get Scale |
| PATCH | /escalas/{id}/ | Update |
Fields
| Field | Type | Required | Description |
id | integer | — | Internal ID |
empregado_id | integer | | Employee ID |
tipo | string | | Type of scale (e.g.: 5x2, 12x36) |
data_inicio | date | | Initiation |
data_fim | date | — | End of term (null = in force) |
jornadas | array | — | Days per day of the cycle |
Example: Create Scale
Request
| HTTP |
|---|
| POST /pontotel/api/v4/escalas/
Authorization: Bearer {token}
Content-Type: application/json
{
"empregado_id": 500,
"tipo": "5x2",
"data_inicio": "2025-01-15"
}
|
Response (201 Created)
| JSON |
|---|
| {
"id": 200,
"empregado_id": 500,
"tipo": "5x2",
"data_inicio": "2025-01-15",
"data_fim": null,
"jornadas": []
}
|
Common Errors
| Error | Cause | Solution |
| Scale without journeys | Unregistered journeys before the scale | Register journeys first |
| Overlayed dates | Conflicting duration with existing scale | Close the previous scale before creating new |