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

# List Branches

<Info>
  Este endpoint retorna uma lista de <strong>filiais</strong> (Branch).
  A resposta utiliza o schema `PublicApiBranchBaseResponse` em forma de lista.
</Info>

## Visão Geral

* **Método:** `GET`
* **Path:** `/v0/branch/`
* **OperationId:** `public_list_branches_v0_branch__get`
* **Autenticação:** header `x-api-key` (`APIKeyHeader` no OpenAPI)

<OpenAPIPlayground openapi="/public-api/openapi.json" operationId="public_list_branches_v0_branch__get" />

### Campos

2. **cnpj** — Identificador da Empresa / Filial
   A CNPJ (Cadastro Nacional da Pessoa Jurídica) é o identificador fiscal de uma entidade legal (empresa).
   Um único grupo de empresas pode ter vários CNPJs, pois cada filial/local de trabalho pode ter seu próprio registro legal (CNPJ específico da filial).
   Em nosso modelo, a Filial é identificada pelo CNPJ porque isso define a entidade empregadora legal responsável pela conformidade.

### Exemplo de requisição

```bash theme={null}
curl -X GET "https://public-api.salu.com.vc/dev/routes/v0/branch/?page=0&limit=20" \
  -H "Accept: application/json" \
  -H "x-api-key: $SALU_PUBLIC_API_KEY"
```


## OpenAPI

````yaml GET /v0/branch/
openapi: 3.1.0
info:
  title: Public API v0
  description: API publica da Salu para integracoes de SST.
  version: 0.1.0
servers:
  - url: https://public-api.salu.com.vc/dev/routes
    description: Development
  - url: https://public-api.salu.com.vc/prd/routes
    description: Production
security: []
paths:
  /v0/branch/:
    get:
      tags:
        - Branch
        - Branch
      summary: Public List Branches
      operationId: public_list_branches_v0_branch__get
      parameters:
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            default: created_at
            title: Order By
        - name: order_dir
          in: query
          required: false
          schema:
            type: string
            default: asc
            title: Order Dir
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            title: Limit
        - name: address
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Address
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Organization Id
        - name: display_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Display Name
        - name: branch_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Branch Id
        - name: cnpj
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cnpj
        - name: hr_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Hr Code
        - name: client_integration_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Client Integration Code
        - name: updated_after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Updated After
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPublicApiBranchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ListPublicApiBranchResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicApiBranchBaseResponse'
          type: array
          title: Data
        cursor:
          anyOf:
            - $ref: '#/components/schemas/PaginateCursor'
            - type: 'null'
      type: object
      required:
        - data
        - cursor
      title: ListPublicApiBranchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicApiBranchBaseResponse:
      properties:
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        address_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Number
        address_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Detail
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
        neighborhood:
          anyOf:
            - type: string
            - type: 'null'
          title: Neighborhood
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        display_name:
          type: string
          title: Display Name
        company_name:
          type: string
          title: Company Name
        hr_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Hr Code
        cnpj:
          type: string
          title: Cnpj
        is_active:
          type: boolean
          title: Is Active
        client_integration_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Integration Code
      type: object
      required:
        - id
        - organization_id
        - display_name
        - company_name
        - cnpj
        - is_active
      title: PublicApiBranchBaseResponse
    PaginateCursor:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total_pages:
          type: integer
          title: Total Pages
          readOnly: true
        next_page:
          type: boolean
          title: Next Page
          readOnly: true
      type: object
      required:
        - total
        - page
        - page_size
        - total_pages
        - next_page
      title: PaginateCursor
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````