> ## 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.

# Remover centro de custo

> Exclui um centro de custo. As linhas e os colaboradores vinculados a ele são transferidos para o centro de custo informado em `replacementId`; quando `replacementId` é `null`, ficam sem centro de custo.



## OpenAPI

````yaml api-reference/v3/openapi.json DELETE /api/v3/cost-centers/{id}
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/{id}:
    delete:
      tags:
        - Public API
      description: >-
        Exclui um centro de custo. As linhas e os colaboradores vinculados a ele
        são transferidos para o centro de custo informado em `replacementId`;
        quando `replacementId` é `null`, ficam sem centro de custo.
      operationId: publicDeleteCostCenterV3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                replacementId:
                  description: >-
                    Centro de custo que recebe as linhas e os colaboradores
                    vinculados ao centro excluído. Envie `null` para deixá-los
                    sem centro de custo.
                  example: 0198c2f1-3815-45b7-9e60-8e137cad845c
                  type:
                    - string
                    - 'null'
              required:
                - replacementId
              additionalProperties: false
        required: true
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
        '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
                      - cost-center-cannot-merge-into-itself
                      - 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

````