CategoriesDelete categories

Delete categories

Deletes one or more custom categories for the authenticated company. Each item in changes identifies a category to delete. If the category has linked establishments, you must supply moveTo to reassign them to another category before deletion — omitting it when establishments exist returns 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

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}
Content-Typestring
Required

The media type of the request body

Options: application/json
changesarray
Required

List of categories to delete. Must contain at least one item.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Body

application/json
changesarray
Required

List of categories to delete. Must contain at least one item.

Responses