← HR API
Shifts
Singular: Shift — Base-URL: https://hr-api.ayoune.app — Zugriff: CRUD
Jetzt ausprobieren
beta
Response (live)
Requests werden über den consumer-app Proxy an *.ayoune.app weitergeleitet. Tokens bleiben im Browser und werden pro Call mitgesendet.
Beispiel-Response (aufgezeichnet) Beispiel
Eine echte, zuvor aufgezeichnete GET /:id-Antwort dieses Endpunkts — nicht der Live-Call oben. Sensible Felder sind maskiert.
{
"payload": {
"_id": "65e06d8b1e1be45a37c6248a",
"draft": true,
"workers": [],
"neededSkills": [],
"dayOfWeek": 0,
"shouldDuration": 0,
"isDuration": 0,
"isNightShift": false,
"isWeekendShift": false,
"isHolidayShift": false,
"hasBonus": false,
"bonusAmount": 0,
"movement": false,
"informed": false,
"confirmed": false,
"amount": 0,
"blend": 0,
"note": "",
"createdBy": "6045f4d25704710012485569",
"createdAt": "2024-02-29T11:42:03.166Z",
"updatedAt": "2024-02-29T11:42:03.166Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://hr-api.ayoune.app/shifts/65e06d8b1e1be45a37c6248a",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "CompanyLocations",
"title": "MODEL_COMPANYLOCATION",
"href": "https://api.ayoune.app/config/companylocations",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.companylocations"
},
{
"rel": "Departments",
"title": "MODEL_DEPARTMENT",
"href": "https://api.ayoune.app/config/departments",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.departments"
},
{
"rel": "WorkCenters",
"title": "MODEL_WORKCENTER",
"href": "https://api.ayoune.app/production/workcenters",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "production.workcenters"
}
],
"debugId": "6a62e02959e4802b7b80d5c7",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_SHIFT",
"href": "https://api.ayoune.app/hr/shifts/65e06d8b1e1be45a37c6248a/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_SHIFT",
"href": "https://api.ayoune.app/hr/shifts/65e06d8b1e1be45a37c6248a/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.11.0",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2368",
"reset": "1784868377",
"resetDate": "Fri Jul 24 2026"
},
"responseTime": 82.776678,
"code": 200,
"status": "success",
"error": false
}
}
Endpunkte
| Methode | Path | Beschreibung | Right |
|---|---|---|---|
| GET | /shifts |
Liste mit Filtern/Paginierung | hr.shifts.view |
| GET | /shifts/:id |
Einzelner Datensatz | hr.shifts.view |
| POST | /shifts |
Neuen Datensatz erstellen | hr.shifts.new |
| PUT | /shifts |
Datensatz aktualisieren | hr.shifts.edit |
| DELETE | /shifts/:id |
Datensatz löschen | hr.shifts.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// Alle abrufen
const list = await ay.hr.shifts.find().limit(10).exec();
// Einzelnen Datensatz
const one = await ay.hr.shifts.findById('OBJECT_ID').exec();
// Erstellen
const created = await ay.hr.shifts.create({ name: 'Foo' });