> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.fidly.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Branding

> Make this branding the one the company's documents are rendered with.

`is_default` is the only thing the API changes about a branding: the label, the logo and
the layout are designed in the interface. Setting it to `true` promotes this branding and
demotes the previous default in the same transaction, on the locked row.

The company always keeps exactly one default, so `false` is refused on the branding that
currently is it (`422 default_branding_required`) — promote another one instead. Asking
for the state a branding is already in changes nothing and is not an error.

In sandbox mode the body is validated exactly as in live mode but nothing is stored: the
response reflects the change, and the next `GET` returns the branding untouched.



## OpenAPI

````yaml /openapi.json patch /brandings/{branding_uuid}
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /brandings/{branding_uuid}:
    patch:
      tags:
        - brandings
      summary: Update Branding
      description: >-
        Make this branding the one the company's documents are rendered with.


        `is_default` is the only thing the API changes about a branding: the
        label, the logo and

        the layout are designed in the interface. Setting it to `true` promotes
        this branding and

        demotes the previous default in the same transaction, on the locked row.


        The company always keeps exactly one default, so `false` is refused on
        the branding that

        currently is it (`422 default_branding_required`) — promote another one
        instead. Asking

        for the state a branding is already in changes nothing and is not an
        error.


        In sandbox mode the body is validated exactly as in live mode but
        nothing is stored: the

        response reflects the change, and the next `GET` returns the branding
        untouched.
      operationId: update_branding_brandings__branding_uuid__patch
      parameters:
        - name: branding_uuid
          in: path
          required: true
          schema:
            type: string
            title: Branding Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandingUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandingOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandingUpdate:
      properties:
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: >-
            Makes this branding the company's default, demoting the previous one
            in the same operation. A company always keeps exactly one default,
            so setting it to `false` on the branding that currently *is* the
            default is refused: promote another one instead.
      additionalProperties: false
      type: object
      title: BrandingUpdate
      description: >-
        The only editable part of a branding: which one the company applies by
        default.


        A branding itself is created and designed in the interface — the API
        neither creates,

        edits nor deletes one. `label` and everything behind it are therefore
        read-only and

        rejected if sent, rather than ignored.
    BrandingOut:
      properties:
        id:
          type: string
          title: Id
          description: Opaque unique identifier of the branding.
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: Name given to the branding by the company.
        is_default:
          type: boolean
          title: Is Default
          description: '`true` when this is the branding applied to the company''s documents.'
      additionalProperties: true
      type: object
      required:
        - id
        - label
        - is_default
      title: BrandingOut
      description: >-
        A visual identity of the company, identified by an opaque `id`.


        A branding decides how the company's documents are rendered. The API
        exposes what names

        one and which one applies by default; the logo and the layout settings
        behind it belong to

        the interface and are never returned.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````