# Replace delivery products

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

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

Replaces the delivery's entire product set with the supplied entries.

Existing enrollments are not changed; the new set applies to subsequent sales. Every referenced product must be accessible with the current credentials.

To avoid overwriting a newer version, send the delivery's current `ETag` in the `If-Match` header.

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 product set.

Body: `data`: DeliveryProducts.

Fields of DeliveryProducts:

| Field | Type | Required | Description |
|---|---|---|---|
| `entries` | array of object | yes |  |
| `ignored_external_product_ids` | array of string | yes | Gateway product codes that sale processing ignores across the entire account. Read-only in this resource. |
| `object` | string, one of `delivery_products` | 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 one of the referenced products 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
