Update a Modifier
PUT/pcm/pricebooks/:pricebookID/modifiers/:modifierID
Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the price modifier is not updated.
Request
Path Parameters
Unique identifier of a Price Book
Unique identifier of a Price Book Modifier
- application/json
Body
required
The updated price modifier
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.
data objectrequired
Price modifier update request.
A unique identifier for the price modifier.
Possible values: [price-modifier
]
Default value: price-modifier
attributes objectrequired
currencies object
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.
The price in the lowest denomination for the specified currency. This is a product's list price.
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
.
The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.
The price for each quantity.
Possible values: non-empty
A name for the modifier. You must give the price modifier a unique name. Price modifier names are case-sensitive
Possible values: [price_equals
, price_increment
, price_decrement
]
There are three modifier types.
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Responses
- 200
- default
Updated price modifier.
- application/json
- Schema
- Example (from schema)
Schema
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.
data objectrequired
A price modifier with the following attributes.
Possible values: [price-modifier
]
Default value: price-modifier
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
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.
The price in the lowest denomination for the specified currency. This is a product's list price.
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
.
The minimum quantity of 1 or more defined for the specified price. If a minimum quantity is not specified, an error is returned.
The price for each quantity.
A name for the modifier. You must give the price modifier a unique name. Price modifier names are case-sensitive.
Possible values: [price_equals
, price_increment
, price_decrement
]
There are three modifier types.
The date and time when the price book was created.
The date and time when the price book was last updated.
A unique identifier for the price modifier.
meta object
The product owner, either organization
or store
.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
{
"data": {
"type": "price-modifier",
"pricebook_external_ref": "a-pricebook-external-ref",
"attributes": {
"external_ref": "external-ref",
"currencies": {
"USD": {
"amount": 100,
"includes_tax": false,
"tiers": {
"min_5": {
"minimum_quantity": 5,
"amount": 50
}
}
},
"CAD": {
"amount": 127,
"includes_tax": false,
"tiers": {
"min_10": {
"minimum_quantity": 10,
"amount": 100
}
}
},
"GBP": {
"amount": 73,
"includes_tax": true,
"tiers": {
"min_20": {
"minimum_quantity": 20,
"amount": 60
}
}
}
},
"name": "large-supplement",
"modifier_type": "price_equals",
"created_at": "2020-09-22T09:00:00Z",
"updated_at": "2020-09-22T09:00:00Z"
},
"id": "37f2eed6-0bea-4d0b-a3c6-24cc76143bfd",
"meta": {
"owner": "store"
}
},
"links": {
"self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7/modifiers/f5bd1fc7-48a2-40ac-88dd-2bd9985050cd"
}
}
Unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"detail": "The modifier already exists",
"status": "409",
"title": "conflict"
}
]
}