---
title: "Tutorial: Importing products"
slug: "tutorial-importing-products"
tags: ["product import", "Associate App", "integration", "catalog", "platform", "SFCC", "onboarding", "fulfillment", "tutorial", "api", "data import"]
updated: 2025-05-14T09:07:45Z
published: 2025-05-14T09:07:45Z
canonical: "docs.newstore.com/tutorial-importing-products"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.newstore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutorial: Importing products

The aim of this tutorial is to set up a product and a price book in the catalog. To import stock, see [this tutorial](/v1/docs/tutorial-importing-stock-information).

> [!NOTE]
> Important
> 
> We assume that you have an authentication token stored in the AUTH_TOKEN variable. Retrieve one with the following call:
> 
> ```plaintext
> export AUTH_TOKEN=$(curl -s <url>/v0/token -d \
> "grant_type=password&username=<myusername>&password=<mypassword>" | jq -r.access_token)
> ```

## Pre-requisites

The product and stock information is at the core of the features offered by NewStore. Providing incomplete product information can make your products unavailable internally in the platform and publicly via the Customer API.

The steps to import products and a price book are the following:

- [Creating the product](/v1/docs/tutorial-importing-products#creating-product-data)
- [Creating the price book](/v1/docs/tutorial-importing-products#creating-price-book-data)
- [Importing the data you created](/v1/docs/tutorial-importing-stock-information#running-the-import)

The first two steps create data JSON files for each entity and in the last step you'll use the [Import API](/v1/docs/importing-data#integ-importdata) to import the data you created.

### Creating product data

A product is imported into a `shop` and for a specific `locale`. In NewStore Omnichannel Cloud, a `shop` is a catalog which contains products, categories, and price books. Each store needs a `shop` assigned. Typically, retailers use the same `shop` per country.

The product details that you provide during import determine the product attributes that are displayed in NewStore applications.

`Categories` are imported with the product import into a `shop` and for a specific `locale`. Product categories may differ across different `sales channels`.

This tutorial shows how to import one product, to keep the payload example concise. The product you're going to import has three categories:

- **Shop > Dresses**, which is the main category for the product
- **Releases > SUMMER 1**
- **Special collection**

For a thorough description of these attributes, visit the [guide to managing products](/v1/docs/managing-products#managing-products).

#### Product information

In our case, we want to import a product called `Grace Sweater`, color beige and size 4. Let's imagine that we also have a variant of this product: beige and size 6. These two products will share the same `variant_group_id` and have different `variation_size_value` attribute value.

To represent this product in NewStore, the following product properties must be used correctly.

> [!NOTE]
> Important
> 
> Failing to use these properties correctly will prevent using the [Customer API](https://docs.newstore.net/api/integration/catalog-sfcc/consumer-api_api) or Omnichannel Manager to work with these products.

To import the product:

1. Create a new folder called `data`.
2. Save the following payload as a file named `products.json` in the `data` folder.

```json
{
    "head": {
        "shop": "storefront-catalog-en",
        "locale": "en-US",
        "is_master": true
    },
    "items": [
        {
            "product_id": "1000101",
            "variant_group_id": "variant_group_10001",
            "title": "Bohemian Print Cutout Chiffon Maxi Dress",
            "caption": "Our summer-ready chiffon dress features a bohemian print and beaded cut-outs for a textural twist to maxi styles. Full of creativity on every level, it offers delicate transparencies with a pleated hem for extra swish as you move through the summer heat.",
            "description": "Bohemian Print Chiffon Gathered Waist Silk Dress",
            "show_in_listing": true,
            "images": [
                {
                    "url": "https://mycompany/hoster/images/default/products/SU16/10001_014_Multi_OFR-1.jpg",
                    "internal_dimension_height": 2000,
                    "internal_dimension_width": 1414,
                    "internal_dominant_color": "#F4F2F4",
                    "is_main": true
                },
                {
                    "url": "https://mycompany/hoster/images/default/products/SU16/10001_014_Multi_OSP-2.jpg",
                    "internal_dimension_height": 2000,
                    "internal_dimension_width": 1414,
                    "internal_dominant_color": "#F4F2F4"
                }
            ],
            "tax_class_id": "standard",
            "categories": [
                {
                    "path": "Special collection"
                },
                {
                    "path": "Releases > SUMMER 1"
                },
                {
                    "path": "Shop > Dresses",
                    "position": 10,
                    "is_main": true
                }
            ],
            "material": "LADIES' 100% SILK WOVEN DRESS",
            "variation_color_value": "Grace Sweater Beige",
            "variation_size_value": "4",
            "variation_size_gender": "unisex",
            "variation_size_type": "regular",
            "variation_size_system": "US",
            "external_identifiers": [
                {
                    "type": "sku",
                    "value": "3825952358"
                },
                {
                    "type": "ean13",
                    "value": "1000101000007"
                }
            ],
            "extended_attributes": [
                {
                    "name": "care",
                    "value": "1000101 This product doesn't need special caring instructions. Handwash at 50°F is sufficent enough."
                },
                {
                    "name": "fit",
                    "value": "1000101 Tight"
                }
            ]
        }
    ]
}
```

At this stage you have the following `data` folder structure:

```plaintext
data
└── products.json
```

### Creating price book data

A `price book` represents a collection of prices for products, in a specific currency. You can import multiple price books and specify whether the set of prices is inclusive or exclusive of taxes. For example, each sales channel can have a different price book.

> [!NOTE]
> Important
> 
> To be able to use a price book that you import in this process, you must assign it to a store. See [Tutorial: Setting up a store](/v1/docs/tutorial-setting-up-a-store#tuto-create-store).

The expected structure of the price book after a successful import is represented by [this JSON schema](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api#operation/price-books). Ensure that you read the description of the properties of this schema before you start importing a price book.

The price book import has the following specificities:

- The first price book you import has to be called `default`.

To retrieve the prices in the default price book, use the [List products method](https://docs.newstore.net/api/integration/catalog-sfcc/consumer-api_api#operation/listProducts) from the Customer API. To get prices from another price book, use the [Get prices method](https://docs.newstore.net/api/integration/catalog-sfcc/consumer-api_api#operation/getPrices).

> [!NOTE]
> Important
> 
> A `shop` can only contain one `default` price book in a specific currency. Importing another `default` price book with a different currency overwrites the previous price book. Every default pricebook is independent for each `shop`.
- `shop`: Must be set to the same value as the product: `storefront-catalog-en`.
- Every record in a pricebook must have a price defined and the price needs to be rounded off to a proper decimal value based on the currency. For example, `USD` is rounded off to 2 decimal places, while `JPY` is rounded off to 0 decimals. If a price value is invalid, the price record is excluded from processing on the platform.

1. Define the following payload to describe the price book:

```json
{
    "head": {
        "pricebook": "default",
        "shop": "storefront-catalog-en",
        "currency": "USD"
    },
    "items": [
        {
            "product_id": "1000101",
            "value": 995.00
        }
    ]
}
```
2. Save the product payload in a file called `prices.json` in the `data` folder. You can include all your price books in the same JSON file.

Your `data` folder should now contain:

```plaintext
data
├── prices.json
└── products.json
```

You are now ready to import the data.

## Running the import

Import the data by creating and running an import job:

1. Zip the `data` folder to `data.zip`:

```plaintext
zip -r data.zip data
```

> [!NOTE]
> Important
> 
> On Mac, using the context-menu compression might include a `__MACOSX` invisible folder to the zip. This folder will break the import.
2. Upload it to a URL that NewStore can access.

NewStore supports HTTPS URIs and Amazon S3 bucket URIs, as long as NewStore can access them to download the file.
3. Use the [Create import job method](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api#operation/create-import-job):

```json
curl -X POST "https://<url>/v0/d/import" \
   -H "Authorization: string" \
   -d
   '{
     "provider": "MyProductImportTestSystem",
     "name": "product_import_20170306",
     "source_uri": "https://some-uri-location/data.zip",
     "entities": [
       "products",
       "availabilities",
       "prices"
     ]
   }'
```
4. The job is created and can be started using the [Start import job method](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api#operation/start-import-job) by providing the URL of the data file to the zip file.

```json
curl -X POST "https://<url>/v0/d/import/{import_id}/start" \
     -H "Authorization: Bearer ${AUTH_TOKEN}" \
     -d
     '{
       "transformed_uri": "https://assets.example.com/integrations/newstore/data.zip"
      }'
```

The job is placed in a processing queue.
5. You can check the import job's status with the [Get import job method](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api#operation/get-import-job) or using NewStore Omnichannel Manager, via `Catalog` > `Imports` > `Catalog imports`. For more information, see [Viewing status of catalog imports](/v1/docs/searching-for-and-filtering-products#viewing-status-of-catalog-imports).

Once the job is processed, its status becomes `finished`.
6. > [!NOTE]
> Important
> 
> Ensure the [List errors for import method](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api#operation/list-errors-for-import) returns an empty array.

If there are errors for the import job, see [Troubleshooting import errors](/v1/docs/importing-data#troubleshooting-errors).

## Testing the import

Now that the data has been imported, you can try to retrieve our products from the API or list it in NewStore Omnichannel Manager.

Use the [List products](https://docs.newstore.net/api/integration/catalog-sfcc/consumer-api_api#operation/listProducts) method from the Customer API to retrieve the product you imported:

```plaintext
curl "http://<url>/api/v1/shops/storefront-catalog-en/products?locale=en-us"
```

The import is complete.

You can also export and validate product and pricebook data you just imported for your business. See [Exporting product data](/v1/docs/importing-data#exporting-product-data) and [Exporting pricebook data](/v1/docs/importing-data#exporting-pricebook-data).

**Related topics**

- [Importing data](/v1/docs/importing-data#integ-importdata)
- [Import API](https://docs.newstore.net/api/integration/catalog-sfcc/import-api_api)
- [Customer API](https://docs.newstore.net/api/integration/catalog-sfcc/consumer-api_api)
- [Configuring distribution centers](/v1/docs/configuring-distribution-centers#config-dc)
