Importing Standalone Prices
This endpoint can be used to import Standalone Price data to create and update Standalone Prices in a Project.
Standalone Prices are different to Embedded Prices, which store their prices within the ProductVariant or LineItem. You should check what type of price you are importing to ensure you are using the correct endpoint.
The Standalone Price data to import is represented by StandalonePriceImport and loaded in StandalonePriceImportRequest, which is posted to import Standalone Prices.
To monitor an import status, use Get ImportSummary, Get ImportOperation, and Query ImportOperations.
Representations
StandalonePriceImportRequest
The request body to import Standalone Prices. Contains data for Standalone Prices to be created or updated in a Project.
typeString | "standalone-price"The Standalone Price import resource type. |
resourcesArray of StandalonePriceImport | The Standalone Price import resources of this request. MaxItems:20 |
StandalonePriceImport
The data representation for a Standalone Price to be imported that is persisted as a Standalone Price in the Project.
keyString | User-defined unique identifier for the Standalone Price. Pattern:^[A-Za-z0-9_-]+$ |
skuString | Specifies to which ProductVariant the API associates this Price. It is not validated to exist in product variants. |
value | Sets the money value of this Price. |
countryCountryCode | Sets the country for which this Price is valid. Pattern:^[A-Z]{2}$ |
customerGroup | Sets the CustomerGroup for which this Price is valid. |
channel | Sets the product distribution Channel for which this Price is valid |
validFrom | Sets the date from which the Price is valid. |
validUntil | Sets the date until the Price is valid. |
tiersArray of PriceTier | Sets price tiers. |
discountedDiscountedPrice | Sets a discounted price for this Price that is different from the base price with value. |
custom | Custom Fields for the StandalonePrice. |
Import Standalone Prices
Creates a request for creating new Standalone Prices or updating existing ones.
manage_standalone_prices:{projectKey}, view_standalone_prices:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
importContainerKeyString | The ImportContainer used to create the new resource |
curl -X POST https://import.{region}.commercetools.com/{projectKey}/standalone-prices/import-containers/{importContainerKey} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"type" : "standalone-price","resources" : [ {"key" : "priceKey","sku" : "variantSku","value" : {"type" : "centPrecision","currencyCode" : "EUR","centAmount" : 100}} ]}DATA