Create Holiday Subscriptions
Bulk-subscribe one or more users to a holiday category so the listed dates are automatically blocked from their availability.
curl --request POST \
--url https://api.zeeg.me/v2/holidays/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"categoryType": "country",
"categoryKey": "DE"
}
}
'{
"users": [
{
"email": "lena.meier@horizondigital.de",
"slug": "lena-meier",
"uuid": "Lena6mK2QwR9XPv",
"status": "created"
},
{
"email": "tom.schmidt@horizondigital.de",
"slug": "tom-schmidt",
"uuid": "TomXk3J8YqB1ZPN",
"status": "skipped"
}
]
}Authorizations
Body
Hide child attributes
Hide child attributes
country, region Country or region key from /holidays/categories (e.g. DE, DE-BY).
30Holiday keys (from /holidays/preview) to exclude from each target's availability.
100User-based target. Mutually exclusive with team. Provide exactly one of emails, slugs or uuids.
Response
At least one target was created or skipped.
- Option 1
- Option 2
Hide child attributes
Hide child attributes
Target user's email, or the lookup key when resolution failed for an emails request.
Target user's slug, or the lookup key when resolution failed for a slugs request.
Target user's public UUID, or the lookup key when resolution failed for a uuids request.
created — new subscription added. skipped — user was already subscribed to the same category (any new excludedHolidayKeys were merged in). failed — see reason.
created, skipped, failed Human-readable failure reason. Present only when status is failed.
curl --request POST \
--url https://api.zeeg.me/v2/holidays/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription": {
"categoryType": "country",
"categoryKey": "DE"
}
}
'{
"users": [
{
"email": "lena.meier@horizondigital.de",
"slug": "lena-meier",
"uuid": "Lena6mK2QwR9XPv",
"status": "created"
},
{
"email": "tom.schmidt@horizondigital.de",
"slug": "tom-schmidt",
"uuid": "TomXk3J8YqB1ZPN",
"status": "skipped"
}
]
}