# Reorder product content

`PUT https://api.cademi.com.br/api/v3/products/{product_id}/content/order`

Operation ID: `products.content.order.update` · API v3

Sets the display order of the product's top-level content.

The `ids` list may mix module IDs (`mod_`) and lesson IDs (`les_`), and must contain exactly the complete set of root modules and lessons that do not belong to any module. If the supplied set does not match, the request is rejected.

Send the product's current `ETag` value in the `If-Match` header to avoid overwriting a newer version.

Required permissions: `products.update`.

## Parameters

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

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `ids` | array of string | yes |  |

## Responses

### 200

Returns the product's top-level content in the new order.

Body: `data`: array of ContentEntry.

Fields of ContentEntry:

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Public ID of the module or lesson, prefixed with mod or les according to kind. |
| `kind` | string, one of `module`, `lesson` | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `content_entry` | yes |  |
| `position` | integer | yes |  |
| `status` | string, one of `published`, `draft` | 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 product was not found or is not accessible with the current credentials.

Body: Error.

### 412

The product has changed since the supplied revision was retrieved.

Body: Error.

### 422

The supplied IDs do not match the complete set of the product's top-level content.

Body: Error.

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