Get Vacation Status
Read the creator's vacation flag plus the optional start/end window. Owner-only.
GET /api/v1/creators/:creatorId/vacation — 🔑 Bearer
Returns vacationMode (boolean) plus the optional vacationStart / vacationEnd timestamps. Ownership-checked — creatorId must match the bearer's CreatorProfile.id.
The creatorStatus enum on CreatorProfile is the canonical source of truth (ACTIVE / VACATION / SUSPENDED / BANNED / DEACTIVATED). vacationMode is a legacy boolean mirror that this endpoint returns directly. The two are kept in sync server-side; for client display, prefer creatorStatus from GET /creators/profile and use this endpoint only when you need the start/end window.
Request
Path parameters
| Param | Type | Validation | Notes |
|---|---|---|---|
creatorId | string (UUID) | ParseUUIDPipe | Must match the bearer's CreatorProfile.id (otherwise 403) |
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <accessToken> | ✓ | JWT from POST /auth/login |
Response
200 OK — ApiResponseOf<VacationStatusResponseDto>
{
"success": true,
"data": {
"vacationMode": true,
"vacationStart": "2026-07-01T00:00:00.000Z",
"vacationEnd": "2026-07-15T00:00:00.000Z"
}
}| Field | Type | Notes |
|---|---|---|
vacationMode | boolean | Mirror of CreatorProfile.vacationMode |
vacationStart | string (ISO 8601) | null | null when vacation is off OR enabled-without-explicit-start (server defaults to now() when enabled with no start) |
vacationEnd | string (ISO 8601) | null | null when vacation is off OR open-ended |
Errors
| HTTP | code / i18nKey | Reason |
|---|---|---|
400 | (validation) | creatorId not a valid UUID |
401 | (guard) | Missing / invalid bearer token |
403 | (verifyCreatorOwnership) | creatorId does not belong to the bearer's user |
404 | creator.vacation.not_found | CreatorProfile row missing |
Side effects
- Ownership check —
verifyCreatorOwnership(creatorId, userId)→ 403 on mismatch. prisma.creatorProfile.findUnique({ where: { id: creatorId }, select: { vacationMode, vacationStart, vacationEnd } }).- Throw
not_foundif missing. - Return the row. No mutations.
Code samples
curl https://api.bio.re/api/v1/creators/c1a2b3c4-d5e6-7890-abcd-ef1234567890/vacation \
-H "Authorization: Bearer $ACCESS_TOKEN"type VacationStatus = {
vacationMode: boolean;
vacationStart: string | null;
vacationEnd: string | null;
};
async function getVacationStatus(accessToken: string, creatorId: string): Promise<VacationStatus> {
const res = await fetch(`https://api.bio.re/api/v1/creators/${creatorId}/vacation`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
const json = await res.json();
if (!res.ok || !json.success) {
throw Object.assign(new Error(json?.error?.message ?? 'Vacation status fetch failed'), {
code: json?.error?.code,
});
}
return json.data;
}import { useQuery } from '@tanstack/react-query';
export const creatorKeys = {
vacation: (creatorId: string) => ['creators', creatorId, 'vacation'] as const,
};
export function useVacationStatus(creatorId: string) {
return useQuery({
queryKey: creatorKeys.vacation(creatorId),
queryFn: async () => {
const res = await fetch(`/api/v1/creators/${creatorId}/vacation`);
const json = await res.json();
if (!res.ok || !json.success) {
throw Object.assign(new Error(json?.error?.message ?? 'Vacation status fetch failed'), {
code: json?.error?.code,
i18nKey: json?.error?.i18nKey,
});
}
return json.data as VacationStatus;
},
enabled: Boolean(creatorId),
staleTime: 30_000,
});
}Try it
Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/creators/string/vacation"{
"success": true,
"data": {
"vacationMode": true,
"vacationStart": "2019-08-24T14:15:22Z",
"vacationEnd": "2019-08-24T14:15:22Z"
}
}{
"success": false,
"error": {
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid credentials",
"i18nKey": "auth.login.invalid_credentials",
"i18nVars": {
"field": "email"
},
"details": [
{
"message": "email must be an email"
}
],
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}{
"success": false,
"error": {
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid credentials",
"i18nKey": "auth.login.invalid_credentials",
"i18nVars": {
"field": "email"
},
"details": [
{
"message": "email must be an email"
}
],
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Source
| Source | Path | Lines |
|---|---|---|
| Controller | apps/api-core/src/modules/creator/creator.controller.ts | 227–235 (getVacation) |
| DTO (response) | apps/api-core/src/modules/creator/dto/creator-client-response.dto.ts | 475–484 (VacationStatusResponseDto) |
| Service | apps/api-core/src/modules/creator/creator.service.ts | 618–625 (getVacationStatus) |
| Prisma model | packages/prisma/prisma/schema.prisma | CreatorProfile.vacationMode, CreatorProfile.vacationStart, CreatorProfile.vacationEnd, CreatorProfile.creatorStatus (canonical source) |
Update DM Config
Set DM type / price / active flag in one atomic call. Side effects sync DMPackage rows + flip manual social link visibility on DM ON↔OFF transitions. Public bio cache invalidated.
Set Vacation Mode
Toggle vacation mode with optional start/end window. Status flips ACTIVE↔VACATION only — SUSPENDED/BANNED/DEACTIVATED accounts are protected from this transition.