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.
type String | "standalone-price" The Standalone Price import resource type. |
resources Array 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.
key String | User-defined unique identifier for the Standalone Price. MinLength:2 MaxLength: 256 Pattern: ^[A-Za-z0-9_-]+$ |
sku String | Identifies the ProductVariant to which this Standalone Price is associated. This value is not validated to exist in Product Variants. |
value | Sets the money value of this Price. |
country CountryCode | 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. |
tiers Array of PriceTier | Sets price tiers. |
discounted DiscountedPrice | 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}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
importContainerKey String | The ImportContainer used to create the new resource |
application/json
application/json
curl 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