Skip to main content
POST
/
allocations
Create an allocation
curl --request POST \
  --url https://www.ruddr.io/api/workspace/allocations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "unit": "day",
  "start": "2023-12-25",
  "end": "2023-12-25",
  "resourceTypeId": "member",
  "assignmentTypeId": "project",
  "hoursPerDay": 123,
  "hoursPerWeek": 123,
  "hoursPerMonth": 123,
  "hoursPerAllocation": 123,
  "hoursRatioOfCapacity": 123,
  "allocateOnTimeOffDays": true,
  "notes": "<string>",
  "memberId": "<string>",
  "resourcePlaceholderId": "<string>",
  "projectId": "<string>",
  "projectRoleId": "<string>",
  "projectTaskId": "<string>",
  "timeOffTypeId": "<string>"
}
'
{
  "id": "3f8a1d2e-7c4b-4e9f-a6d5-1b2c3d4e5f6a",
  "resourceTypeId": "member",
  "assignmentTypeId": "project",
  "start": "2025-03-01",
  "end": "2025-05-31",
  "unit": "day",
  "hoursPerDay": 6.5,
  "hoursPerWeek": null,
  "hoursPerMonth": null,
  "hoursPerAllocation": null,
  "hoursRatioOfCapacity": null,
  "allocateOnTimeOffDays": false,
  "totalHours": 422.5,
  "isBillable": true,
  "notes": "Q2 product roadmap delivery",
  "readOnly": false,
  "entity": "allocation",
  "createdAt": "2025-01-10T14:22:35.418Z",
  "member": {
    "id": "9b7e6d5c-4a3f-4b2e-8c1d-0e9f8a7b6c5d",
    "name": "Jane Smith"
  },
  "placeholder": null,
  "project": {
    "id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
    "name": "Website Redesign",
    "client": {
      "id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
      "name": "Acme Corp"
    }
  },
  "role": {
    "id": "d4e5f6a7-b8c9-4d0e-af1b-2c3d4e5f6a7b",
    "name": "Senior Engineer"
  },
  "task": {
    "id": "e5f6a7b8-c9d0-4e1f-b2a3-4c5d6e7f8a9b",
    "name": "Backend Development"
  },
  "timeOffType": null
}
A resource allocation for a member or placeholder.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
unit
enum<string>
required

The time unit that determines how the allocation is defined. Possible values are "day" (Per day), "week" (Per week), "month" (Per month), "allocation" (Absolute number of hours), or "ratio_of_capacity" (Percentage of available capacity).

Available options:
day,
week,
month,
allocation,
ratio_of_capacity
start
string<date>
required

The start date (YYYY-MM-DD) of the allocation, must come on or before end date.

end
string<date>
required

The end date (YYYY-MM-DD) of the allocation, must come on or after the start date.

resourceTypeId
enum<string>
required

The type of resource being assigned. Must be either "member" for a real team member or "placeholder" for a generic resource placeholder.

Available options:
member,
placeholder
assignmentTypeId
enum<string>
required

The type of assignment. Must be either "project" for a project-related allocation or "time_off" for a time off assignment.

Available options:
project,
time_off
hoursPerDay
number<float>

The number of hours allocated per day. Only allowed when unit is day. Must be between 0 and 24 with up to 2 decimal places.

hoursPerWeek
number<float>

The number of hours allocated per week. Only allowed when unit is week. Must be between 0 and 168 with up to 2 decimal places.

hoursPerMonth
number<float>

The number of hours allocated per month. Only allowed when unit is month. Must be between 0 and 744 with up to 2 decimal places.

hoursPerAllocation
number<float>

The total number of hours allocated for the full duration. Only allowed when unit is allocation. Must be between 0 and 99999 with up to 2 decimal places.

hoursRatioOfCapacity
number<float>

The proportion of the member's available capacity to allocate. Only allowed when unit is ratio_of_capacity. Must be between 0 and 1 with up to 4 decimal places.

allocateOnTimeOffDays
boolean

Whether time can be allocated on days when the member has time off. Defaults to false if not provided.

notes
string

Any notes with the associated allocation.

memberId
string

The member ID (uuid) of the member for this allocation. Must be provided if the resourceTypeId is member.

resourcePlaceholderId
string

The resource placeholder ID (uuid) of the resource placeholder for this allocation. Must be provided if the resourceTypeId is placeholder.

projectId
string

The project ID (uuid) of the project for the allocation. Must be provided if the assignmentTypeId is project.

projectRoleId
string

The project role ID (uuid) of the project role for the allocation. May be required depending on the project configuration.

projectTaskId
string

The project task ID (uuid) of the project task for the allocation.

timeOffTypeId
string

The time off type ID (uuid) of the time off type for the allocation. Must be provided if the assignmentTypeId is time_off.

Response

200

id
string

The unique identifier for the object.

resourceTypeId
enum<string>

The type of resource being assigned. Must be either "member" for a real team member or "placeholder" for a generic resource placeholder.

Available options:
member,
placeholder
assignmentTypeId
enum<string>

The type of assignment. Must be either "project" for a project-related allocation or "time_off" for a time off assignment.

Available options:
project,
time_off
start
string<date>

The start date (YYYY-MM-DD) of the allocation, must come on or before end date.

end
string<date>

The end date (YYYY-MM-DD) of the allocation, must come on or after the start date.

unit
enum<string>

The time unit that determines how the allocation is defined. Possible values are "day" (Per day), "week" (Per week), "month" (Per month), "allocation" (Absolute number of hours), or "ratio_of_capacity" (Percentage of available capacity).

Available options:
day,
week,
month,
allocation,
ratio_of_capacity
hoursPerDay
number<float> | null

The number of hours allocated per day. Only present when unit is "day". Must be between 0 and 24 with up to 2 decimal places.

hoursPerWeek
number<float> | null

The number of hours allocated per week. Only present when unit is "week". Must be between 0 and 168 with up to 2 decimal places.

hoursPerMonth
number<float> | null

The number of hours allocated per month. Only present when unit is "month". Must be between 0 and 744 with up to 2 decimal places.

hoursPerAllocation
number<float> | null

The total number of hours for the full allocation duration. Only present when unit is "allocation". Must be between 0 and 99999 with up to 2 decimal places.

hoursRatioOfCapacity
number<float> | null

The proportion of the member's available capacity to allocate. Only present when unit is "ratio_of_capacity". Must be between 0 and 1 with up to 4 decimal places.

allocateOnTimeOffDays
boolean | null

Whether time can be allocated on days when the member has time off. Only present when assignmentTypeId is "project" and resourceTypeId is "member". Defaults to false.

totalHours
number<float>

The total number of computed hours across all dates in the allocation.

isBillable
boolean

Whether this allocation is billable.

notes
string | null

Notes associated with the allocation.

readOnly
boolean

Whether this allocation is read-only. Allocations sourced from time entries or holidays are read-only.

entity
string

The source entity type. One of "allocation", "time_entry", or "holiday".

createdAt
string<date-time>

The timestamp when the object was created.

member
object

The member assigned to this allocation. Present when resourceTypeId is "member", otherwise null.

placeholder
object

The resource placeholder assigned to this allocation. Present when resourceTypeId is "placeholder", otherwise null.

project
object

The project this allocation is assigned to. Present when assignmentTypeId is "project", otherwise null.

role
object

The project role associated with this allocation, if any.

task
object

The project task associated with this allocation, if any.

timeOffType
object

The time off type associated with this allocation. Present when assignmentTypeId is "time_off", otherwise null.