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
Responses
- 200
- 403
- 404
- 409
- 422
- 500
Successfully returns the updated modifier.
Forbidden
Bad Request. Not Found.
Write conflict detected
Bad request. The request failed validation.
Internal server error. There was a system failure in the platform.
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