Time Periods API
PUT/api/v1/time-period-settings/{id}
Product availabilityAlgaPSA

Update time period settings

Applies a partial update. The merged setting is validated like a create and returns 409 when it overlaps another active setting. effective_to: null clears the end date; is_active: false takes the setting out of period generation and overlap checks.

RBAC · time_period

Path parameters

idstring <uuid>Required
UUID path identifier from underlying resource tables.

Request body

Content type: application/json · schema WorkV1TimePeriodSettingsUpdateBody

frequencyinteger
Number of frequency_unit units per period (e.g. 1 with week = weekly).
frequency_unitstring
Enum: dayweekmonthyear
start_dayinteger
week: first weekday (1=Monday … 7=Sunday); month: first day of the month. Defaults to 1.
≥ 1 · ≤ 31
end_dayinteger
month: last day of the period, or 0 for the end of the month. Defaults to 0.
≥ 0 · ≤ 31
start_monthinteger
year: first month. Defaults to 1.
≥ 1 · ≤ 12
start_day_of_monthinteger
year: first day of start_month. Defaults to 1.
≥ 1 · ≤ 31
end_monthinteger
year: last month. Defaults to 12.
≥ 1 · ≤ 12
end_day_of_monthinteger
year: last day of end_month, or 0 for the end of the month. Defaults to 0.
≥ 0 · ≤ 31
effective_fromstring
First day the setting is in force. When omitted, defaults to the start of the period containing today in the caller's timezone; if an earlier setting ended on or after that day, it starts the day after that setting ended.
pattern /^\d{4}-\d{2}-\d{2}$/
effective_tostringNullable
Last day the setting is in force (inclusive); null clears it.
pattern /^\d{4}-\d{2}-\d{2}$/
is_activeboolean
Inactive settings are ignored by period generation and overlap checks.

Response body

Success response 200 · schema WorkV1TimePeriodSettingsResponse

dataobjectRequired
time_period_settings_idstring <uuid>Required
frequencynumberRequired
frequency_unitstringRequired
Enum: dayweekmonthyear
start_daynumberRequiredNullable
end_daynumberRequiredNullable
start_monthnumberRequired
start_day_of_monthnumberRequired
end_monthnumberRequired
end_day_of_monthnumberRequired
effective_fromstringRequired
pattern /^\d{4}-\d{2}-\d{2}$/
effective_tostring
pattern /^\d{4}-\d{2}-\d{2}$/
is_activebooleanRequired
created_atstring <date-time>Required
updated_atstring <date-time>Required
tenantstring <uuid>Required

Response codes

200
Updated setting.
400
Validation failure.
401
API key missing/invalid or associated user missing.
403
Permission denied (time_period:manage for writes, time_period:read for reads).
404
Time period settings not found.
409
The setting overlaps an active setting (same or conflicting period cells over intersecting effective dates). Nothing is written; explicit dates are never adjusted.
500
Unexpected failure.