We use cookies in order to give you the optimal experience of our website. Some of them are required for the operation of this site (e.g. in order to use the shopping cart). Others allow us to enhance our online offers and to display them efficiently. You can use the settings to determine which cookies you will permit. Further details can be found in our privacy policy.
Settings
  • Required
    These cookies are required for the functionality of this site, e.g. by making it possible to add products to the shopping cart. Furthermore, this type of cookie guarantees that you can log into your account and that you can stay logged in, in order to maintain access to your order details. Required cookies are exclusively used on this Website. No data is transferred to third parties.
  • Comfort
    These cookies allow the custom tailoring of certain features in order to enhance the user experience and simplify the use of our site.For instance, they make it easier to search for and find suitable products. Cookies used to enhance the user experience are exclusively used on this site and no data is passed on to third parties.
  • External Media
    We provide you additional media, e.g. videos or maps. This media is provided by third parties, who are using cookies.Cookies for external media is used by third parties or publishers. We do not have any control about this cookie usage.
  • Statistics
    In order to further improve our Website, we collect anonymous data for statistics and analysis. These cookies enable us to keep track of traffic which helps us improve the site systematically. For these purposes, only anonymous data is passed on to third parties.
  • Marketing
    Marketing cookies help us to inform you about interesting offers on other websites. Marketing cookies are used by third parties or publishers in order to present personalized adds.

Category Management in TYRIOS pim

Description:

A central element to manage products in TYRIOS pim is the category system. It is a hierarchical tree structure with one root node. A product can be assigned to as many categories as you want. 

Authentication

The API endpoints of TYRIOS are only available for authorized users. Therefore, the user must be authenticated. There are two different authentication types:

  • Authentication by BASIC authentication. The user account must have an activated REST API token. You need to send an appropriate BASIC authentication header.
  • Authentication by mobile app registration. You need to send an appropriate app registration token.

Required rights

To use this API, you need to have user credentials with category management rights. If you don't have these rights, you will get a 403 error code. The API is not available for external users without credentials.

Data structure

Shop categories are managed with ShopCategoryData structures. The ShopCategoryData is a nested sets data structure to support fast tree reads. That means, every ShopCategoryData has three fields:

  • nodeLeft
  • nodeRight
  • nodeLevel

With these fields, it is possible to request any subtree with only one SQL statement.

In addition to the ShopCategoryData, you might want to assign preview images to a category. This is done by assigning a MediahelperFile object.

Listing categories

To request a product, you need to call the GET endpoint

https://[instance]/service/ProductManagement/products

The request supports several GET parameters:

  • offset: offset of the product list, default 0
  • length: number of products provided, default 20,
  • filter: JSON object to filter for a specific fields. All product data fields are supported.
  • sorting: JSON object with field: ASC/DESC sorting definition

A request to filter based on material number will look like this:

https://[instance]/service/ProductManagement/products/?offset=0&length=5&filter={%22materialNumber%22:%221%22}&sorting={%22name_de%22:%22ASC%22}

You will retrieve the following data structure

{
	"products": [
		{
    		"id": 90,
    		"name_de": "Neuer Name De",
			"shortDescription_de": "Kurzbeschreibung",
    		"description_de": "Beschreibung",
			"price": 1.33,
			"ShopCategoryData": [
				{
					"id": 1,
					....
				}
			],
    		"mainMediaFile": {id: 136,...},
   			"MediahelperFile": [
				{id: 136,...}
			]
			....
		}
	],
	"count":20
}

The products are in the products fields, the count field gives you the information how many items are found.

Please be aware, that the concrete data structure depends on the instance as TYRIOS is an aspect oriented system.

get one specific category

You can request a specific product by using the GET endpoint

https://[instance]/service/ProductManagement/product/[productID]

You will, if the product exists, get a full data object for the product data

{
    "id": 90,
    "name_de": "Neuer Name De",
	"shortDescription_de": "Kurzbeschreibung",
    "description_de": "Beschreibung",
	"price": 1.33,
	"ShopCategoryData": [1,14],
    "mainMediaFile": 129,
    "MediahelperFile": [136,129]
	....
}

 

Create / update a category

You can create and update products using the same endpoint. You need to send a POST request.

https://[instance]/service/ProductManagement/product

If the id is not null, the system assumes that it needs to update an existing product. Else it creates a new one.

As payload, you only need to send a complete product object. In case you update an existing product, not provided fields are assumed to be empty.

{
    "id": 90,
    "name_de": "Neuer Name De",
	"shortDescription_de": "Kurzbeschreibung",
    "description_de": "Beschreibung",
	"price": 1.33,
	"ShopCategoryData": [1,14],
    "mainMediaFile": 129,
    "MediahelperFile": [136,129]
	....
}

Reference objects can be provided as object or by id.

Please keep in mind that the available fields depend on the instance. So it is not possible to describe the complete structure in this documentation.

Delete a category

If you want to delete a category and all sub categories, you need to send a DELETE request to the endpoint

https://[instance]/service/ShopCategoryManagement/category/[categoryD]

Solution:

Tips und Tricks:

Subscribe to our newsletter

Stay informed at all times. We will gladly inform you about product news and offers.