Update a variation option
PUThttps://euwest.api.elasticpath.com/pcm/variations/:variationID/options/:optionID
Update a variation option
Request
Responses
- 200
- 403
- 404
- 409
- 422
- 500
Successfully returns the updated variation option
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");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"product-variation-option\",\n \"attributes\": {\n \"name\": \"string\",\n \"description\": \"string\",\n \"sort_order\": 0\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