Skip to main content

Create or replace a tenant configuration entry by type

POST 

/tenant-configurations/by-configuration-type/:configurationTypeId

Creates or replaces (upserts) the configuration record for the given configurationTypeId and the tenant identified by the required tenant-id header.

Currently accepted type: only tenant-timezone-config is supported. Any other configurationTypeId value returns 400.

Request body — a JSON object with a single required field: timezone (string) must be a valid IANA time-zone identifier (e.g. "America/New_York"). An unrecognized zone ID returns 400.

Behavior: if no record exists for this tenant and type it is created; if one already exists it is fully replaced. Calling this endpoint twice with the same timezone value is safe and produces the same result (idempotent with respect to state).

Response — on success returns a flat TenantTimezoneResponse with fields tenantId, configurationTypeId, timezone, and timezoneAbbreviation. This shape differs from the TenantConfigurationItemDto envelope returned by the GET endpoints on this tag.

400 causes (three distinct triggers): (a) missing tenant-id header; (b) unsupported configurationTypeId; (c) missing or invalid timezone in the request body.

Side effects: persists the record to the data store. There is no automatic retry on write failures; a 500 indicates a persistent data-store error — consider a manual retry after a delay. The write is served by a different path than the cached GET-by-type read, so a successful write may not be immediately reflected by that read.

Request​

Responses​

The persisted timezone configuration as a flat TenantTimezoneResponse, including the resolved timezone abbreviation for the current date.