How to bulk upload product and categories

4 min. readlast update: 11.11.2025

Bulk Upload API Documentation

1. Overview

The Bulk Upload API allows you to create multiple products and categories in a single request using either XLSX or CSV file formats.

  • Categories and products are processed in order.

  • Products automatically inherit the category from the most recent category row above them.


2. Template

3. File Format

3.1 Supported Formats

  • XLSX — Excel 2007 and later

  • CSV — Comma-separated values

3.2 Row Types

Each row must include a Type column that specifies one of the following:

Type Description
CATEGORY Creates a new top-level category
SUBCATEGORY Creates a subcategory under a parent category
PRODUCT Creates a new product under the most recent category/subcategory

4. Column Definitions

4.1 Category Rows

Column Type Required Max Length Description
Type String Yes - Must be "CATEGORY"
Position Integer No - Display order (defaults to 1)
Name String Yes 200 Category name
Description String No 1000 Category description
ParentId Integer No - Not used for top-level categories (always null)

Auto-generated fields:

  • categoryUrl — Generated from name-menuId (e.g., "chicken-dishes-44")

  • categoryId — Auto-incremented primary key

  • parentCategoryId — Always null for CATEGORY type


4.2 Subcategory Rows

Column Type Required Max Length Description
Type String Yes - Must be "SUBCATEGORY"
Position Integer No - Display order (defaults to 1)
Name String Yes 200 Subcategory name
Description String No 1000 Subcategory description
ParentId Integer No - Explicit parent category ID (must exist)

Parent Assignment Logic

  • If ParentId is provided → Uses that specific parent category (must exist).

  • If ParentId is empty → Inherits from the most recent CATEGORY row above.

  • If neither exists → Validation error.

Auto-generated fields:

  • categoryUrl — Generated from name-menuId

  • categoryId — Auto-incremented primary key


4.3 Product Rows

Column Type Required Max Length Description
Type String Yes - Must be "PRODUCT"
Name String Yes 240 Product name
Description String No 1000 Product description
Price Decimal No - Product price (max 2 decimal places)
CategoryId Integer No - Explicit category ID (must exist in database)

Category Assignment Logic

  • If CategoryId is provided → Uses that specific category/subcategory (must exist).

  • If CategoryId is empty → Inherits from the most recent CATEGORY or SUBCATEGORY row above.

  • If neither exists → Validation error.


5. Character Validation

Both Name and Description fields accept:

✅ Allowed:

  • Letters (including accented characters: é, ñ, ü, etc.)

  • Numbers (0–9)

  • Spaces

  • Common punctuation: , . - ' & ( ) [ ] /

  • Line breaks and tabs

❌ Not allowed:

  • Special symbols like @ # $ % ^ * = + { } | \ ; : " < >


6. Example Files

6.1 XLSX Format

Example 1 — Category Inheritance

Products inherit the category from the row above.

Type Position Name Description Price CategoryId
CATEGORY 1 Chicken Dishes All chicken-based items    
PRODUCT   Chicken Tikka Spicy grilled chicken 12.99  
PRODUCT   Chicken Korma Mild creamy curry 11.99  
CATEGORY 2 Vegetarian Meat-free options    
PRODUCT   Paneer Tikka Grilled cottage cheese 10.99  
PRODUCT   Aloo Gobi Potato and cauliflower 8.99  
 

Example 2 — Explicit Category ID

Type Position Name Description Price CategoryId
PRODUCT   Chicken Tikka Spicy grilled chicken 12.99  651
PRODUCT   Chicken Tikka Spicy grilled chicken 12.99 651
PRODUCT   Chicken Tikka Spicy grilled chicken 12.99  655
 

Example 3 — Subcategories (Parent Inheritance)

Type Position Name Description Price CategoryId
CATEGORY 1 Indian Cuisine Traditional dishes    
SUBCATEGORY 1 Chicken Chicken dishes    
PRODUCT   Chicken Tikka Spicy grilled chicken 12.99  
PRODUCT   Chicken Korma Mild creamy curry 11.99  
SUBCATEGORY 2 Vegetarian Meat-free options    
PRODUCT   Paneer Tikka Grilled cottage cheese 10.99  
PRODUCT   Aloo Gobi Potato and cauliflower 8.99  

Example 4 — Explicit ParentId for Subcategories

Type Position Name Description Price CategoryId
SUBCATEGORY 1 Spicy Options For existing. category   651
PRODUCT   Ghost Pepper Dish Very spiy 15.99  
 

6.2 CSV Format

Example 1 — Category Inheritance

 
Type,Position,Name,Description,Price,CategoryId CATEGORY,1,Chicken Dishes,All chicken-based items,, PRODUCT,,Chicken Tikka,Spicy grilled chicken,12.99, PRODUCT,,Chicken Korma,Mild creamy curry,11.99, CATEGORY,2,Vegetarian,Meat-free options,, PRODUCT,,Paneer Tikka,Grilled cottage cheese,10.99, PRODUCT,,Aloo Gobi,Potato and cauliflower,8.99,

Example 2 — Explicit Category ID

 
Type,Position,Name,Description,Price,CategoryId PRODUCT,,Special Dish,Limited time offer,15.99,651 PRODUCT,,Chef's Special,House specialty,18.99,651 PRODUCT,,Vegan Bowl,Plant-based meal,12.99,655

Example 3 — With Subcategories

 
Type,Position,Name,Description,Price,CategoryId/ParentId CATEGORY,1,Indian Cuisine,Traditional dishes,, SUBCATEGORY,1,Chicken,Chicken dishes,, PRODUCT,,Chicken Tikka,Spicy grilled chicken,12.99, PRODUCT,,Chicken Korma,Mild creamy curry,11.99, SUBCATEGORY,2,Vegetarian,Veggie options,, PRODUCT,,Paneer Tikka,Grilled cottage cheese,10.99,

CSV Notes:

  • Empty cells must still have commas (e.g., PRODUCT,,Name,Description,Price,)

  • If a field contains commas, wrap it in quotes — e.g. "Chicken, Grilled"

  • Position, Price, and CategoryId may be left empty

Was this article helpful?