Integration by CSV or XML stream

Introduction

The products available on your website can be uploaded on Spartoo either by CSV or XLM flux.
In this case, the CSV or XLM file containing all of your product information must be available on the internet and accessible by our processor.

Every hour, our processor will download the file and it will integrate the information contained within the file.
The file must be as up to date as possible to prevent unavailable items from appearing as in stock on Spartoo.

The file must contain all the information necessary to categorise your products and quantify your stock.

Each field can be either obligatory, recommended, or optional. If one of the obligatory fields is empty or incorrectly filled in, the product will not be uploaded.
At the end you will find a few example CSV and XML file models. The file example is not used by Spartoo. However, your file must contain all of the obligatory information.

Ideally, your file should use UTF-8 encoding. If this isn't the case, please let us know so that we can configure the uploading of your file.
For CSV files, the file should use the semicolon ';'. If this is not the case, please let us know so that we can configure the uploading of your file.


If you do not have a file sharing server (ftp server) Spartoo advises you to use Dropbox.
more information

Definition

  • Product or Parent product : For Spartoo, a product refers to a style and a colour.
    So, for a style that comes in two colours, there will be two products (and two different product identification codes)
    However, a product can have multiple sizes.

  • Child product: For Spartoo, a child product refers to a product and a specific size.
    So, for a style that comes in one colour and two sizes, there will be two "child products"(one product identification code and two child product identification codes)
    The stock must be associated with a child product. This is the only required information for child products. Other information essentially concerns parent products and it may be omitted for child products.

Information List for CSV flux

Field Name Field Description
SKU / Product code Required The SKU identifies each parent product.
It can contain alphanumeric characters as well as the following characters: - (hyphen); _ (underscore); and . (full stop).
A code may be provided for each child product (the code EAN for example), but it is not required.
Parent / Child Required for CSV This field is required if the file contains one line per product and one line per child product.
In this case, you must give us a way to determine if the line is a parent product or a child product.
For example, this field can contain the word "Parent" for parent products and "Child" for child products.
Parent SKU Required for CSV This field is required if the file contains one line per product and one line per child product.
For each child product, you must give us a way to determine which parent product corresponds to which child product.
This field must contact the product code of the parent product.
Style name Recommended This field must only contain the style name, it must not contain any other information (category, colour, brand)
Brand name Required
Gender Required The product gender. Please use the following codes:
  • H : Men
  • F : Women
  • M : Unisex adult
  • B : Boys
  • G : Girls
  • K : Unisex children
Product price Required Must be in the following currency'EUR'.
The price only applies to the parent product. It is not possible to have different prices for child products.
Category Required Contains the category code of the product.
If you cannot provide the Spartoo code, you can put the category name. In this case, you must use the category matching tool to make your categories correspond with Spartoo's categories.

See the list of all category codes
Discount Recommended May contain the desired discount rate or the discounted price.
All discounts are rounded down by Spartoo in increments of 5%. For example, a discount rate of 27% will be rounded down to 25%.
Sale dates Optional Sales may be configured with a start date and an end date.
If the dates are not specified, the sale will start immediately.
During the sale period, it is useful to indicate the start of the sale date so that the discounts will start at the right time without you having to wait until the next file is uploaded.
Size Required Contains the size name of the product.
If this field is not present, or it is empty, the product will be considered as having one size.
In the case of US clothing sizes, we must have a way to distinguish whether the sizes are EU or US sizes: either indicate "US" in the size name, or add a field that indicates if the size is a US size or not.
Stock Quantity Required For each size, the stock must be specified.
To deactivate a product, you must put the stock at 0.
When the stock is 0, the product is deactivated, and it will no longer appear on Spartoo.
Photos Required At least one photo is required.
We would recommend a minimum of 3 photographs. We can integrate a maximum of 8 photos.
You must provide us with a link to the photo. The photo will only be uploaded once, and it will then be saved on our server. Once it is on our server, we will resize it to the dimensions shown on Spartoo.
The photos must be jpg format, square, and a minimum of 350x350 pixels. If the size is equal to or larger than 800x800 pixels, there will be a zoom view on the website.The file name must contain only alphanumeric characters as well as the characters "-" (hyphen), "_" (underscore) and "." (point). Accented letters (eg é, à and ñ) are not allowed.
Product description Recommended Text description of the product.
The product description allows you to add as much information as possible regarding the products, in order to help the customer when making a purchase decision.
A detailed and specific description for each product. For this, the description can contain the name of the model, the brand, the colour, the style of the product, the material, etc.
It is not possible to insert HTML, with the exception of line breaks:
, ainsi que , et . Javascript is not authorised.
It will be visible on the product page.
Colour filter Recommend Spartoo colour code. Used for the menu filters.
If this code is not provided, you may use the colour matching tool to match your colour names with Spartoo colours.

See the list of all colour codes
Colour Recommended Text field for the colour. Will be shown on the product page.
Material Optional Only for shoes.
We can include 4 different compositions:
  • Upper material
  • Lining material
  • Insole material
  • Outer sole material
We do not have a matching tool for materials, you are required to use the Spartoo codes.

See the list of composition codes
Heel height Optional Only for women's footwear products (pumps, boots, etc ...)
Height of the heel in centimetres. It is necessary to indicate only the figure and to use a point to separate the unit from the decimals (example: 1.7)
Season Required for MPO Product season, composed of a code "AH" (Autumn-Winter) or "PE" (Spring-Summer) followed by the year.
(ex: AH21, PE22)

List of information for XML feeds

Tag Description Required
reference_partenaire Merchant product code. It is the sku that identifies a product of a brand in a precise color
The product code may only contain alphanumeric characters as well as the following symbols: - (hyphen); _ (underscore); and . (full stop).
Yes
product_name Style name
Must not contain the category, colour, or brand of the product
No
manufacturers_name Name of the product brand Yes
product_sex Product gender
> See all possible values
Yes
product_price Product price in euros (not compulsory for size prices) Yes / Non
color_id Colour for menu filters
If the colour is not specified, the product will not show up if a customer uses the filter by colour
> See all possible values
No
product_style Product category
> See all possible values
Yes
product_description Product description. Appears on the product page. No
product_color Text field for the colour. Appears on the product page. No
product_quantity Total stock of a product
Ignore if one or more size_quantity markers are detected for the product.
For one-size products, a product_quantity marker is necessary when the size_quantity is not given.
No
size List of sizes and their stock.
Optional for products with sizes (Bags/Accessories). Otherwise required.
Non / Oui
size_name Size name
> See all possible values
Yes
size_quantity For each size, the number in stock must be specified.
To deactivate a product, set the stock at 0.
The product will then no longer appear on Spartoo.
Yes
size_reference Reference of product size.
This field is only used for the exporting of orders and returns. A good idea is to generate this reference by combining the fields reference_partenaire and size_name with an underscore "_".
No
ean EAN of product size No
photos List of photos and their url.
At least one photo is needed.
However, we recommend a minimum of 3 photos. A maximum of 8 photos can be included.
The photo will only be uploaded once, then stored on our servers once it has been resized to fit Spartoo dimensions.
Photos must be in jpg format, square and a minimum of 350x350 pixels. If they are above or equal to 800x800 pixels, a zoom will be available on the site.
Yes
url1, url2 ... url8 Links to the photos
You must provide one link per photo. Only alphanumeric characters and the characters "-" (dash), "_" (underscore) and"." (full stop) can be included in the file name. Spaces and accented letters (e.g. é, à, ñ) are not allowed.
Yes
heel_height Heel height in centimetres (cm). Only for women's shoes. Must be a multiple of 0,5. No
product_composition Material of the product upper. Only for shoes.
> See all possible values
No
voering_composition Material of the product lining. Only for shoes.
> See all possible values
No
first_composition Material of the product insole. Only for shoes.
> See all possible values
No
zool_composition Material of the product outer sole. Only for shoes.
> See all possible values
No
discount Allows you to apply a promotion to a product or size.
The field rate in the discount field applies to the discount by percentage with regards to the field product_price.
The field price_discount in the discount concerns the discounted price of the fixed product. The discount percentage displayed will be calculated.
If both fields are present, the price_discount field takes precedence over the rate field.
If the discount is to start immediately, there's no need to fill in the field start date. If the stopdate field is not specified, the promotion will have a default duration of one month. If the field sales is specified, the offer will be a sales discount. Otherwise, it will be a standard offer. By defining this parameter, the item will appear on the sale page during the sales.
No
extra_infos Specify additional information depending on the type of product.
Each information is constituted by an id ( > See values ) and a numerical value.
No
selections Specify the context of use thanks to a id list
All the possible id are available here.
No


XML parameter format


The text fields must be protected by CDATA tags if they contain special characters that would make the XML invalid.

Format single country

<root>
   <products>
	   <product>
			<reference_partenaire>string</reference_partenaire>
			<product_name>string</product_name>
			<manufacturers_name>string</manufacturers_name>
			<code_idu>string</code_idu>
			<product_sex>char</product_sex>
			<product_price>float</product_price>
			<product_quantity>int</product_quantity>
			<color_id>int</color_id>
			<product_style>int</product_style>
			<product_description>string</product_description>
			<product_color>string</product_color>
			<heel_height>float</heel_height>
			<country_origin>int</country_origin>
			<code_hs>int</code_hs>
			<size_list>
				<size>
					<size_name>string</size_name>
					<size_quantity>int</size_quantity>
					<size_reference>string</size_reference>
					<ean>string</ean>
					<code_hs>int</code_hs>
					<product_price>float</product_price>
					<discount>
						<startdate>timestamp</startdate>
						<stopdate>timestamp</stopdate>
						<price_discount>float</price_discount>
						<rate>int</rate>
						<sales/>
					</discount>
				</size>
				<!-- ... Multiple "size" tags possible ... -->
			</size_list>
			<product_composition>int</product_composition>
			<voering_composition>int</voering_composition>
			<first_composition>int</first_composition>
			<zool_composition>int</zool_composition>
			<photos>
			   <url1>url</url1>
			   <url2>url</url2>
			   <url3>url</url3>
			   <url4>url</url4>
			   <url5>url</url5>
			   <url6>url</url6>
			   <url7>url</url7>
			   <url8>url</url8>
			</photos>
			<discount>
			   <startdate>timestamp</startdate>
			   <stopdate>timestamp</stopdate>
			   <price_discount>float</price_discount>
			   <rate>int</rate>
			   <sales>0/1</sales>
			</discount>
			<extra_infos>
				<info>
					<id>int</id>
					<value>float</value>
				</info>
				<!-- ... Multiple "info" tags possible ... -->
			</extra_infos>
			<selections>
				<selection>int</selection>
				<!-- ... Multiple "selection" tags possible ... -->
			</selections>
	   </product>
	   <!-- ... Multiple "product" tags possible ... -->
   </products>
</root>


Format multi country

<root>
   <products>
	   <product>
			<reference_partenaire>string</reference_partenaire>
			<manufacturers_name>string</manufacturers_name>
			<product_sex>char</product_sex>
			<product_quantity>int</product_quantity>
			<color_id>int</color_id>
			<product_style>int</product_style>
			<heel_height>float</heel_height>
			<country_origin>int</country_origin>
			<code_hs>int</code_hs>
			<languages>
				<language>
					<code>string</code>
					<product_name>string</product_name>
					<product_description>string</product_description>
					<code_idu>string</code_idu>
					<product_color>string</product_color>
					<product_price>float</product_price>
					<discount>
					   <startdate>timestamp</startdate>
					   <stopdate>timestamp</stopdate>
					   <price_discount>float</price_discount>
					   <rate>int</rate>
					   <sales />
					</discount>
				</language>
				<!-- ... Multiple "language" tags possible ... -->
			</languages>
			<size_list>
				<size>
					<size_name>string</size_name>
					<size_quantity>int</size_quantity>
					<size_reference>string</size_reference>
					<ean>string</ean>
					<code_hs>int</code_hs>
					<languages>
						<language>
							<code>string</code>
							<product_price>float</product_price>
							<discount>
								<startdate>timestamp</startdate>
								<stopdate>timestamp</stopdate>
								<price_discount>float</price_discount>
								<rate>int</rate>
								<sales/>
							</discount>
						</language>
						<!-- ... Multiple "language" tags possible ... -->
					</languages>
				</size>
				<!-- ... Multiple "size" tags possible ... -->
			</size_list>
			<product_composition>int</product_composition>
			<voering_composition>int</voering_composition>
			<first_composition>int</first_composition>
			<zool_composition>int</zool_composition>
			<photos>
			   <url1>url</url1>
			   <url2>url</url2>
			   <url3>url</url3>
			   <url4>url</url4>
			   <url5>url</url5>
			   <url6>url</url6>
			   <url7>url</url7>
			   <url8>url</url8>
			</photos>
			<extra_infos>
				<info>
					<id>int</id>
					<value>float</value>
				</info>
				<!-- ... Multiple "info" tags possible ... -->
			</extra_infos>
			 <selections>
				<selection>int</selection>
				<!-- ... Multiple "selection" tags possible ... -->
			</selections>
	   </product>
	   <!-- ... Multiple "product" tags possible ... -->
   </products>
</root>


File Examples

CSV files

CSV file with classic parent / child product

Fichier CSV Multi pays

XML files

XML file example

File example XML Multi country

Files XSD

File XSD Multi country

List of product error codes
Code Level Description
1 Fatal Kumppaniviittaus ei ole tarpeeksi pitkä
2 Fatal Kumppani viittaus ei kelpaa, se voi sisältää vain kirjaimia ja numeroita
3 Warning Tuotteen nimeä ei ole määritelty
4 Fatal Merkkiä ei ole määritelty
5 Fatal Tyyppi XXX ei ole mahdollinen, ainoat mahdolliset ovat: H , F , M, K , G , B
6 Fatal Hinnan tulee olla merkitty numeroin
7 Fatal Hinnan tulee olla positiivinen
8 Warning Hinta vaikuttaa todella suurelta ( > 1000€ )
9 Fatal hinnan tulee olla kokonaisnumero
10 Fatal Hinnan tulee olla myönteinen
11 Warning Väri xxx ei ole olemassa: tuotetta ei ole saatavilla värisuodatimessa
13 Fatal Kategoriaa xxx ei ole
14 Warning Tuoteseloste on tyhjä
15 Warning Värimääritelmä on tyhjä
16 Warning Ei kokolistaa: valitse yksi koko
17 Warning Koostumus on määritelty, mutta ei kelpaa
18 Fatal Kuva 1 vaaditaan
19 Warning Alennuksen tulee olla välillä 0 ja 100, alennusta ei otetan huomioon
20 Warning Kokoa xxx ei ole
200 Fatal
201 Fatal EAN-koodi on pakollinen
202 Fatal EAN-koodia xxx tuoteviitteessä xxx koossa xxx on jo käytetty.
203 Warning EAN-koodi on liian lyhyt tai päättyy numeroon "000".
204 Warning EAN-koodia xxx on olemassa useita kopioita.
205 Fatal Kumppaniviite liian pitkä
23 Warning Kuva xxx on pienempi kuin 350x350: laatu tulee olemaan huono nettisivulla
24 Warning Kuva xxx on pienempi kuin 350x350: sitä ei näytetä nettisivustolla
25 Fatal Koko xxx: Mahdoton säätää varastossa
26 Fatal Ei saatavilla : tuote ei tule saataville
27 Fatal Pääsy mahdoton kuvaan 1 (url xxx)
28 Warning Pääsy mahdoton kuvaan xxx (url xxx)
281 Fatal
30 Fatal Koon xxx määrä on liian suuri (Max määrä : xxx)
31 Warning Käyttäjätilinne ei ole aktiviinen sivustolla xxx
32 Fatal Tälle tuotteelle ei löytynyt tietoja
33 Fatal xxx sukupuolen tuote ei voi olla kategoriassa xxx
34 Fatal Sana xxx on estolistalla ja sen ei tulisi näkyä tuotteen nimessä.
35 Fatal Tuotteen nimi on liian pitkä, sen tulee sisältää ainoastaan mallin nimi. Virhe esiintyy seuraavissa maissa: xxx
341 Fatal Sana xxx on estolistalla ja sen ei tulisi näkyä tuotekuvauksessa.
36 Fatal Tuotetta ei voitu tuoda: tuotteesta on jo olemassa sama koko/väripari
38 Fatal Koko xxx voidaan asettaa vain kerran tuoteviitteelle xxx
39 Warning The partner reference is present several times in the flow, duplicates have been ignored
42 Warning Kausi ei ole voimassa oleva
43 Warning Tuotetiedot xxx vastaavat product_type = xxx ja ei xxx.
44 Warning Kategoria xxx ei vastaa tuotetyyppiä xxx.
451 Fatal Ei hintaa koolle xxx koodissa xxx. (pakollinen alennukseen)
452 Warning Alennuksen päättymispäivä on saavutettu koolle xxx maassa xxx.
453 Fatal "rate" (xxx) ei kelpaa xxx:lle koodissa xxx.
454 Fatal "rate" (xxx) > 85 % koolle xxx maassa xxx.
455 Warning Koolla xxx on hinta maassa (xxx), jota ei ole määritetty tuotteelle.
456 Warning Koon xxx hinta koodilla xxx on sama kuin maasi maailmanlaajuinen hinta.