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

# Listar centros de custo

> Lista os centros de custo da empresa, ordenados por nome (A→Z), com desempate por ID crescente.



## OpenAPI

````yaml api-reference/v3/openapi.json GET /api/v3/cost-centers
openapi: 3.1.0
info:
  version: v3
  title: Salvy API
  x-logo:
    url: web/logo.png
servers:
  - url: https://api.salvy.com.br
    description: Salvy API URL
security:
  - bearerAuth: []
tags:
  - name: Public API
  - name: Outgoing Webhooks
paths:
  /api/v3/cost-centers:
    get:
      tags:
        - Public API
      description: >-
        Lista os centros de custo da empresa, ordenados por nome (A→Z), com
        desempate por ID crescente.
      operationId: publicListCostCentersV3
      parameters:
        - name: page
          in: query
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            default: 1
            description: Número da página, iniciando em 1.
            example: 1
            type: integer
            minimum: 1
            maximum: 9007199254740991
        - name: pageSize
          in: query
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            default: 50
            description: Tamanho da página. Máximo de 200.
            example: 50
            type: integer
            minimum: 1
            maximum: 200
        - name: status
          in: query
          required: false
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            description: >-
              Filtra pela situação do centro de custo. Repita o parâmetro para
              incluir múltiplos valores (`?status=active&status=disabled`).
            example: active
            type: array
            items:
              type: string
              enum:
                - active
                - disabled
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Identificador único do centro de custo.
                          example: 0198c2f1-3815-45b7-9e60-8e137cad845c
                          title: UUID
                          type: string
                          examples:
                            - 123e4567-e89b-12d3-a456-426614174000
                            - 123e4567-e89b-12d3-a456-426614174001
                        companyId:
                          description: ID da empresa dona do centro de custo.
                          example: 0198c2f1-3815-45b7-9e60-8e137cad845c
                          title: UUID
                          type: string
                          examples:
                            - 123e4567-e89b-12d3-a456-426614174000
                            - 123e4567-e89b-12d3-a456-426614174001
                        code:
                          description: >-
                            Código do centro de custo definido pela empresa.
                            Nulo quando o centro de custo não tem código.
                          example: ENG-01
                          type:
                            - string
                            - 'null'
                        name:
                          type: string
                          description: Nome do centro de custo.
                          example: Engenharia
                        status:
                          type: string
                          enum:
                            - active
                            - disabled
                          description: >-
                            Situação do centro de custo: "active" (em uso) ou
                            "disabled" (desativado pela empresa).
                          example: active
                        responsibleEmployee:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  description: >-
                                    Identificador único do colaborador
                                    responsável.
                                  example: 0197aa3e-3815-45b7-9e60-8e137cad845c
                                  title: UUID
                                  type: string
                                  examples:
                                    - 123e4567-e89b-12d3-a456-426614174000
                                    - 123e4567-e89b-12d3-a456-426614174001
                                fullName:
                                  type: string
                                  description: Nome do colaborador responsável.
                                  example: Maria Souza
                                workEmail:
                                  anyOf:
                                    - title: Email
                                      type: string
                                      description: A valid email address.
                                      examples:
                                        - user@example.com
                                        - admin@domain.org
                                        - info@company.net
                                    - type: 'null'
                                  description: >-
                                    E-mail profissional do colaborador
                                    responsável. Nulo quando não há e-mail
                                    cadastrado.
                                  example: maria.souza@empresa.com.br
                              required:
                                - id
                                - fullName
                                - workEmail
                              additionalProperties: false
                            - type: 'null'
                          description: >-
                            Colaborador responsável pelo centro de custo. Nulo
                            quando não há responsável definido.
                      required:
                        - id
                        - companyId
                        - code
                        - name
                        - status
                        - responsibleEmployee
                      additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        example: 1
                      pageSize:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        example: 50
                      totalCount:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        example: 123
                      totalPages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        example: 3
                    required:
                      - page
                      - pageSize
                      - totalCount
                      - totalPages
                    additionalProperties: false
                required:
                  - data
                  - pagination
                additionalProperties: false
        '401':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                      - insufficient-scope
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - resource-not-found
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '413':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - payload-too-large
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - input-validation-error
                      - unprocessable-entity
                      - company-not-active
                  message:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        message:
                          type: string
                      required:
                        - key
                        - message
                      additionalProperties: false
                required:
                  - code
                  - message
                additionalProperties: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unknown
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: {}
      deprecated: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: key

````