Product Management in TYRIOS pim
Questions:
- Product management using TYRIOS PIM
Description:
TYRIOS PIM is the central point of information for all your product-related data. It provides data for your POS system, your online shop and webpage, your offline advertisement, your digital signage system, your newsletters, and a lot more. To fulfill all these different requirements, it provides a very complex data structure to manage products with additional information like price offers, supplier linkage, image, and media information.
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 a valid app registration token.
Required rights
You need to have user credentials with product management rights to use this API. 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
To manage products, you typically have to deal with the following data structures
- product data
- ShopCategoryData
- MediahelperFile
- ProductDataOffer
Due to the aspect-oriented nature of TYRIOS, it might be possible that you have to deal with other classes. All data structures have an upper case first character.
Listing products
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 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 how many items are found.
Please note that the concrete data structure depends on the instance as TYRIOS is an aspect-oriented system.
get one specific product
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 product
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. If 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 objects 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.
Save a partial product.
If you want only to update some specific fields, you can update a product partially using a PUT request to the endpoint:
https://[instance]/service/ProductManagement/product
As payload, you only need to send these fields that need to be updated in addition to the product ID. Mediahelper files can be provided as IDs or MediahelperFile objects.
{ "id": 90, "name_de": "Neuer Name De", "mainMediaFile": 129, "MediahelperFile": [136,129] }
Delete a product
If you want to delete a product, you need to send a DELETE request to the endpoint
https://[instance]/service/ProductManagement/product/[productID]