Skip to main content

Product Uploader

This tool is used to bulk create products on the Scantrust system using a CSV source file. The script will validate the CSV and attempt to create the products using the Scantrust API.

Requirements

Use a pre-compiled version:

Download Product Uploader for your Operating System:

Scantrust system requirements:

  • An active user/UAT with sufficient rights to create products
  • CSV with products in the right format to upload

Two-Factor Authentication

Users with 2FA are required to use an authorization token to login to the Scantrust portal. Because of this, they need to use an UAT token to run this tool.

CSV Format

Required CSV headers are:

  • sku: The desired SKU for the product
  • name: The product name

Optional headers are

  • brand: The ID or reference of the associated brand on the Scantrust system
  • client_url: Associated product URL
  • description: product description
  • campaign: ID of a Scantrust campaign to associate the product with
  • stc:key[:key]: STC additional fields to add to the product data (see info below)

STC fields

STC Fields are additional fields the contain information specific to a STC website. They can be posted in the following format:

stc:field1 will translate to {"field1": "Value specified in CSV"}

stc:field2:en will translate to {"field2": [{"en": "Value specified in CSV"}]}

stc:field2:cn will translate to {"field2": [{"en": "Value specified in CSV"}, {"cn": "Second value specified"}]}

sku,name,brand,stc:description:en,stc:description:nl SKU1,Product One,12,This is Product One,Dit is Product One

All additional fields will be ignored by the API.

Usage

Run this tool in your terminal/cmd with sufficient rights. For optimal usage,add the tool to your user path variables.

$ ./product_upload my_products.csv --token your_uat_token

This tool can be ran using a UAT token (recommended) which is obtained from the Scantrust portal under you user settings. The tool also supports regular user/password authentication and will prompt for this if no token is given.

Optional Parameters

--server

The Scantrust server domain. Defaults to api.scantrust.com

--user

Your Scantrust account email

--password

Your Scantrust password. If not specified you will be asked for input when running the script.

--token

UAT token to login from the Scantrust portal. This token will take precedence over user/pass authentication.

NOTE: Required for 2FA users.

--verbose

Run the tool with extra output, handy to debug errors.

--logfile

Custom logfile. Defaults to <csv file>.log