Updates a catalog
PUThttps://euwest.api.elasticpath.com/catalogs/:catalog_id
Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the catalog is not updated.
Request
Responses
- 200
- default
An updated catalog with the following attributes.
Unexpected error.
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: 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/catalogs/:catalog_id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <Authorization>");
var content = new StringContent("{\n \"data\": {\n \"attributes\": {\n \"name\": \"catalog-123\",\n \"description\": \"Catalog for Store 123\",\n \"hierarchy_ids\": [\n \"string\"\n ],\n \"pricebook_id\": \"string\",\n \"pricebook_ids\": [\n {\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"priority\": 0\n }\n ],\n \"locales\": {},\n \"enable_price_segmentation\": true\n },\n \"id\": \"8dbb35b2-ef04-477e-974d-e5f3abe6faae\",\n \"type\": \"catalog\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear