BIO.RE
Creator

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

ParamTypeValidationNotes
creatorIdstring (UUID)ParseUUIDPipeMust match the bearer's CreatorProfile.id (otherwise 403)
HeaderRequiredNotes
Authorization: Bearer <accessToken>JWT from POST /auth/login

Response

200 OKApiResponseOf<VacationStatusResponseDto>

{
  "success": true,
  "data": {
    "vacationMode": true,
    "vacationStart": "2026-07-01T00:00:00.000Z",
    "vacationEnd": "2026-07-15T00:00:00.000Z"
  }
}
FieldTypeNotes
vacationModebooleanMirror of CreatorProfile.vacationMode
vacationStartstring (ISO 8601) | nullnull when vacation is off OR enabled-without-explicit-start (server defaults to now() when enabled with no start)
vacationEndstring (ISO 8601) | nullnull when vacation is off OR open-ended

Errors

HTTPcode / i18nKeyReason
400(validation)creatorId not a valid UUID
401(guard)Missing / invalid bearer token
403(verifyCreatorOwnership)creatorId does not belong to the bearer's user
404creator.vacation.not_foundCreatorProfile row missing

Side effects

  1. Ownership checkverifyCreatorOwnership(creatorId, userId) → 403 on mismatch.
  2. prisma.creatorProfile.findUnique({ where: { id: creatorId }, select: { vacationMode, vacationStart, vacationEnd } }).
  3. Throw not_found if missing.
  4. 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

GET
/api/v1/creators/{creatorId}/vacation
AuthorizationBearer <token>

In: header

Path Parameters

creatorId*string

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

SourcePathLines
Controllerapps/api-core/src/modules/creator/creator.controller.ts227–235 (getVacation)
DTO (response)apps/api-core/src/modules/creator/dto/creator-client-response.dto.ts475–484 (VacationStatusResponseDto)
Serviceapps/api-core/src/modules/creator/creator.service.ts618–625 (getVacationStatus)
Prisma modelpackages/prisma/prisma/schema.prismaCreatorProfile.vacationMode, CreatorProfile.vacationStart, CreatorProfile.vacationEnd, CreatorProfile.creatorStatus (canonical source)

On this page