API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola

POST /v1/attendance-shift-corrections

POST/v1/attendance-shift-corrections

CodeMeta OS API endpoint.

Modelo de datos

Esta operación trabaja sobre la entidad Attendance Shift Correction (attendance_shift_correction). Los 19 campos (tipo, validación, obligatoriedad y relaciones) figuran en la referencia del esquema.

  • Campos obligatorios: userId, correctionType, reason, requestedBy, date
  • Gestionados por el servidor: _id, schema, schemaVersion, tenantId, version, createdAt, updatedAt, createdBy, updatedBy, deletedAt, deletedBy, originalShiftId, approvedAt, approvedBy, entryHash, previousHash. La plataforma asigna estos campos; si se envían en la solicitud, se descartan.

Cuerpo de la solicitud

NombreTipoDescripción
userIdobligatoriostring
originalShiftIdstring
correctionTypeobligatoriostring
dateobligatoriostring
startAtstring<date-time>
endAtstring<date-time>
durationMinutesinteger
activityTypestring
travelDetailsobject
reasonobligatoriostring
legalBasisstring

Ejemplo

curl -X POST https://api.codemeta-os.de/v1/attendance-shift-corrections \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "userId": "string",
  "originalShiftId": "string",
  "correctionType": "ADD",
  "date": "string",
  "startAt": "string",
  "endAt": "string",
  "durationMinutes": 0,
  "activityType": "WORK",
  "travelDetails": null,
  "reason": "string",
  "legalBasis": "string"
}'
const result = await cm.attendance-shift-corrections.post({
  "userId": "string",
  "originalShiftId": "string",
  "correctionType": "ADD",
  "date": "string",
  "startAt": "string",
  "endAt": "string",
  "durationMinutes": 0,
  "activityType": "WORK",
  "travelDetails": null,
  "reason": "string",
  "legalBasis": "string"
});

Códigos de respuesta

HTTP Significado
200 Default Response

Búsqueda