1. Introduction
This documentation describes how to structure your data files — products, orders, returns, and related data — within our SFTP environment once your dedicated space has been provisioned. If you operate multiple shops (different brands, different countries, etc), please create a separate subfolder for each. Each shop exports into its own folder: two shops never write into the same folder. If you also need to separate multiple environments (e.g. production vs. a staging or dev store), see Section 2 below.Example Directory Structure
2. Separating Environments (dev / staging / prod)
If you send us data from more than one environment for the same shop, don’t mix their files in the same folder. Add one extra folder level, above your shop folders, named after the environment. We recognize three canonical environments:- Use exactly these three folder names —
dev,staging,prod— lowercase, no variants. Avoid synonyms likedevelopment,preprod,production,qa, ortest, since each variant otherwise has to be mapped by hand on our side. - You don’t need all three: create only the environment folders you actually send us data from (most clients only need
prod). - The environment folder sits above the shop/brand/country folders, not the other way around, and above the
products/orders/returnsfolders described in Section 4. - If you only have one shop in a given environment, you can skip the shop-level folder and place
products/orders/returnsdirectly under the environment folder (e.g./prod/products). - If you only ever send us production data, you don’t need an environment folder at all — the plain structure from Section 1 is enough.
- Confirm your environment folders with your Kleep contact when your access is provisioned, so they’re mapped correctly on our side from the first export.
- Only production data goes into
prod(or into the plain structure without environment folders). Test or sandbox exports go intodevorstaging, even during the first weeks. - If you move to another e-commerce platform or export tool, tell us before the first file from the new system arrives.
3. Data Transmission Schedule
Data files should ideally be transmitted daily between:- 02:00 AM
- 05:00 AM
4. File Organization Standards
Within each shop directory, please create the following folders:productsordersreturnsreturn_reasons(optional)misc(optional)
- The
return_reasonsfolder is used for export files containing additional return data such as reasons provided by customers. These exports are optional. - The
miscfolder can contain miscellaneous files. They are stored, not imported automatically. If you wish to use this folder, please discuss the hierarchy and structure with us beforehand to ensure compatibility.
Example Filename Format
5. Export Content Requirements
A detailed specification of expected fields, formats, and constraints for each dataset type is available in the Data Transfers: Template documentation. Key requirements for product catalog exports:- Every products file holds the whole catalogue, not only the changes since the previous export
- Export all product variants, including out-of-stock items
- Keep products that are no longer sold in the file, with
activeset tofalse - Maintain complete variant information to enable proper sizing analysis
- Optionally add a deactivation flag for Kleep presence control
6. Handling Repeated Data Across Exports
Records may legitimately appear in multiple daily exports. For example, a given return may be included several times across different files. Our ingestion system automatically handles deduplication: when a record appears in several files, the most recently delivered file wins.7. Data Format Guidelines
All exports should be provided in CSV format. Other formats, compressed files included, are processed only by prior agreement with us. Excel files (.xlsx) are not accepted: they introduce formatting inconsistencies, such as barcodes turned into 1.23E+12.
- Header row: The first line of every file names the columns, with the field names of the template. Keep the same columns in the same order from one export to the next
- Separator: Comma (
,). If your tool can only write semicolons (;), tell us before the first export - Quoting: Put a value that contains the separator, a quote or a line break between double quotes (
"), and double the quotes inside it:"Shirt ""Oxford"", white" - Encoding: UTF-8, with or without a byte order mark (BOM)
- Datetime: Use ISO 8601 format:
YYYY-MM-DDTHH:MM:SSZ, example:2025-01-15T14:30:00Z. A time zone offset is fine too:2025-01-15T15:30:00+01:00 - Boolean values: Use
true/false(lowercase) orTrue/False - Decimal values: Use period (
.) for decimal separator. Example:129.99not129,99 - Null values: An empty cell when a value is missing. Never a placeholder such as
#N/A,N/A,nullor-
File Naming Convention
As specified in the SFTP Data Structure Documentation, use the following format:
products_2025-01-15T02-00-00.csvorders_2025-01-15T02-00-00.csvreturns_2025-01-15T02-00-00.csv
8. Exporting Historical Data
If you need to provide historical data (i.e., data that is not part of the daily exports), you may export up to one year of historical records for all data types, including:- Products
- Orders
- Returns
Example of a Complete SFTP Structure
Example With Multiple Environments
The same layout, once adev / staging / prod split (see Section 2) is added on top:
