Time Periods API
POST/api/v1/time-periods
Product availabilityAlgaPSA

Create time period

Creates a time period. start_date/end_date accept YYYY-MM-DD (datetimes are truncated to their date). is_current is ignored on input and derived on read. Returns 409 when it overlaps an existing period; periods that touch (one's end_date equals the next's start_date) are allowed. end_date is exclusive: the first day after the period (a period covering Aug 16–22 has end_date 2026-08-23).

RBAC · time_sheet

Request body

Content type: application/json · schema WorkV1CreateTimePeriodBody

start_dateanyOfRequired
anyOf (option 1)string
pattern /^\d{4}-\d{2}-\d{2}$/
anyOf (option 2)string <date-time>
end_dateanyOfRequired
Exclusive end of the period: the first day after the period. A period covering Aug 16–22 has end_date 2026-08-23.
anyOf (option 1)string
pattern /^\d{4}-\d{2}-\d{2}$/
anyOf (option 2)string <date-time>
is_currentboolean
Ignored. is_current is derived from the dates on read; accepted for backward compatibility.

Response body

Success response 200 · schema WorkV1ApiSuccess

dataanyOfRequired
anyOf (option 1)object
anyOf (option 2)array of object
itemsobject
metaobject

Response codes

200
Operation succeeded.
201
Create-like operation succeeded.
400
Validation or request parsing failure.
401
API key missing/invalid or associated user missing.
403
RBAC denied for time_sheet resource action.
409
Conflict: the period overlaps an existing period, is closed (reopen it first), or has time sheets that block the change.
500
Unexpected controller/service failure.