Toshl Developer

Update category

Update a category. Some related data is updated asynchronously.

PUT /categories/{id}

Required scope:

Parameters

id *
required
string

Category id.

name *
required
string

Category name.

Max length: 255
name_override (deprecated)
optional
boolean

Is true if name is overriden with a custom name.

modified *
required
string

Specifies when the category was last modified.

type *
required
string

Category type.

Possible values: expense, income
extra
optional
object

A custom JSON object that you can use to extend Toshl API. Whatever you save into this field you will get back whenever you fetch it later.

* denotes required field/parameter.

Request

$ curl https://api.toshl.com/categories/42 \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d '{json}'

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "42",
  "name": "Entertainment",
  "modified": "2012-09-04T13:55:15Z",
  "type": "expense",
  "deleted": false,
  "counts": {
    "entries": 21,
    "tags": 5
  }
}