Create sports exemption
Creates a new sports exemption.
Note: This endpoint requires a user-scoped OAuth token. A pure
client_credentialstoken without user context will be rejected.
Request
POST /api/oauth/v2/resource/sports-exemptions
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
customerUuid | string | Yes | UUID of the assigned customer |
date | string | No | Issue date (YYYY-MM-DD, default: today) |
customStartDate | string | No | Custom start date of the exemption (YYYY-MM-DD) |
customEndDate | string | No | Custom end date of the exemption (YYYY-MM-DD) |
reason | string | No | Reason for the exemption |
printed | boolean | No | Whether the exemption has been printed |
Response
Success (201 Created)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"date": "2026-06-09",
"customStartDate": "2026-06-10",
"customEndDate": "2026-07-10",
"reason": "Injury to the left knee",
"printed": false,
"customer": {
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"firstName": "Anna",
"lastName": "Muster"
}
}
}Response fields
See Get sports exemption for the full field description.
Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/sports-exemptions" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"customerUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"date": "2026-04-15T10:00:00",
"customStartDate": "2026-04-15T10:00:00",
"customEndDate": "2026-04-15T10:00:00",
"reason": "beispiel",
"printed": "beispiel"
}'Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. customerUuid missing) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope medicals not present |
| 404 | not_found | Customer not found |