Import Products
POST/pcm/products/import
You can use the Product Import API to:
-
Add new products, including:
- main image files. See Importing Main Image Files.
- custom data. See Importing custom data.
- Make bulk updates to existing products.
You cannot use product import to:
- Delete existing products.
- Import product bundles.
The Product Import API uses a Comma Separated Values (CSV) file to import products, main image files, custom extension data, and admin and shopper attributes. Each row in a .csv file represents a product you want to create/update. See an example file.
Each file can have 50,000 rows, including the header. If a CSV file exceeds 50,000 rows, an error is displayed, and the products are not imported. A CSV file must not be larger than 50 megabytes. If a CSV file is larger than 50 megabytes, a 503 client read error is displayed.
If you want to create/update more than 50,000 products or your CSV file is larger than 50 megabytes, you must have a separate CSV file and import each CSV file one at a time.
See Characteristics of CSV Files.
Custom Attributes in CSV
You can set custom attributes on products using CSV columns with the prefixes shopper_attributes. or admin_attributes. followed by the attribute key name. For example:
shopper_attributes.colorsets thecolorkey onshopper_attributes.admin_attributes.cost_of_goodssets thecost_of_goodskey onadmin_attributes.
Partial updates: When updating an existing product, only the attribute keys present as columns in the CSV are affected. Attribute keys not included as columns are left unchanged.
Removing an attribute key: To explicitly delete an attribute key from an existing product, set the cell value to __REMOVE_ATTRIBUTE__. This special sentinel value instructs the importer to remove that key from the product's custom attributes. An empty cell value is treated as a literal empty string, not a deletion.
New products: For new products being created via import, any column whose value is __REMOVE_ATTRIBUTE__ is ignored (the key is not created).
Request
Responses
- 201
- 400
- 422
- 500
Import started
Bad request. The request failed validation.
Bad request. The request failed validation.
Internal server error. There was a system failure in the platform.