Skip to main content

Update a Price Book by ID

PUT 

https://euwest.api.elasticpath.com/pcm/pricebooks/:pricebookID

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

Request

Responses

An updated price book with the following attributes.

Authorization: Authorization

name: Authorizationtype: httpin: headerscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/pcm/pricebooks/:pricebookID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <Authorization>");
var content = new StringContent("{\n \"data\": {\n \"id\": \"4c45e4ec-26e0-4043-86e4-c15b9cf985a7\",\n \"type\": \"pricebook\",\n \"attributes\": {\n \"description\": \"This is a price book\",\n \"name\": \"pricebook-store-abc\",\n \"external_ref\": \"external-ref\"\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 required
{
  "data": {
    "id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7",
    "type": "pricebook",
    "attributes": {
      "description": "This is a price book",
      "name": "pricebook-store-abc",
      "external_ref": "external-ref"
    }
  }
}
ResponseClear

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

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.