API Reference

Allocations

Manage resource allocations and assignment progress.

REST /api/v1API key authentication5 endpoints
GET/api/v1/allocations

List allocations with filters

Query schema
const listQuerySchema = z.object({
  resourceId: z.string().uuid().optional(),
  taskId: z.string().uuid().optional(),
  projectId: z.string().uuid().optional(),
  dateFrom: z
    .string()
    .regex(/^\d{4}-\d{2}-\d{2}$/)
    .optional(),
  dateTo: z
    .string()
    .regex(/^\d{4}-\d{2}-\d{2}$/)
    .optional(),
  limit: z.coerce.number().int().min(1).max(100).default(50),
  offset: z.coerce.number().int().min(0).default(0),
});
Response200JSON response with data and pagination envelopes.
POST/api/v1/allocations

Create a new allocation

JSON body schema
const createBodySchema = z.object({
  taskId: z.string().uuid(),
  resourceId: z.string().uuid().nullable().optional(),
  groupId: z.string().uuid().nullable().optional(),
  startDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
  endDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
  hoursPerDay: z.number().min(0).max(24).optional(),
  hours: z.number().min(0).optional(),
  notes: z.string().optional(),
  constraintAcknowledged: z.boolean().optional(),
  constraintReason: z.string().trim().max(1000).nullable().optional(),
});
Response201JSON response.
DELETE/api/v1/allocations/:id

Delete an allocation

Path parametersid: string
Response204No response body.
GET/api/v1/allocations/:id

Get allocation by ID

Path parametersid: string
Response200JSON response.
PATCH/api/v1/allocations/:id

Update an allocation

Path parametersid: string
JSON body schema
const updateBodySchema = z.object({
  taskId: z.string().uuid().optional(),
  resourceId: z.string().uuid().nullable().optional(),
  groupId: z.string().uuid().nullable().optional(),
  startDate: z
    .string()
    .regex(/^\d{4}-\d{2}-\d{2}$/)
    .optional(),
  endDate: z
    .string()
    .regex(/^\d{4}-\d{2}-\d{2}$/)
    .optional(),
  hoursPerDay: z.number().min(0).max(24).optional(),
  hours: z.number().min(0).optional(),
  notes: z.string().nullable().optional(),
  constraintAcknowledged: z.boolean().optional(),
  constraintReason: z.string().trim().max(1000).nullable().optional(),
});
Response200JSON response.