Product data – customer access via API
Questions:
- How can I query product data via API as a customer?
- How can product data be loaded into my online shop?
- How can I automatically download product images? Ask ChatGPT
Description:
TYRIOS offers customers the opportunity to access all product data via API. Not only the basic data is made available to the customer, but also all product information such as descriptions, images, PDF downloads and more. The aim is for the customer to not only be able to import data for a small merchandise management system, but also for a complete import for their own online shop to be possible.
This knowledge base entry describes the structure of the product data in detail:
URL structure:
If you have been granted access to the customer product API by the shop operator, you can retrieve the products via the following URL:
https://[shop-url]/services/ProductManagement/UserProductData
As the name of the interface suggests, the interface is personalised. You will therefore be shown the prices that apply to you directly.
Pagination
The product interface is paginated to limit the product quantity. There are two parameters for pagination:
offset: defines the first product to be delivered
length: defines the number of products to be delivered
Language
By default, TYRIOS delivers the products in the language stored in your user account. If the shop supports other languages, you can request the data in this language as an alternative:
long: defines the language in which the product data should be delivered (e.g. "de" for German, "en" for English). If the language is not stored, the product is delivered in German.
Mode
You can query the product data so that all products can be retrieved at once or alternatively by category. The second mode allows you to integrate the product data in real time without having to import the data into your own merchandise management system. This makes displaying the products on your website even easier. This is because only the current data is ever displayed.
mode: defines the mode. Possible values: "category": allows filtering at category level, "product": allows filtering at product level (default)
Filter
The interface allows you to filter the data depending on the mode. To do this, you only need to pass a JSON structure for filtering with the structure "Field name => Filter value".
filter: defines the filter as a JSON structure. E.g. "filter={'ean': '123456789'}"
Authentication
Depending on the shop operator's settings, you can only query the product data as an authenticated user. In any case, your personal prices are only visible as an authenticated user.
For authentication, you need an API secret in addition to your user name, which must be communicated to you by the shop operator. Both together must be transferred to TYRIOS in the form of a basic authentication.
Data structure
Due to the complexity of the data, the result is provided as a JSON data structure. The syntax is as follows:
{products: [ { id: 123, materialNumber:"", title: "product title" link: "https://example.com/shop/product_title/2833/144/1" shortDescription: "...", description: "html code", additionalDescriptions: { /* here additional descriptions as key,value, potentially nested object structure */}, images: ["https://..." /* path to full size images */], media: ["https://..." /* path to media downloads (only if public!) */] listPrice: 1.00, standardPrice: 0.37, /* standard price in net value */ price: 0.33, /* user specific price, including potential current offers */ tax: 19, ean: "", isbn: "", upc: "", brand: "", manufacturer: "", mpn: "", google_product_category: "...", availability: "", /stockState translated according to Google Feed stockCount: 22, /* only if activated for user */ deliveryCosts: [{name: "DHL", costs: "1.30"}], /* all possible delivery options with corresponding costs */ unit: "", energyEfficiencyClass: "", multiPack: 1, isBundle: true/false, isAdult: true / false, gender: "", ageGroup:"", pattern: "", material: "", colour: ["",""] size: "", sizeType: "", sizeSystem: "", width: , height: , depth: , weight: , unitPricingMeasure: , unitPricingBaseMeasure: , unit4unitPricing: , reorderable: , overbookable: , /* only if stock export enabled*/, customsTariffNumber: , countryOfOrigin: , stockable: true/false /*only if stock export enabled */, groupProduct: { groupID: 123, groupName: "groupName", dimensions: { size: "XL", colour: "red" } }, /* only of group product is assigned */ configurationParameters: [ { name: "Size", type: "selection", variants: [ { name: "Text", additionalPrice: 1.3 additionalDeliveryCosts: 0 isDefault: true } ] }, /** variants in parameters **/ { name: "Your name", type: "input" } /* free text input */ ] /* only if configuration parameters are assigned */ } ], count: 1853 }