# Replace delivery release schedules

`PUT https://api.cademi.com.br/api/v3/sales/deliveries/{delivery_id}/rules`

Operation ID: `deliveries.rules.update` · API v3

Replaces the release schedules applied by the delivery.

Changes apply only to new enrollments. Existing enrollments keep the release schedule assigned when they were granted.

Required permissions: `deliveries.update`.

## Parameters

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

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `entries` | array of object | yes |  |

## Responses

### 200

Returns the updated release schedules.

Body: `data`: DeliveryRules.

Fields of DeliveryRules:

| Field | Type | Required | Description |
|---|---|---|---|
| `entries` | array of object | yes |  |
| `object` | string, one of `delivery_rules` | 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 delivery or release schedule was not found or is not accessible with the current credentials.

Body: Error.

### 412

The resource has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

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