Skip to main content

Update a variation

PUT 

https://euwest.api.elasticpath.com/pcm/variations/:variationID

Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the variation is not updated.

Request

Responses

Returns an updated variation with the following attributes.

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/pcm/variations/:variationID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"product-variation\",\n \"attributes\": {\n \"name\": \"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());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "type": "product-variation",
    "attributes": {
      "name": "string",
      "sort_order": 0
    },
    "id": "00000000-0000-0000-0000-000000000000"
  }
}
ResponseClear

Click the Send API Request button above and see the response here!