Toshl Developer

Merge categories

Merge multiple categories into one. All entries and budgets with the selected categories will be updated. After merging the selected categories will be deleted.

Some related data is updated asynchronously. Clients can set an additional GET parameter immediate_update which dictates that those values should be updated immediately in current request. Such a request may take longer to complete.

POST /categories/merge

Required scope:

Parameters

categories
required
array

Category ids to merge.

category
required
string

Category id to merge selected categories into.

Request

$ curl https://api.toshl.com/categories/merge \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"categories": ["42", "43"], "category": "44"}'

Response

HTTP/1.1 204 No Content