Capacity Reservation

The capacity reservation resource.

Basehttps://rest.carbon.ms/capacityReservation
GET/capacityReservation

List capacity reservations

Retrieve a paginated list of capacity reservations. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/capacityReservation
curl --request GET \
  --url 'https://rest.carbon.ms/capacityReservation?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "resourceKind": "string",
    "resourceId": "xyz789",
    "operationId": "xyz789",
    "jobId": "xyz789",
    "startAt": "2026-01-01T00:00:00Z",
    "endAt": "2026-01-01T00:00:00Z"
  }
]
GET/capacityReservation

Retrieve a capacity reservation

Fetch a single capacity reservation by filtering on `id`.

Query parameters

idstring

Match on the capacity reservation's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/capacityReservation
curl --request GET \
  --url 'https://rest.carbon.ms/capacityReservation?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "resourceKind": "string",
  "resourceId": "xyz789",
  "operationId": "xyz789",
  "jobId": "xyz789",
  "startAt": "2026-01-01T00:00:00Z",
  "endAt": "2026-01-01T00:00:00Z"
}
POST/capacityReservation

Create a capacity reservation

Create a new capacity reservation.

Body parameters

resourceKindcapacityResourceKindrequired
resourceIdstringrequired
operationIdstringrequired

References jobOperation.id

jobIdstringrequired

References job.id

startAttimestamprequired
endAttimestamprequired
scenarioIdstring
earliestStartAttimestamp

When the operation could have started at the earliest; startAt - earliestStartAt is time spent waiting. Null when unknown (legacy rows).

scheduleNotestring

Human-readable reason for the placement timing (English, engine-generated), e.g. "Waited 14h for the work center - queued behind J000010 (2 ops)". Null when the operation started as early as it could.

workHoursnumber

Actual work content (hours) inside this reservation; endAt - startAt minus off-shift pauses. Null on legacy rows and manual pins.

isPlaceholderbooleanrequired

true = a non-binding placeholder for an operation the scheduler could not place. Shown on the Forecast (flagged) but excluded from capacity so it never blocks other jobs.

POSThttps://rest.carbon.ms/capacityReservation
curl --request POST \
  --url https://rest.carbon.ms/capacityReservation \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"resourceKind":"string","resourceId":"xyz789","operationId":"xyz789","jobId":"xyz789","startAt":"2026-01-01T00:00:00Z","endAt":"2026-01-01T00:00:00Z","isPlaceholder":true}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "resourceKind": "string",
  "resourceId": "xyz789",
  "operationId": "xyz789",
  "jobId": "xyz789",
  "startAt": "2026-01-01T00:00:00Z",
  "endAt": "2026-01-01T00:00:00Z"
}
PATCH/capacityReservation

Update a capacity reservation

Update an existing capacity reservation, matched on `id`.

Body parameters

resourceKindcapacityResourceKindrequired
resourceIdstringrequired
operationIdstringrequired

References jobOperation.id

jobIdstringrequired

References job.id

startAttimestamprequired
endAttimestamprequired
scenarioIdstring
earliestStartAttimestamp

When the operation could have started at the earliest; startAt - earliestStartAt is time spent waiting. Null when unknown (legacy rows).

scheduleNotestring

Human-readable reason for the placement timing (English, engine-generated), e.g. "Waited 14h for the work center - queued behind J000010 (2 ops)". Null when the operation started as early as it could.

workHoursnumber

Actual work content (hours) inside this reservation; endAt - startAt minus off-shift pauses. Null on legacy rows and manual pins.

isPlaceholderbooleanrequired

true = a non-binding placeholder for an operation the scheduler could not place. Shown on the Forecast (flagged) but excluded from capacity so it never blocks other jobs.

PATCHhttps://rest.carbon.ms/capacityReservation
curl --request PATCH \
  --url 'https://rest.carbon.ms/capacityReservation?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"resourceKind":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "resourceKind": "string",
  "resourceId": "xyz789",
  "operationId": "xyz789",
  "jobId": "xyz789",
  "startAt": "2026-01-01T00:00:00Z",
  "endAt": "2026-01-01T00:00:00Z"
}
DELETE/capacityReservation

Delete a capacity reservation

Delete a capacity reservation, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the capacity reservation to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/capacityReservation
curl --request DELETE \
  --url 'https://rest.carbon.ms/capacityReservation?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content