> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vellaro.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Tenant Languages

> Admin: sostituisce in blocco la selezione del negozio.

In blocco e non per singola lingua di proposito: la predefinita è un
vincolo FRA righe (indice unico parziale `uq_tenant_languages_one_default`
su `(tenant_id) WHERE is_default`), quindi spostarla con due PATCH
indipendenti passerebbe da uno stato intermedio che il DB rifiuta.

L'ordine di `active` diventa `sort_order`, cioè l'ordine con cui le lingue
compaiono nel selettore dei client.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json put /api/v1/admin/tenant-languages
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/tenant-languages:
    put:
      tags:
        - admin:languages
      summary: Set Tenant Languages
      description: >-
        Admin: sostituisce in blocco la selezione del negozio.


        In blocco e non per singola lingua di proposito: la predefinita è un

        vincolo FRA righe (indice unico parziale
        `uq_tenant_languages_one_default`

        su `(tenant_id) WHERE is_default`), quindi spostarla con due PATCH

        indipendenti passerebbe da uno stato intermedio che il DB rifiuta.


        L'ordine di `active` diventa `sort_order`, cioè l'ordine con cui le
        lingue

        compaiono nel selettore dei client.
      operationId: set_tenant_languages_api_v1_admin_tenant_languages_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantLanguagesUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_list_TenantLanguageOut__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TenantLanguagesUpdate:
      properties:
        active:
          items:
            type: string
          type: array
          title: Active
        default:
          type: string
          title: Default
      type: object
      required:
        - active
        - default
      title: TenantLanguagesUpdate
      description: |-
        Sostituisce in blocco la selezione del negozio.

        `active` è anche l'ORDINE di visualizzazione nel selettore: la posizione
        nella lista diventa `sort_order`. Un PATCH per singola lingua non
        basterebbe, perché la predefinita è un vincolo fra righe (indice unico
        parziale `uq_tenant_languages_one_default`) e va spostata atomicamente.
    ApiResponse_list_TenantLanguageOut__:
      properties:
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/TenantLanguageOut'
              type: array
            - type: 'null'
          title: Data
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[list[TenantLanguageOut]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TenantLanguageOut:
      properties:
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
        locale:
          type: string
          title: Locale
        flag_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Flag Icon
        is_active:
          type: boolean
          title: Is Active
        is_default:
          type: boolean
          title: Is Default
        sort_order:
          type: integer
          title: Sort Order
      type: object
      required:
        - code
        - name
        - locale
        - flag_icon
        - is_active
        - is_default
        - sort_order
      title: TenantLanguageOut
      description: |-
        Una lingua del catalogo di piattaforma, vista dal negozio corrente.

        `is_active` / `is_default` / `sort_order` sono del NEGOZIO (tabella
        `tenant_languages`), non del catalogo: sono esattamente i tre valori che
        l'admin del negozio può cambiare.
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.