API Architecture
REST Principles
The Pontotel API follows the principles REST (Representational State Transfer):
- Resources: Entities like users, employees, scales
- HTTP Methods: GET, POST, PUT, PATCH, DELETE
- JSO N: Data format for requests and replies
- Status Codes: Standard HTTP codes (200, 201, 400, 404, etc.)
- Stateless: Each request is independent
Base URL
==="Production"
| Text Only |
|---|
| https://apis.pontotel.com.br/pontotel/api/v4/
|
===Sandbox===
| Text Only |
|---|
| https://sandbox-apis.pontotel.com.br/pontotel/api/v4/
|
HTTP Methods
| Method | Usage | Example |
| GET | List or obtain resources | GET /usuarios/ |
| POST | Create new resources | POST /usuarios/ |
| PUT | Update full resource | PUT /usuarios/123/ |
| PATCH | Partial update | PATCH /usuarios/123/ |
| DELETE | Remove Resources | DELETE /usuarios/123/ |
List (Get collection)
All listing answers follow the paginated format:
| JSON |
|---|
| {
"count": 150,
"next": "https://apis.pontotel.com.br/pontotel/api/v4/usuarios/?page=2",
"previous": null,
"results": [
{
"id": 1,
"username": "usuario1",
"email": "usuario1@example.com"
}
]
}
|
Individual Object (Get detail)
| JSON |
|---|
| {
"id": 1,
"username": "usuario1",
"email": "usuario1@example.com",
"first_name": "João",
"last_name": "Silva",
"is_active": true
}
|
Error
| JSON |
|---|
| {
"error": "validation_error",
"message": "Dados inválidos na requisição",
"details": {
"email": ["Este campo é obrigatório."]
}
}
|
Status Codes
| Code | Meaning | When it occurs |
| 200 | OK | Successful Request |
| 201 | Created | Resource successfully created |
| 204 | In Content | Successful deletion |
| 400 | Bad Request | Invalid data |
| 401 | Unauthorized | Not authenticated |
| 403 | Forbidden | No permission |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Authentication
All requests (except /login/) require the header:
| HTTP |
|---|
| Authorization: Bearer {seu_access_token}
Content-Type: application/json
|
See the full tab on Authentication →
Main areas
| Domain | Endpoint Base | Description |
| Authentication | /login/ | Get access token |
| Employers | /empregadores/ | Companies/CNPJs |
| Employees | /empregados/ | Officials |
| Users | /usuarios/ | System users |
| Locations | /locais-trabalho/ | Physical sites |
| Scales | /escalas/ | Working Scales |
| Vacation | /ferias/ | Vacation periods |
| Absences | /afastamentos/ | Absences |
Next Steps