Here we describe which data the v5-backend-import expects and which format it should have.
The backend import uses two data sources: the OSA Data Mongo for meta data and the v5 extractor service for feature data which itself takes a customer feed as input.
Here we provide a list of fields with their expected data types, whether they are required plus additional restrictions.
Field Name | Field Type | Required | Filter | Additional Info |
---|---|---|---|---|
picalike_id | str | Yes | exact | expected but not required format: <product_id>#<shop_id> |
shop_id | str | Yes | exact | expected but not required format: <shop_name>_<country_code>_feed |
category | List(List(str)) | Yes | ? | open problem: filter by subpath |
name | str | No | - | |
gender | List(str) | No | in | |
picalike_gender | List(str) | No | in | |
brand | str | No | exact | |
color | str | No | exact | should we provide the possibility to filter the color? |
images | List(str) | Yes | - | must be (>0) valid and useable image urls |
deeplink | str | (Yes) | - | |
price | List(int) | Yes | range | in cents; same len: price, available, size |
available | List(bool) | No | in | same len: price, available, size |
size | List(str) | No | in | same len: price, available, size |
List(Dict) | No | - | each dict contains the keys price , {filter_}size , avail{able} |
x_sizes
will not be used in the future.
price, available and size must have the same length. This means if they are provided as fields in the metadata they are either all lists of the same length or none of them is a list with length > 1. If they are provided via x_sizes, each item of x_sizes must contain all 3 keys.
All fields except picalike_id and shop_id are expected to be located inside the metadata
dict.
All fields have to be cleaned from whitespace etc.
How do customers expect the API results? In case of JSON, a list of products is returned, but the data in the product is already processed by the feed import and thus may not be identical to the data from the CSV feed. For example 'category' is a string in the feed, but we convert it to a list. 'size' might be a string of values like '34|36|39' but we convert it into a list.
The behavior will be defined in specific customer settings.