# Update a showcase

`PATCH https://api.cademi.com.br/api/v3/showcases/{showcase_id}`

Operation ID: `showcases.update` · API v3

Updates an existing showcase. Only the fields present in the request are changed.

Updating `status` requires the `showcases.publish` permission in addition to `showcases.update`. Setting `parent_id` moves the showcase into a group, or to the top level when `null`; moves that would break the two-level hierarchy are rejected with `hierarchy_violation`. Setting `deleted` to `false` restores a showcase from the trash.

Replicated showcases accept only `status`; a request that includes any other field returns the `replica_readonly` error code.

Send the current `ETag` value in the `If-Match` header to avoid overwriting changes made since the showcase was retrieved.

Required permissions: `showcases.update`, `showcases.publish`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `showcase_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `deleted` | boolean | no |  |
| `name` | string | no |  |
| `parent_id` | string or null | no |  |
| `position` | integer | no |  |
| `settings` | object | no |  |
| `status` | string, one of `published`, `draft`, `unlisted`, `hidden` | no |  |

## Responses

### 200

Returns the updated showcase.

Body: `data`: Showcase.

Fields of Showcase:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `deleted` | boolean | yes |  |
| `id` | string | yes | Public ID, with the shw_ prefix. |
| `image` | string or null | yes |  |
| `kind` | string, one of `group`, `showcase` | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `showcase` | yes |  |
| `parent_id` | string or null | yes |  |
| `position` | integer | yes |  |
| `products_count` | integer | yes |  |
| `revision` | string | yes |  |
| `status` | string, one of `published`, `draft`, `unlisted`, `hidden` | yes |  |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The showcase was not found or is not accessible with the current credentials.

Body: Error.

### 412

The showcase has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request contains invalid data or would break the two-level showcase hierarchy.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
