CategoriasDeletar categorias

Deletar categorias

Deleta uma ou mais categorias customizadas da empresa autenticada. Cada item em changes identifica uma categoria a deletar. Se a categoria tiver estabelecimentos vinculados, é obrigatório informar moveTo para reatribuí-los a outra categoria antes da exclusão — omitir quando há estabelecimentos retorna 422.

curl -X DELETE "https://api-sandbox.contasimples.com/categories/v1/categories" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "changes": [
    {
      "categoryToDelete": 100323,
      "moveTo": {
        "categoryId": 200,
        "establishments": [
          10045,
          10046
        ]
      }
    },
    {
      "categoryToDelete": 100324
    }
  ]
}'
{}
DELETE
/categories/v1/categories
DELETE
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Token Bearer obtido via OAuth 2.0 Client Credentials. Formato: Bearer {token}

Token Bearer obtido via OAuth 2.0 Client Credentials. Formato: Bearer {token}
Content-Typestring
Required

The media type of the request body

Options: application/json
changesarray
Required

Lista de categorias a deletar. Deve conter ao menos um item.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Token Bearer obtido via OAuth 2.0 Client Credentials. Formato: Bearer {token}

Body

application/json
changesarray
Required

Lista de categorias a deletar. Deve conter ao menos um item.

Responses