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 (auto)
- 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 (auto)
- 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 (auto)
- 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 (auto)
- 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 (auto)
- 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 (auto)
- 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
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/pcm/variations/:variationID/options/:optionID/modifiers/:modifierID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"product-variation-modifier\",\n \"attributes\": {\n \"type\": \"commodity_type\",\n \"value\": \"string\",\n \"seek\": \"string\",\n \"set\": \"string\",\n \"reference_name\": \"string\"\n },\n \"id\": \"00000000-0000-0000-0000-000000000000\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear