Skip to main content

Update a product or bundle

PUT 

https://euwest.api.elasticpath.com/pcm/products/:productID

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

Request

Responses

Updates a product 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/products/:productID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"product\",\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"attributes\": {\n \"external_ref\": \"string\",\n \"name\": \"string\",\n \"description\": \"string\",\n \"slug\": \"string\",\n \"sku\": \"string\",\n \"status\": \"live\",\n \"commodity_type\": \"physical\",\n \"upc_ean\": \"string\",\n \"mpn\": \"string\",\n \"tags\": [\n \"string\"\n ],\n \"build_rules\": {\n \"default\": \"include\",\n \"include\": [\n [\n \"string\"\n ]\n ],\n \"exclude\": [\n [\n \"string\"\n ]\n ]\n },\n \"locales\": {},\n \"custom_inputs\": {},\n \"components\": {}\n }\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",
    "id": "00000000-0000-0000-0000-000000000000",
    "attributes": {
      "external_ref": "string",
      "name": "string",
      "description": "string",
      "slug": "string",
      "sku": "string",
      "status": "live",
      "commodity_type": "physical",
      "upc_ean": "string",
      "mpn": "string",
      "tags": [
        "string"
      ],
      "build_rules": {
        "default": "include",
        "include": [
          [
            "string"
          ]
        ],
        "exclude": [
          [
            "string"
          ]
        ]
      },
      "locales": {},
      "custom_inputs": {},
      "components": {}
    }
  }
}
ResponseClear

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