The draft representation for prices to be embedded into ProductVariantDrafts when the ProductPriceMode is Embedded. For the Standalone ProductPriceMode use StandalonePriceDraft.

interface PriceDraft {
    channel?: ChannelResourceIdentifier;
    country?: string;
    custom?: CustomFieldsDraft;
    customerGroup?: CustomerGroupResourceIdentifier;
    discounted?: DiscountedPriceDraft;
    key?: string;
    tiers?: PriceTierDraft[];
    validFrom?: string;
    validUntil?: string;
    value: _Money;
}

Properties

Set this field if this Price is only valid for the referenced ProductDistribution Channel.

country?: string

Set this field if this Price is only valid for the specified country.

Custom Fields for the Price.

Set this field if this Price is only valid for the referenced CustomerGroup.

Set this field to add a DiscountedPrice from an external service.

Otherwise, Composable Commerce sets this field automatically if at least one [ProductDiscount](ctp:api:type:ProductDiscount) applies.
The DiscountedPrice must reference a ProductDiscount with:

* The `isActive` flag set to `true`.
* A [ProductDiscountValue](ctp:api:type:ProductDiscountValueExternal) of type `external`.
* A `predicate` that matches the [ProductVariant](ctp:api:type:ProductVariant) the Price is referenced from.
key?: string

User-defined identifier for the Price. It must be unique per ProductVariant.

tiers?: PriceTierDraft[]

Set this field to specify different Prices for certain LineItem quantities.

validFrom?: string

Set this field if this Price is only valid from the specified date and time. Must be at least 1 ms earlier than validUntil.

validUntil?: string

Set this field if this Price is only valid until the specified date and time. Must be at least 1 ms later than validFrom. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

value: _Money

Money value of this Price.

Generated using TypeDoc