Product Categories API

List product categories

List all product categories for an account:

GET /product_categories

Response

Status: 200 OK
[
  {
    "id": 301,
    "sourceID": null,
    "name": "IP Address",
    "group": "Address",
    "reference": "address/ip_address",
    "rule_set": "logical_asset_without_financial_data",
    "created_at": "2015-09-10T12:15:16-05:00",
    "updated_at": "2015-09-14T12:31:27-05:00",
    "localized_group": "Address",
    "localized_name": "IP Address"
  },
  {
    "id": 312,
    "sourceID": null,
    "name": "Desktop PC or Workstation",
    "group": "Computer",
    "reference": "computer/desktop_pc_or_workstation",
    "rule_set": "physical_asset",
    "created_at": "2015-09-10T12:15:16-05:00",
    "updated_at": "2015-09-10T12:15:16-05:00",
    "localized_group": "Computer",
    "localized_name": "Desktop PC or Workstation"
  },
  "..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of product categories.

Collection Fields

By default the following fields will appear in collections of product categories:

id sourceID name group rule_set reference created_at updated_at

Obtain a different set of fields using the ?fields=parameter.

Filtering

Filtering is available for the following fields:

id source sourceID reference rule_set created_at updated_at disabled name

The filters on source, sourceID, reference and name are not case sensitive.

Sorting

By default a collection of product categories is sorted ascending by name.

The following fields are accepted by the ?sort=parameter:

id sourceID rule_set reference created_at updated_at

Get a single product category

GET /product_categories/:id

Response

Status: 200 OK
{
  "id": 312,
  "source": "4me",
  "sourceID": null,
  "name": "Desktop PC or Workstation",
  "disabled": false,
  "picture_uri": null,
  "group": "Computer",
  "reference": "computer/desktop_pc_or_workstation",
  "rule_set": "physical_asset",
  "created_at": "2015-09-10T12:15:16-05:00",
  "updated_at": "2015-09-10T12:15:16-05:00",
  "localized_group": "Computer",
  "localized_name": "Desktop PC or Workstation"
}

The response contains these fields.

Create a product category

POST /product_categories

When creating a new product category these fields are available.

Response

Status: 201 Created
{
  "id": "...",
  "...": "..."
}

The response contains all fields of the created product category and is similar to the response in Get a single product category

Update a product category

PATCH /product_categories/:id

When updating a product category these fields are available.

Response

Status: 200 OK
{
  "id": "...",
  "...": "..."
}

The response contains all fields of the updated product category and is similar to the response in Get a single product category

Fields

created_at
Readonly datetime — The date and time at which the product category was created.
disabled
Optional boolean, default: false — The Disabled box is checked when the product category may not be related to any more products.
group
Required string (max 255) — The Group field is used to include the product category in a group.
id
Readonly integer — The unique ID of the product category.
localized_group
Readonly string (max 64KB) — Translated Group in the current language, defaults to group in case no translation is provided.
localized_name
Readonly string (max 255) — Translated Name in the current language, defaults to name in case no translation is provided.
name
Required string (max 255) — The Name field is used to enter the name of the product category.
picture_uri
Optional string — The hyperlink to the image file for the product category.
reference
Readonly string (max 80) — The Reference field is automatically set to the concatenation of the Group field value and the Name field value, separated by a forward slash, written in lower case characters and with all spaces replaced by an underscore character.
rule_set
Required enum, default: none — The Rule set field is used to select a set of rules that are to be applied to the products to which the product category is related, as well as the configuration items that are related to those products. The selected rule set dictates which fields are available for these product and configuration items. Valid values are:
  • physical_asset: Physical Asset
  • logical_asset_with_financial_data: Logical Asset with Financial Data
  • logical_asset_without_financial_data: Logical Asset without Financial Data
  • server: Server
  • software: Software
  • software_distribution_package: Software Distribution Package
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
ui_extension
Optional reference to UI Extension — The UI extension field is used to select the UI extension that is to be added to the products that are based on the product category.
updated_at
Readonly datetime — The date and time of the last update of the product category. If the product category has no updates it contains the created_at value.