Locations
Locations
Section titled “Locations”Ubicaciones con geocercas para control de fichaje geolocalizado.
POST /api/companies/{companyId}/locations/v1
Section titled “POST /api/companies/{companyId}/locations/v1”Crear ubicación
Ubicación creada
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "name": "Taller Central", "type": "BRANCH", "address": "Calle 123", "latitude": -34.6037, "longitude": -58.3816, "geoRadiusMeters": 0 }Respuestas
Section titled “Respuestas”Ubicación creada exitosamente
{ "id": "00000000-0000-0000-0000-000000000000", "companyId": "00000000-0000-0000-0000-000000000000", "name": "name", "type": "BRANCH", "address": "address", "latitude": 0, "longitude": 0, "geoRadiusMeters": 0, "active": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }GET /api/companies/{companyId}/locations/v1
Section titled “GET /api/companies/{companyId}/locations/v1”Listar ubicaciones activas
Lista de ubicaciones
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Respuestas
Section titled “Respuestas”Lista de ubicaciones
{ "id": "00000000-0000-0000-0000-000000000000", "companyId": "00000000-0000-0000-0000-000000000000", "name": "name", "type": "BRANCH", "address": "address", "latitude": 0, "longitude": 0, "geoRadiusMeters": 0, "active": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }GET /api/companies/{companyId}/locations/v1/{id}
Section titled “GET /api/companies/{companyId}/locations/v1/{id}”Obtener ubicación por ID
Datos de la ubicación
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Respuestas
Section titled “Respuestas”Datos de la ubicación
{ "id": "00000000-0000-0000-0000-000000000000", "companyId": "00000000-0000-0000-0000-000000000000", "name": "name", "type": "BRANCH", "address": "address", "latitude": 0, "longitude": 0, "geoRadiusMeters": 0, "active": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }PATCH /api/companies/{companyId}/locations/v1/{id}
Section titled “PATCH /api/companies/{companyId}/locations/v1/{id}”Actualizar ubicación
Ubicación actualizada
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "name": "name", "type": "BRANCH", "address": "address", "latitude": 0, "longitude": 0, "geoRadiusMeters": 0, "active": true }Respuestas
Section titled “Respuestas”Ubicación actualizada
{ "id": "00000000-0000-0000-0000-000000000000", "companyId": "00000000-0000-0000-0000-000000000000", "name": "name", "type": "BRANCH", "address": "address", "latitude": 0, "longitude": 0, "geoRadiusMeters": 0, "active": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }DELETE /api/companies/{companyId}/locations/v1/{id}
Section titled “DELETE /api/companies/{companyId}/locations/v1/{id}”Desactivar ubicación
Ubicación desactivada
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Respuestas
Section titled “Respuestas”Ubicación desactivada exitosamente
Schemas
Section titled “Schemas”CreateLocationRequest
Section titled “CreateLocationRequest”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string ej: “Taller Central” | ✅ | |
type | LocationType | ✅ | |
address | string ej: “Calle 123” | ❌ | |
latitude | number (double) ej: -34.6037 | ❌ | |
longitude | number (double) ej: -58.3816 | ❌ | |
geoRadiusMeters | integer | ❌ | Radio de geocerca en metros |
LocationResponse
Section titled “LocationResponse”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string (uuid) | ❌ | |
companyId | string (uuid) | ❌ | |
name | string | ❌ | |
type | LocationType | ❌ | |
address | string | ❌ | |
latitude | number (double) | ❌ | |
longitude | number (double) | ❌ | |
geoRadiusMeters | integer | ❌ | |
active | boolean | ❌ | |
createdAt | string (date-time) | ❌ | |
updatedAt | string (date-time) | ❌ |
UpdateLocationRequest
Section titled “UpdateLocationRequest”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string | ❌ | |
type | LocationType | ❌ | |
address | string | ❌ | |
latitude | number (double) | ❌ | |
longitude | number (double) | ❌ | |
geoRadiusMeters | integer | ❌ | |
active | boolean | ❌ |