Edit

Update the name, description and/or parent of a category

Tokens

This action requires the following tokens:

  • category-write

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
category Hash   The ID of the category to edit
name String   The new name of the category
description String   The new description of the category
parent Hash  

The new parent category for the category

This argument can be unset by providing an empty string

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash Category ID
name String The name of this category
description String the description of this category
datecreated DateTime When this category was created
datemodified DateTime When this category was last modified
parent

The parent of this category, if any

The value of this field is an object containing the following fields:

Name Type Description
id Hash Category ID
name String The name of this category
account

The Account associated with this category

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
customer

The Customer associated with this category

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_CATEGORY_NOT_FOUND (210)
If the category specified in “parent” or the category specified by “ID” can not be found
STATUS_CATEGORY_PARENT_WRONG (211)
If the category specified in “parent” would result in a cycle