Tenant Configuration

Create or replace a tenant configuration entry by type

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.

post/tenant-configurations/by-configuration-type/{configurationTypeId}

Path parameters

configurationTypeIdstring required

Identifier of the configuration type to upsert. Only tenant-timezone-config is currently supported; any other value returns 400. Required; no default is applied.

Headers

tenant-idstring required

Identifier of the tenant whose configuration is written. Required; the request is rejected with 400 when it is missing or blank. No default is applied.

Request body

{"stackTrail":"paths:/tenant-configurations/by-configuration-type/{configurationTypeId}:post:requestBody:content:application/json:schema","oasType":"schema","type":"unknown"}

Response

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

tenantIdstring

Tenant ID this configuration belongs to

configurationTypeIdstring

Configuration type ID

timezonestring

IANA timezone ID

timezoneAbbreviationstring

Timezone abbreviation for the current date

Example response

{
  "timezoneAbbreviation": "EST"
}

Changes