Update a modifier
PUThttps://euwest.api.elasticpath.com/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
variationID stringrequired
A unique identifier for the variation.
optionID stringrequired
A unique identifier for the option.
modifierID stringrequired
A unique identifier for the modifier.
- application/json
Body
data objectrequired
Responses
- 200
- 403
- 404
- 409
- 422
- 500
Successfully returns the updated modifier.
- application/json
- Schema
- Example (from schema)
- updated-variation-modifier
Schema
data object
{
"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
errors undefined[]required
{
"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
errors undefined[]required
{
"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
errors undefined[]required
{
"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
errors undefined[]required
{
"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
errors undefined[]required
{
"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"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://euwest.api.elasticpath.com/pcm/variations/:variationID/options/:optionID/modifiers/:modifierID' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"type": "product-variation-modifier",
"attributes": {
"type": "commodity_type",
"value": "string",
"seek": "string",
"set": "string",
"reference_name": "string"
},
"id": "00000000-0000-0000-0000-000000000000"
}
}'
ResponseClear