# Tenant

## List tenant directory entries with status and purpose.

> \*\*Authorization:\*\* Global Administrator role required.\
> \
> \*\*Pagination:\*\* If results exceed max page size, \`X-continuationToken\` header contains token for next page.\
> \
> \*\*Response Fields:\*\* \`tenantId\`, \`status\`, \`purpose\`.\
> \
> \*\*Use Cases:\*\* Tenant directory; system-wide operations; migration tools; admin dashboards.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":[null]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}}},"schemas":{"TenantDirectoryEntry":{"required":["tenantId"],"type":"object","properties":{"tenantId":{"type":"string"},"status":{"$ref":"#/components/schemas/TenantDirectoryStatus"},"purpose":{"$ref":"#/components/schemas/TenantDirectoryPurpose"}},"additionalProperties":false},"TenantDirectoryStatus":{"enum":["onboarding","active","disabled"],"type":"string"},"TenantDirectoryPurpose":{"enum":["demo","test","production"],"type":"string"},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants":{"get":{"tags":["Tenant"],"summary":"List tenant directory entries with status and purpose.","description":"**Authorization:** Global Administrator role required.\n\n**Pagination:** If results exceed max page size, `X-continuationToken` header contains token for next page.\n\n**Response Fields:** `tenantId`, `status`, `purpose`.\n\n**Use Cases:** Tenant directory; system-wide operations; migration tools; admin dashboards.","responses":{"200":{"description":"Tenant directory entries returned.","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantDirectoryEntry"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantDirectoryEntry"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantDirectoryEntry"}}}}},"401":{"description":"Caller not authenticated as admin.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller is not a Global Administrator.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Download tenant configuration as ZIP archive.

> \*\*Authorization:\*\* Requires \`TenantConfiguration.Read\` scope.\
> \
> \*\*File Selection:\*\* Omit \`files\` parameter for complete backup; specify files for partial backup.\
> \
> \*\*Versioning:\*\* Omit \`datetime\` for latest version; specify for point-in-time snapshot.\
> \
> \*\*Archive Naming:\*\* \`{datetime}-{partial-}tenantId.fctwc\` (e.g., \`20240115-093045-mystore.fctwc\` or \`20240115-093045-partial-mystore.fctwc\`).\
> \
> \*\*Use Cases:\*\* Backup, disaster recovery, configuration comparison, audit, environment synchronization.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}":{"get":{"tags":["Tenant"],"summary":"Download tenant configuration as ZIP archive.","description":"**Authorization:** Requires `TenantConfiguration.Read` scope.\n\n**File Selection:** Omit `files` parameter for complete backup; specify files for partial backup.\n\n**Versioning:** Omit `datetime` for latest version; specify for point-in-time snapshot.\n\n**Archive Naming:** `{datetime}-{partial-}tenantId.fctwc` (e.g., `20240115-093045-mystore.fctwc` or `20240115-093045-partial-mystore.fctwc`).\n\n**Use Cases:** Backup, disaster recovery, configuration comparison, audit, environment synchronization.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"files","in":"query","description":"Get only a subset of configuration. Don't specify any file to get all the configuration","schema":{"type":"array","items":{"type":"string"}}},{"name":"datetime","in":"query","description":"Date when to retrieve the configuration. If null or omitted, latest version would be returned","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Configuration archive returned."},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to read tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"Tenant or specified files not found.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Create or update tenant configuration files.

> \*\*Authorization:\*\* Requires \`TenantConfiguration.Write\` scope.\
> \
> \*\*Full Replacement:\*\* All configured files overwritten. Missing files deleted.\
> \
> \*\*Force:\*\* Set \`force=true\` to save despite validation errors.\
> \
> \*\*Input:\*\* Multipart form with ZIP containing all config files.\
> \
> \*\*Use Cases:\*\* Full config deployment; environment promotion; disaster recovery restore.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantConfigurationVersionInformation":{"type":"object","properties":{"version":{"type":"string","description":"Version of the configuration","readOnly":true},"files":{"type":"object","additionalProperties":{"type":"integer","format":"int64"},"description":"Returns version of each files of the configuration"},"appliedMigrations":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"description":"Version information related to a tenant configuration"},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}":{"post":{"tags":["Tenant"],"summary":"Create or update tenant configuration files.","description":"**Authorization:** Requires `TenantConfiguration.Write` scope.\n\n**Full Replacement:** All configured files overwritten. Missing files deleted.\n\n**Force:** Set `force=true` to save despite validation errors.\n\n**Input:** Multipart form with ZIP containing all config files.\n\n**Use Cases:** Full config deployment; environment promotion; disaster recovery restore.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"force","in":"query","description":"force save even if there is any errors","schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"A zip file containing all configuration file","format":"binary"}}},"encoding":{"file":{"style":"form"}}}}},"responses":{"200":{"description":"Tenant configuration created or updated.","content":{"text/plain":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"application/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"text/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}}}},"400":{"description":"Invalid input payload.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to write tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Create a new tenant with configuration files.

> \*\*Authorization:\*\* Requires \`TenantConfiguration.Write\` scope.\
> \
> \*\*Conflict:\*\* Returns 409 if tenant already exists.\
> \
> \*\*Force:\*\* Set \`force=true\` to save despite validation errors (use with caution).\
> \
> \*\*Use Cases:\*\* New tenant provisioning; initial deployment; tenant migration.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantConfigurationVersionInformation":{"type":"object","properties":{"version":{"type":"string","description":"Version of the configuration","readOnly":true},"files":{"type":"object","additionalProperties":{"type":"integer","format":"int64"},"description":"Returns version of each files of the configuration"},"appliedMigrations":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"description":"Version information related to a tenant configuration"},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}":{"put":{"tags":["Tenant"],"summary":"Create a new tenant with configuration files.","description":"**Authorization:** Requires `TenantConfiguration.Write` scope.\n\n**Conflict:** Returns 409 if tenant already exists.\n\n**Force:** Set `force=true` to save despite validation errors (use with caution).\n\n**Use Cases:** New tenant provisioning; initial deployment; tenant migration.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"force","in":"query","description":"force save even if there is any errors","schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"A zip file containing all configuration file","format":"binary"}}},"encoding":{"file":{"style":"form"}}}}},"responses":{"200":{"description":"Tenant created with configuration.","content":{"text/plain":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"application/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"text/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}}}},"400":{"description":"Invalid input payload.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to write tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"Tenant already exists.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Delete tenant configuration files.

> \*\*Authorization:\*\* Global Administrator role required.\
> \
> \*\*Operation:\*\* Removes all config files for tenant.\
> \
> \*\*Use Cases:\*\* Tenant deprovisioning; cleanup; environment removal.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":[null]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}":{"delete":{"tags":["Tenant"],"summary":"Delete tenant configuration files.","description":"**Authorization:** Global Administrator role required.\n\n**Operation:** Removes all config files for tenant.\n\n**Use Cases:** Tenant deprovisioning; cleanup; environment removal.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Tenant configuration deleted."},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to delete tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Partially update tenant configuration files.

> \*\*Authorization:\*\* Requires \`TenantConfiguration.Write\` scope.\
> \
> \*\*Partial Update:\*\* Only included files updated/removed. Other files unchanged.\
> \
> \*\*Empty Files:\*\* Empty file in ZIP = removal from config.\
> \
> \*\*Force:\*\* Set \`force=true\` to save despite validation errors.\
> \
> \*\*Use Cases:\*\* Targeted config changes; single-file updates; incremental deployments.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantConfigurationVersionInformation":{"type":"object","properties":{"version":{"type":"string","description":"Version of the configuration","readOnly":true},"files":{"type":"object","additionalProperties":{"type":"integer","format":"int64"},"description":"Returns version of each files of the configuration"},"appliedMigrations":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"description":"Version information related to a tenant configuration"},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}":{"patch":{"tags":["Tenant"],"summary":"Partially update tenant configuration files.","description":"**Authorization:** Requires `TenantConfiguration.Write` scope.\n\n**Partial Update:** Only included files updated/removed. Other files unchanged.\n\n**Empty Files:** Empty file in ZIP = removal from config.\n\n**Force:** Set `force=true` to save despite validation errors.\n\n**Use Cases:** Targeted config changes; single-file updates; incremental deployments.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"force","in":"query","description":"force save even if there is any errors","schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"A zip containing the files to modify. If a zip contains an empty file it will be removed from the configuration.","format":"binary"}}},"encoding":{"file":{"style":"form"}}}}},"responses":{"200":{"description":"Tenant configuration partially updated.","content":{"text/plain":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"application/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}},"text/json":{"schema":{"description":"Version information related to a tenant configuration","$ref":"#/components/schemas/TenantConfigurationVersionInformation"}}}},"400":{"description":"Invalid input payload.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to write tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"Tenant not found.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Get merged configuration for a tenant layout.

> \*\*Merging:\*\* Loads base configuration and merges with layout-specific settings. Layout settings take precedence. Applies registered configuration modifiers.\
> \
> \*\*Layouts:\*\* Different UI/UX configurations�web (desktop), mobile (native app), kiosk (in-store), pos (point-of-sale).\
> \
> \*\*Use Cases:\*\* App initialization; feature flags; themes; layout-specific rules.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/tenants/{tenantId}/{layoutId}":{"get":{"tags":["Tenant"],"summary":"Get merged configuration for a tenant layout.","description":"**Merging:** Loads base configuration and merges with layout-specific settings. Layout settings take precedence. Applies registered configuration modifiers.\n\n**Layouts:** Different UI/UX configurations�web (desktop), mobile (native app), kiosk (in-store), pos (point-of-sale).\n\n**Use Cases:** App initialization; feature flags; themes; layout-specific rules.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"layoutId","in":"path","description":"Identifier of the layout","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Merged layout configuration returned.","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"404":{"description":"Tenant or layout configuration not found.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```

## Get tenant configuration change history.

> \*\*Authorization:\*\* Requires \`TenantConfiguration.Read\` scope.\
> &#x20;           \
> \*\*Version Source:\*\* Uses blob version history from \`.version\` to reconstruct configuration changes.\
> &#x20;           \
> \*\*Filtering:\*\* Use \`files\` (supports wildcard \`\*\`) to keep only changes impacting specific files.\
> &#x20;           \
> \*\*Pagination:\*\* \`offset\` and \`limit\` support numeric pagination.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantConfigurationHistoryPage":{"type":"object","properties":{"offset":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/TenantConfigurationHistoryEntry"}}},"additionalProperties":false},"TenantConfigurationHistoryEntry":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date-time"},"user":{"$ref":"#/components/schemas/TenantConfigurationHistoryUser"},"files":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"TenantConfigurationHistoryUser":{"type":"object","properties":{"userName":{"type":["null","string"]},"name":{"type":["null","string"]},"email":{"type":["null","string"]}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}/config/history":{"get":{"tags":["Tenant"],"summary":"Get tenant configuration change history.","description":"**Authorization:** Requires `TenantConfiguration.Read` scope.\n            \n**Version Source:** Uses blob version history from `.version` to reconstruct configuration changes.\n            \n**Filtering:** Use `files` (supports wildcard `*`) to keep only changes impacting specific files.\n            \n**Pagination:** `offset` and `limit` support numeric pagination.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}},{"name":"files","in":"query","description":"Optional file filter. Supports wildcard (`*`).","schema":{"type":"array","items":{"type":"string"}}},{"name":"offset","in":"query","description":"Number of history entries to skip.","schema":{"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"Maximum number of history entries to return.","schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"History returned.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TenantConfigurationHistoryPage"}},"application/json":{"schema":{"$ref":"#/components/schemas/TenantConfigurationHistoryPage"}},"text/json":{"schema":{"$ref":"#/components/schemas/TenantConfigurationHistoryPage"}}}},"400":{"description":"Invalid request parameters.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller not authorized to read tenant configuration.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}}}
```

## Validate tenant configuration.

> \*\*Validation:\*\* YAML syntax, schemas, required fields, integration settings, resource references, business rule consistency.\
> \
> \*\*Auth:\*\* Optional admin auth. Unauthenticated get basic success/failure. Authenticated get detailed errors.\
> \
> \*\*Use Cases:\*\* Pre-deployment validation; troubleshooting; CI/CD checks; manual verification.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Tenant"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/tenants/{tenantId}/test":{"get":{"tags":["Tenant"],"summary":"Validate tenant configuration.","description":"**Validation:** YAML syntax, schemas, required fields, integration settings, resource references, business rule consistency.\n\n**Auth:** Optional admin auth. Unauthenticated get basic success/failure. Authenticated get detailed errors.\n\n**Use Cases:** Pre-deployment validation; troubleshooting; CI/CD checks; manual verification.","parameters":[{"name":"tenantId","in":"path","description":"Identifier of the tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Configuration valid."},"401":{"description":"Caller not authenticated (when admin auth enforced).","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Validation failed or unexpected server error."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thewalletcrew.io/api-reference/tenant-config/tenant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
