Export and import price data

With this feature you can import and export the prices for products and SKUs and as part of import, you can create, update and delete the prices.

You can import and export prices for products and SKUs. While importing price data, you can create, update and delete prices. For example, you may want to delete prices so that the price hierarchy can be obtained from the parent. Or you might want to remove a sale price to activate the list price.

The Prices plugin allows you to do the following:

  • Create and update prices for products and SKUs from different price list groups.
  • Provide prices for only the SKUs of a product with price changes.

When you issue a bulk request to import prices (and optionally update, create or delete prices) with the importOperationCode property, the following applies:

  • You can import and export prices using a JSON or CSV format for both standalone and bundle modes.
  • The import process supports both simple and complex pricing schemes.
  • The bulk import process supports the priceListGroupId and type properties, in addition to the priceListId property.
  • You can configure the bulk price export using the q parameter.

The following is an example of a price import process:

POST http://localhost:9080/ccadmin/v1/importProcess
{
  "mode": "standalone",
  "fileName": "BulkImportPrices.json",
  "format": "json",
  "uploadType": "bulkImport",
  "id": "Prices"
}

The following table lists the fields that are supported by the plugin, along with validations.

Property Name Type Description Required
importOperationCode String

Supported for import only. The following values are supported:

merge (default): Creates a new record if no matching record is found, otherwise it updates it.

create: Creates a record. If a matching record is found, an error occurs. Can be used to improve performance with new records.

delete: Deletes the record.

No
productId string The product ID. Yes
skuId string The SKU ID. No
priceListId string The price list ID. Yes, but it is not required if a priceListgroupId and type are provided.
priceListGroupId string The pricelist group ID. No, unless the pricelistId property has not been provided.
type string The price type. No, unless the pricelistId property has not been provided.
startDate date The start date of the price's availability. No
endDate date The date that the price expires. No
pricingScheme string

The pricing scheme contains the following values:

listPrice: This indicates a simple price. The listPrice property must contain data.

bulkPrice or tieredPrice: These properties indicate a volume price.

Yes
listPrice double The product/SKU price. This must be provided when the pricingScheme property equals the listPrice property. No, unless the pricingScheme property is set to listPrice.
complexPrice repository object The volume price information that contains an array of levels. No, unless the pricingScheme property is set to bulkPrice or tieredPrice.

Understand complex price levels

The complex price entities are defined in the following table:

Property Name Type Description
quantity long The quantity needed to enable the price.
price double The price that is used when the quantity meets the value defined in the quantity property.