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

# Excluir Loja

> Aprenda a excluir uma loja da sua conta usando o endpoint DELETE /stores/{storeId}.

## 🗑️ Excluir Loja

Este endpoint permite **excluir uma loja** da sua conta.

Ele é ideal para:

* Remover lojas desativadas
* Encerrar operações de uma loja específica
* Manter o ambiente da conta organizado

## 🔐 Autenticação

Esta rota **exige autenticação** via **API Key**, enviada no header da requisição:

```http theme={null}
Authorization: SUA_API_KEY_AQUI
```

## 📥 Parâmetros de Rota

| Parâmetro | Tipo | Obrigatório | Descrição |
| - | - | - | - |
| `storeId` | `string` | Sim | ID da loja que será excluída. |

## 📋 Exemplo de Requisição

```bash theme={null}
curl --location --request DELETE "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
--header "Authorization: SUA_API_KEY_AQUI"
```

## 📊 Exemplo de Resposta (200)

```json theme={null}
{
	"code": "STORE_DELETED"
}
```

## ❌ Possíveis Erros

| Status | Code | Quando acontece |
| - | - | - |
| `400` | `INVALID_DATA` | `storeId` não foi enviado corretamente. |
| `401` | `API_KEY_NOT_PROVIDED` | Header `Authorization` não enviado. |
| `401` | `INVALID_API_KEY` | API Key inválida ou não encontrada. |
| `401` | `UNAUTHENTICATED` | Sessão/usuário não autenticado no contexto da requisição. |
| `403` | `USER_DISABLED` | Conta do usuário desativada ou excluída. |
| `403` | `NO_ACTIVE_SUBSCRIPTION` | Conta sem plano ativo. |
| `404` | `STORE_NOT_FOUND` | Loja não existe, foi removida ou não pertence à sua conta. |
| `429` | `RATE_LIMIT_EXCEEDED` | Limite de requisições por minuto do plano excedido. |
| `500` | `INTERNAL_SERVER_ERROR` | Falha interna ao processar a requisição. |
| `503` | `SERVICE_UNAVAILABLE` | Serviço temporariamente indisponível. |

## 🔗 Links Úteis

* [Documentação de Autenticação](https://docs.cabrapi.com.br/pages/pt-BR/api-reference/authorization.md)
* [Buscar Lojas](https://docs.cabrapi.com.br/pages/pt-BR/api-reference/store/get.md)
* [Obter Loja por ID](https://docs.cabrapi.com.br/pages/pt-BR/api-reference/store/get-by-id.md)
* [Criar Loja](https://docs.cabrapi.com.br/pages/pt-BR/api-reference/store/post.md)
* [Atualizar Loja](https://docs.cabrapi.com.br/pages/pt-BR/api-reference/store/put.md)

Update: 28/02/2026 as 00:00


## OpenAPI

````yaml DELETE /stores/{storeId}
openapi: 3.1.0
info:
  title: caBRAPI
  version: 1.0.0
servers:
  - url: https://api.cabrapi.com.br/v1
security: []
paths:
  /stores/{storeId}:
    parameters:
      - in: path
        name: storeId
        required: true
        schema:
          type: string
          minLength: 1
          maxLength: 50
    delete:
      tags:
        - Stores
      summary: Delete store
      operationId: deleteStore
      parameters:
        - $ref: '#/components/parameters/StoreId'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: STORE_DELETED
                    type: string
                required:
                  - code
                type: object
          description: Store deleted (soft delete).
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: INVALID_DATA
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: API_KEY_NOT_PROVIDED, INVALID_API_KEY, UNAUTHENTICATED
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: USER_DISABLED, NO_ACTIVE_SUBSCRIPTION
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: STORE_NOT_FOUND
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Service unavailable.
      security:
        - ApiKey: []
components:
  parameters:
    StoreId:
      in: path
      name: storeId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 50
  schemas:
    Error:
      properties:
        code:
          example: STORE_NOT_FOUND
          type: string
      required:
        - code
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: Authorization
      type: apiKey
      x-default: YOUR_API_KEY_HERE

````

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