Skip to main content

Create a Modifier

POST 

/pcm/pricebooks/:pricebookID/modifiers

You can use price modifiers to change the price property of child products. By default, child products inherit the same price as their base products. Using price modifiers, you can enable child products to inherit a different price. This enables you to configure the price of child products, for example, to be lower than its base product, without having to individually update the price of your child products. There are three types of price modifier.

Request

Path Parameters

    pricebookID stringrequired

    Unique identifier of a Price Book

Body

required

The price modifier to create within a price book.

    data objectrequired
    type stringrequired

    Possible values: [price-modifier]

    Default value: price-modifier

    attributes objectrequired
    currencies objectrequired

    A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.

    property name* amount

    The three-letter ISO code for the currency associated with this price.

    amount int64nullable

    The price in the lowest denomination for the specified currency. This is a product's list price.

    includes_tax boolean

    Whether this price includes tax.

    tiers object

    The price tier that an item is eligible for based on the quantity purchased. You cannot have conflicting tiers within the same currencies block.

    property name* tier-price

    The name of the tier, for example, Pencils.

    minimum_quantity int64nullable

    The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.

    amount int64nullable

    The price for each quantity.

    name stringrequired

    Possible values: non-empty

    A name for the modifier. You must give the price modifier a unique name. Price modifier names are case-sensitive.

    modifier_type stringrequired

    Possible values: [price_equals, price_increment, price_decrement]

    There are three modifier types.

    • price_increment - Increases the price of a product.
    • price_decrement - Decreases the price of a product.
    • price_equals - Sets the price of a product to the amount you specify.
    external_ref stringnullable

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

Responses

The created price modifier

Schema
    data objectrequired

    A price modifier with the following attributes.

    type stringrequired

    Possible values: [price-modifier]

    Default value: price-modifier

    pricebook_external_ref stringnullable

    The unique attribute associated with the price book. This can be an external reference from a separate company system, for example. The maximum length is 2048 characters.

    attributes objectrequired
    external_ref stringnullable

    A unique identifier associated with the price modifier. This can be an external reference from a separate company system, for example. The maximum length is 2048 characters.

    currencies objectrequired

    A collection of one or more currencies objects that consists of the three-letter ISO code of the currencies associated with this price and the amount. This is the product's price.

    property name* amount

    The three-letter ISO code for the currency associated with this price.

    amount int64nullable

    The price in the lowest denomination for the specified currency. This is a product's list price.

    includes_tax boolean

    Whether this price includes tax.

    tiers object

    The price tier that an item is eligible for based on the quantity purchased. You cannot have conflicting tiers within the same currencies block.

    property name* tier-price

    The name of the tier, for example, Pencils.

    minimum_quantity int64nullable

    The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.

    amount int64nullable

    The price for each quantity.

    name stringrequired

    A name for the modifier. You must give the price modifier a unique name. Price modifier names are case-sensitive.

    modifier_type stringrequired

    Possible values: [price_equals, price_increment, price_decrement]

    There are three modifier types.

    • price_increment - Increases the price of a product.
    • price_decrement - Decreases the price of a product.
    • price_equals - Sets the price of a product to the amount you specify.
    created_at date-time

    The date and time when the price book was created.

    updated_at date-time

    The date and time when the price book was last updated.

    id stringrequired

    A unique identifier for the price modifier.

    meta object
    owner stringnullable

    The product owner, either organization or store.

    links object

    Links are used to allow you to move between requests.

    self urinullable

    Single entities use a self parameter with a link to that specific resource.

Loading...