Categories

Renames, re-describes or moves an item category; only the fields sent change.

Requires ManageInventory and an Idempotency-Key header. Same as editing the category (or dragging it in the tree) on the Item Categories page. Moving a category (parentCategoryId; 0 = top level) is refused when it would create a cycle, and recalculates every item's inherited parent categories. Template Builder-generated categories are managed by their Template Builder and cannot be changed here. Example: { "name": "Softwood", "parentCategoryId": 0 }.

patch/api/v1/categories/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/categories/{id}
  • Auth: HTTP bearer

Path parameters

idinteger required

Category id. Example: 4.

Request body

namestring nullable

New name, 1-100 characters (trimmed), unique among the categories with the same parent (case-insensitive).

descriptionstring nullable

New description, at most 2000 characters; "" clears it.

parentCategoryIdinteger nullable

New parent category id; 0 moves the category to the top level. The parent may not be the category itself or one of its descendants (no cycles), a system or a Template Builder-generated category.

Response

Changed; body is the category.

idinteger

Numeric category id, e.g. 4; the categoryId of items and the id used by /api/v1/categories/{id}/properties.

syncIdstring uuid

Globally unique sync id (GUID). Use it as the after pagination cursor.

namestring

Category name, e.g. "Lumber".

descriptionstring nullable

Optional description; null when unset.

parentCategoryIdinteger nullable

Id of the parent category; null for a top-level category.

isTemplateBuilderCategoryboolean

True when the category was generated by a Template Builder (its name and place in the tree are managed there, not on the Item Categories page).

createdAtstring date-time

UTC creation timestamp (ISO-8601).

updatedAtstring date-time nullable

UTC timestamp of the last edit of the category itself; null when never edited. Property changes do not move it.

Changes

No recorded changes to this operation across all 1 revision of this API.