Update a modifier
PUT/pcm/variations/:variationID/options/:optionID/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 modifier is not updated.
Request
Path Parameters
A unique identifier for the variation.
A unique identifier for the option.
A unique identifier for the modifier.
- application/json
Body
data objectrequired
Possible values: [product-variation-modifier
]
This represents the type of resource object being returned. Always product-variation-modifier
.
attributes objectrequired
Possible values: [commodity_type
, status
, price
, name_append
, name_prepend
, name_equals
, sku_append
, sku_prepend
, sku_equals
, sku_builder
, slug_append
, slug_prepend
, slug_equals
, slug_builder
, description_append
, description_prepend
, description_equals
, custom_inputs_equals
, build_rules_equals
, locales_equals
, upc_ean_equals
, mpn_equals
, external_ref_equals
]
You can specify different modifiers for different options in a variation. When you build child products using options in variations, the properties of a child products depends on the modifier set for the options that are applied to the child product. The table below describes the different types of modifiers.
| Modifier | Data Type | Effect |
| :--- | :--- | :--- |
| name_equals
| string
| Overrides the name of the child product with the name specified by the modifier. |
| name_append
| string
| Appends the string specified in the modifier to the name of the child product. |
| name_prepend
| string
| Prepends the string specified in the modifier to the name of the child product. |
| description_equals
| string
| Overrides the description of the child product. |
| description_append
| string
| Appends the string specified in the modifier to the description of the child product. |
| description_prepend
| string
| Prepends the string specified in the modifier to the product description of the child product. |
| commodity_type
| string
| Sets the commodity type of the child product, such as physical
or digital
. |
| price
| string
| Allows application of price modifiers (price_increment
, price_decrement
, and price_equals
) to the child products. |
| price_increment
| string
| Increases the price of the child product. |
| price_decrement
| string
| Decreases the price of the child product. |
| price_equals
| string
| Sets the price of a child product to the amount you specify. |
| slug_append
| string
| Appends the string specified in the modifier to the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| slug_prepend
| string
| Prepends the string specified in the modifier to the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| slug_builder
| string
| Sets a part of the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| sku_equals
| string
| Sets the SKU of the child product. |
| sku_append
| string
| Appends the string specified in the modifier to the SKU of the child product. |
| sku_prepend
| string
| Prepends the string specified in the modifier to the SKU of the child product. |
| sku_builder
| string
| Sets a part of the SKU of the child product. |
| status
| string
| Sets the status of the child product, such as draft
or live
. |
Required for non-builder modifiers. The value of the modifier type.
Required for builder modifiers. The sub-string to find and replace enclosed in curly brackets for slug_builder
and sku_builder
.
Required for builder modifiers. The value to replace matches the seek
string for slug_builder
and sku_builder
.
The name of the modifier.
The unique identifier of the modifier. Must match the modifier ID specified in the request path.
Responses
- 200
- 403
- 404
- 409
- 422
- 500
Successfully returns the updated modifier.
- application/json
- Schema
- Example (from schema)
- updated-variation-modifier
Schema
data object
A unique identifier for a modifier that is generated automatically when a modifier is created.
Possible values: [product-variation-modifier
]
This represents the type of resource object being returned. Always `product-variation-modifier'.
attributes object
Possible values: [commodity_type
, status
, price
, name_append
, name_prepend
, name_equals
, sku_append
, sku_prepend
, sku_equals
, sku_builder
, slug_append
, slug_prepend
, slug_equals
, slug_builder
, description_append
, description_prepend
, description_equals
, custom_inputs_equals
, build_rules_equals
, locales_equals
, upc_ean_equals
, mpn_equals
, external_ref_equals
]
You can specify different modifiers for different options in a variation. When you build child products using options in variations, the properties of a child products depends on the modifier set for the options that are applied to the child product. The table below describes the different types of modifiers.
| Modifier | Data Type | Effect |
| :--- | :--- | :--- |
| name_equals
| string
| Overrides the name of the child product with the name specified by the modifier. |
| name_append
| string
| Appends the string specified in the modifier to the name of the child product. |
| name_prepend
| string
| Prepends the string specified in the modifier to the name of the child product. |
| description_equals
| string
| Overrides the description of the child product. |
| description_append
| string
| Appends the string specified in the modifier to the description of the child product. |
| description_prepend
| string
| Prepends the string specified in the modifier to the product description of the child product. |
| commodity_type
| string
| Sets the commodity type of the child product, such as physical
or digital
. |
| price
| string
| Allows application of price modifiers (price_increment
, price_decrement
, and price_equals
) to the child products. |
| price_increment
| string
| Increases the price of the child product. |
| price_decrement
| string
| Decreases the price of the child product. |
| price_equals
| string
| Sets the price of a child product to the amount you specify. |
| slug_append
| string
| Appends the string specified in the modifier to the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| slug_prepend
| string
| Prepends the string specified in the modifier to the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| slug_builder
| string
| Sets a part of the slug of the child product. Can only contain A-Z, a-z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed. However, for the slug-builder
modifier, you can use {}
in the seek
field, for example, "seek": :{COLOR}"
. |
| sku_equals
| string
| Sets the SKU of the child product. |
| sku_append
| string
| Appends the string specified in the modifier to the SKU of the child product. |
| sku_prepend
| string
| Prepends the string specified in the modifier to the SKU of the child product. |
| sku_builder
| string
| Sets a part of the SKU of the child product. |
| status
| string
| Sets the status of the child product, such as draft
or live
. |
Required for non-builder modifiers. The value of the modifier type.
Required for builder modifiers. The sub-string to find and replace enclosed in curly brackets for slug_builder
and sku_builder
.
Required for builder modifiers. The value to replace matches the seek
string for slug_builder
and sku_builder
.
The name of the modifier.
meta object
The owner of the resource, either organization
or store
.
Possible values: [organization
, store
]
{
"data": {
"id": "string",
"type": "product-variation-modifier",
"attributes": {
"type": "commodity_type",
"value": "string",
"seek": "string",
"set": "string",
"reference_name": "string"
},
"meta": {
"owner": "organization"
}
}
}
{
"data": {
"type": "product-variation-modifier",
"id": "68ec4892-9e4c-4154-a9fd-f5a9fb1f6878",
"attributes": {
"type": "sku_equals",
"value": "newSku"
},
"meta": {
"owner": "store"
}
}
}
Forbidden
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Forbidden",
"status": "403",
"detail": "entity owned by organization"
}
]
}
Bad Request. Not Found.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404"
}
]
}
Write conflict detected
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "write conflict detected"
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- failed-validation
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Failed Validation",
"status": "422",
"detail": "<XYZ> can not be empty"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}