Appearance
Full product export
A full product export can be requested by using the endpoint /shopwareexport. It is usually used to populate an e-commerce system. Continue reading to learn how to interpret the data.
Request body
The following properties must be sent with the POST request body:
json
{
"language": "de",
"country": "de",
"filename": "",
"factor": "0",
"groups": [
"D", "G", "V"
]
}language and country can be one of the following: de, en, fr, it, es, nl, pl, da, sv, fi, no, tr, ro, sk, ru, be, sk, et, hu, cz
filename: has no effect
groups: The articles are divided into 3 main groups/categories. You have to define the category you want to query with the request body.
D- Camping ShopG- Camper Van Conversion ShopV- Spare Part Shop
Query parameter
WARNING
A response usually takes between 5 and ten minutes. Make sure to not run into a timeout on your end. Therefore, we advise to request a rather large amount of rows (~5.000 - 10.000) since the request will take that long no matter the size. (Requesting only 1 row will still take some minutes).
rows(optional, default 0): Specifies the number ofarticle objectsreturned per page. (advised to use ~5.000)page(optional, default 0): Specifies the page index to return, where 0 is the index of the first page. Continue by iterating this parameter taking the propertytotal_pagesin themetaDataobject into account.flatternMaster(optional, default false) true/false: Should befalseif you want to retrieve the data in a hierarchical structure containing master articles.startDate(optional, default empty): Format is yyyy-mm-dd.endDate(optional, default empty): Format is yyyy-mm-dd.factordeprecated - but make sure to send this parameter empty, since not sending it might break or return no result.
Pagination can be achieved using the parameters page and rows.
WARNING
The API is paginated, but the pagination is not working properly.
How to understand the response of /shopwareexport
The response of this endpoint contains the following arrays and objects.
metaData- objectarticles- arraycategories- arrayclasses- objectcolumns- objectsuppliers- array
The metaData object - pagination
The response contains an object metaData. This object returns the following properties: Where the number of total_pages depends on the requests number of rows.
json
"metaData": {
"total_rows": 41214,
"total_pages": 9,
"start": 0,
"rows": 5000
}🐞 known issues:
- The
total_rowsandtotal_pagesmay not always be correct. Which means you will receive an emptyarticlesarray when requesting one of the last pages. When using the pagination you should stop after the first response where this empty array occurs.
The articles array
The response object contains an array called articles. The objects in this array contain information about articles. Therefore we will call them article objects.
An article object does contain a set of properties describing it in detail. To process such an object it is important to evaluate the property isMaster: Where "isMaster": 1 means that the article object is a master article (which in other concepts is also referred to as product). A master article groups together multiple articles. If the article object is a master article the array details contains the articles that it groups together.
INFO
Not all articles in the Reimo catalog are grouped into master articles.
The following example shows the article object M100554, which is a master article ("isMaster": 1). The array details contains four objects. The four objects are the articles: E100554, E100555, E100556, E100557
json
{
"metaData": {
"total_rows": 41214,
"total_pages": 41215,
"start": 0,
"rows": 1
},
"articles": [
{
...
"number": "M100554",
...
"details": [
{
...
"number": "E100554",
...
},
{
...
"number": "E100555",
...
},
{
...
"number": "E100556",
...
},
{
...
"number": "E100557",
...
}
],
...
"isMaster": 1,
...
}
],
...,
}🐞 known issues:
- If an article is present as a variant of a master article, it will later be repeated as a standalone article resulting in duplicate object for a single article number.
The categories array
The response object contains an array called categories.
One article can be related to multiple categories. Therefore each article contains an array with category keys:
json
"categories": [
"D",
"DC",
"DCA"
]There are three main groups as stated above in the request body section, that resemble the top level categories. Each group contains two more levels down. The categories array itself does not contain the hierarchy of the categories. It is a flat array of objects.
The hierarchy can be retrieved from the key of a category object: where the first level contains one letter e.g. D; the second level contains two letters e.g. DC and the third level contains three letters e.g. DC1 or DCA.
A category object has the following structure:
json
{
"key" : "DCA",
"name" : "Wintervorzelt",
"shortname" : null,
"active" : true,
"images" : [ {
"url" : "...",
"width" : 226,
"height" : 188,
"size" : 30891,
"id" : 4036080,
"thumbnails" : [ {
"url" : "...",
"width" : 200,
"height" : 200,
"size" : 1
}, {
"url" : "...",
"width" : 500,
"height" : 500,
"size" : 1
} ],
"description" : ""
} ],
"imagesHeader" : [ ],
"position" : 5
}positionis used for a custom sorting within a category hierarchy