> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# PPWR

> Manage PPWR packaging units and their covered SKUs

<Note>
  **Early Access** - The Dcycle CLI is currently available for enterprise customers.
  [Contact us](/docs/support) to learn more about access.
</Note>

## Overview

The `ppwr packaging-unit` command manages [PPWR packaging units](/mcp/ppwr) — the containers, boxes, films, and other packaging assessed under Regulation (EU) 2025/40. Each packaging unit belongs to a project and can cover one or more SKUs via its `sku` sub-command.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit <subcommand> [flags]
dcy ppwr packaging-unit sku <subcommand> [flags]
```

### Available Commands

| Command      | Description                                                           |
| ------------ | --------------------------------------------------------------------- |
| `list`       | List packaging units for a project                                    |
| `show`       | Show packaging unit details                                           |
| `create`     | Create a packaging unit                                               |
| `edit`       | Edit a packaging unit                                                 |
| `delete`     | Delete a packaging unit (cascades to its BOM items, substances, SKUs) |
| `sku list`   | List SKUs covered by a packaging unit                                 |
| `sku add`    | Add a SKU to a packaging unit                                         |
| `sku edit`   | Edit a packaging unit SKU                                             |
| `sku delete` | Delete a packaging unit SKU                                           |

Aliases: `dcy ppwr packaging-units`, `dcy ppwr pkg-unit`.

***

## List Packaging Units

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit list --project <project-id> [flags]

# Alias
dcy ppwr packaging-unit ls --project <project-id>
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# List all packaging units in a project
dcy ppwr packaging-unit list --project <project-id>

# Filter by unit name or SKU reference
dcy ppwr packaging-unit list --project <project-id> --search "verde"

# JSON output for scripting
dcy ppwr packaging-unit list --project <project-id> --format json | jq '.[] | {id, name, status}'
```

### Flags

| Flag        | Required | Description                          |
| ----------- | -------- | ------------------------------------ |
| `--project` | Yes      | Project ID                           |
| `--search`  | No       | Filter by unit name or SKU reference |
| `--org`     | No       | Organization ID override             |

### Output

```
Showing 2 packaging unit(s)
2ecd5181-... | CT 60X40X150 VERDE (LECHUGA) | primary/grouped | skus=1 | draft
7bc3d200-... | CT 40X30X8.5 VERDE           | secondary/sales | skus=0 | compliant
```

Columns: ID, name, packaging type/PPWR category, SKU count, status.

***

## Show Packaging Unit Details

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit show <packaging-unit-id>
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit show 00000000-0000-0000-0000-000000000000

# JSON output
dcy ppwr packaging-unit show <packaging-unit-id> --format json
```

### Flags

| Flag    | Description              |
| ------- | ------------------------ |
| `--org` | Organization ID override |

### Output

```
ID: 2ecd5181-b973-4000-8cac-a7f53b49c8f9
Name: CT 60X40X150 VERDE (LECHUGA)
Packaging Type: primary
PPWR Category: grouped
Status: draft
Description: 300-Jaula, contenedor.
Food Contact: false
Single Use: true
Weight: 463 g
SKU Count: 1
Project ID: 516bb7a2-56c9-46a6-92d0-483183c96d87
Created: 2026-07-22
Updated: 2026-08-04
```

***

## Create Packaging Unit

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit create --project <project-id> --name <name> --type <type> [flags]
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit create --project <project-id> --name "Caja cartón 40x30" --type secondary

dcy ppwr packaging-unit create \
  --project <project-id> \
  --name "Film BOPP" \
  --type primary \
  --category sales \
  --food-contact \
  --weight 3.4
```

### Flags

| Flag                 | Short | Required | Default | Description                                                     |
| -------------------- | ----- | -------- | ------- | --------------------------------------------------------------- |
| `--project`          | —     | Yes      | —       | Project ID                                                      |
| `--name`             | `-n`  | Yes      | —       | Packaging unit name                                             |
| `--type`             | `-t`  | Yes      | —       | Packaging type: `primary`, `secondary`, `tertiary`, `transport` |
| `--category`         | `-c`  | No       | —       | PPWR category: `sales`, `grouped`, `transport`, `e_commerce`    |
| `--description`      | `-d`  | No       | —       | Description                                                     |
| `--food-contact`     | —     | No       | `false` | Intended for food contact                                       |
| `--ean`              | —     | No       | —       | EAN code                                                        |
| `--weight`           | —     | No       | —       | Weight in grams                                                 |
| `--volume`           | —     | No       | —       | Volume in ml                                                    |
| `--units-per-pallet` | —     | No       | —       | Units per pallet                                                |
| `--single-use`       | —     | No       | `false` | Single-use (not designed for reuse)                             |
| `--void-space-pct`   | —     | No       | —       | Declared void-space ratio (%)                                   |
| `--target-markets`   | —     | No       | —       | Comma-separated ISO 3166-1 alpha-2 country codes                |
| `--org`              | —     | No       | —       | Organization ID override                                        |

***

## Edit Packaging Unit

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit edit <packaging-unit-id> [flags]
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit edit <packaging-unit-id> --weight 218 --food-contact
dcy ppwr packaging-unit edit <packaging-unit-id> --status compliant
```

### Flags

Accepts the same flags as `create` (all optional — only provided fields are updated), plus:

| Flag       | Description                                               |
| ---------- | --------------------------------------------------------- |
| `--status` | Status: `draft`, `assessed`, `compliant`, `non_compliant` |

***

## Delete Packaging Unit

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit delete <packaging-unit-id> [flags]

# Alias
dcy ppwr packaging-unit rm <packaging-unit-id>
```

Cascades to the unit's BOM items, substances, and SKUs.

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Interactive confirmation
dcy ppwr packaging-unit delete <packaging-unit-id>

# Skip confirmation
dcy ppwr packaging-unit delete <packaging-unit-id> --yes
```

### Flags

| Flag    | Short | Default | Description              |
| ------- | ----- | ------- | ------------------------ |
| `--yes` | `-y`  | `false` | Skip confirmation prompt |
| `--org` | —     | —       | Organization ID override |

### Output

```
Delete packaging unit CT 60X40X150 VERDE (LECHUGA) (2ecd5181-...)? This cascades to its BOM items, substances and SKUs. [y/N]
```

```
packaging unit deleted successfully: CT 60X40X150 VERDE (LECHUGA)
```

***

## Packaging Unit SKUs

SKUs track the specific product references covered by a packaging unit's declaration of conformity.

### List SKUs

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit sku list <packaging-unit-id>
```

Output:

```
Showing 1 SKU(s)
abc123-... | 2-201-524-CT 40X30X8.5 VERDE | CT 40X30X8.5 VERDE
```

### Add a SKU

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit sku add <packaging-unit-id> --reference "2-201-524-CT 40X30X8.5 VERDE"

dcy ppwr packaging-unit sku add <packaging-unit-id> \
  --reference "2-201-524-CT 40X30X8.5 VERDE" \
  --weight 218 \
  --ean 8412345678901
```

| Flag            | Short | Required | Description                               |
| --------------- | ----- | -------- | ----------------------------------------- |
| `--reference`   | `-r`  | Yes      | SKU reference (unique per packaging unit) |
| `--name`        | `-n`  | No       | SKU name                                  |
| `--ean`         | —     | No       | EAN code                                  |
| `--weight`      | —     | No       | Weight in grams                           |
| `--volume`      | —     | No       | Volume in ml                              |
| `--order-index` | —     | No       | Display order                             |
| `--org`         | —     | No       | Organization ID override                  |

### Edit a SKU

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy ppwr packaging-unit sku edit <packaging-unit-id> <sku-id> --weight 220
```

Accepts the same flags as `sku add` (all optional — only provided fields are updated).

### Delete a SKU

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Interactive confirmation
dcy ppwr packaging-unit sku delete <packaging-unit-id> <sku-id>

# Skip confirmation
dcy ppwr packaging-unit sku delete <packaging-unit-id> <sku-id> --yes
```

| Flag    | Short | Default | Description              |
| ------- | ----- | ------- | ------------------------ |
| `--yes` | `-y`  | `false` | Skip confirmation prompt |
| `--org` | —     | —       | Organization ID override |

***

## Common Options

All PPWR commands support:

| Flag            | Description                        |
| --------------- | ---------------------------------- |
| `--format json` | JSON output (default: `text`)      |
| `--verbose`     | Show HTTP request/response details |
| `--timeout`     | Request timeout in seconds         |

***

## Workflows

### Set Up a New Packaging Unit

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 1. Create the packaging unit
UNIT=$(dcy ppwr packaging-unit create \
  --project <project-id> \
  --name "CT 40X30X8.5 VERDE" \
  --type secondary \
  --category sales \
  --format json)

UNIT_ID=$(echo "$UNIT" | jq -r '.id')

# 2. Cover its SKUs
dcy ppwr packaging-unit sku add "$UNIT_ID" --reference "2-201-524-CT 40X30X8.5 VERDE"

# 3. Review and mark compliant once assessed
dcy ppwr packaging-unit show "$UNIT_ID"
dcy ppwr packaging-unit edit "$UNIT_ID" --status compliant
```

### Piping with jq

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# List packaging unit IDs for scripting
dcy ppwr packaging-unit list --project <project-id> --format json | jq -r '.[].id'

# Find units missing a weight
dcy ppwr packaging-unit list --project <project-id> --format json | jq '[.[] | select(.weight_grams == null)]'

# Count units by status
dcy ppwr packaging-unit list --project <project-id> --format json | jq 'group_by(.status) | map({status: .[0].status, count: length})'
```
