> ## 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.

# Organization Suppliers

> Manage the org-level supplier directory shared across projects

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

## Overview

The `organization-supplier` command manages your organization's supplier directory — the canonical company record for each supplier, shared across every project domain (independent of the [PPWR supplier portal](/cli/ppwr) invite flow). Once a supplier exists here, it can be assigned to [PPWR packaging units](/cli/ppwr#packaging-unit-supplier-assignment).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier <subcommand> [flags]
```

### Available Commands

| Command  | Description                                                    |
| -------- | -------------------------------------------------------------- |
| `list`   | List organization suppliers                                    |
| `create` | Create a supplier                                              |
| `edit`   | Edit a supplier                                                |
| `delete` | Delete a supplier (cascades to its packaging-unit assignments) |

Aliases: `dcy organization-suppliers`, `dcy org-supplier`.

<Note>
  There's no `show`/get-by-id command — the API doesn't expose one. Use `list` to look up a supplier's ID.
</Note>

***

## List Suppliers

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier list
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier list

# JSON output for scripting
dcy organization-supplier list --format json | jq '.[] | {id, company_name}'
```

### Flags

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

### Output

```
Showing 2 organization supplier(s)
3bb91c1a-... | Cartonajes Bernabeu SAU | comercial@bernabeu.es | ES
685266a4-... | Vegabaja Packaging SL   | info@vegabaja.es      | ES
```

Columns: ID, company name, email, country.

***

## Create a Supplier

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier create --company-name <name> [flags]
```

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier create --company-name "Cartonajes Bernabeu SAU"

dcy organization-supplier create \
  --company-name "Cartonajes Bernabeu SAU" \
  --contact-name "Jane Doe" \
  --email jane@bernabeu.es \
  --country ES \
  --tax-id B12345678
```

### Flags

| Flag             | Required | Description                     |
| ---------------- | -------- | ------------------------------- |
| `--company-name` | Yes      | Supplier company name           |
| `--tax-id`       | No       | Tax ID (CIF/NIF/VAT)            |
| `--contact-name` | No       | Main contact person             |
| `--email`        | No       | Main contact email              |
| `--country`      | No       | ISO 3166-1 alpha-2 country code |
| `--org`          | No       | Organization ID override        |

***

## Edit a Supplier

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

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy organization-supplier edit <supplier-id> --contact-name "Jane Doe" --email jane@bernabeu.es
```

### Flags

Accepts the same flags as `create` (all optional — only provided fields are updated), except `--company-name` is not required on edit.

***

## Delete a Supplier

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

# Alias
dcy organization-supplier rm <supplier-id>
```

Cascades to the supplier's [packaging-unit assignments](/cli/ppwr#packaging-unit-supplier-assignment).

### Examples

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

# Skip confirmation
dcy organization-supplier delete <supplier-id> --yes
```

### Flags

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

***

## Common Options

All organization-supplier commands support:

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

***

## Workflows

### Create a Supplier and Assign Packaging Units

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 1. Create the supplier
SUPPLIER=$(dcy organization-supplier create --company-name "Cartonajes Bernabeu SAU" --format json)
SUPPLIER_ID=$(echo "$SUPPLIER" | jq -r '.id')

# 2. Assign the packaging units it supplies
dcy ppwr packaging-unit supplier add "$SUPPLIER_ID" <unit-id-1> <unit-id-2> --project <project-id>

# 3. Review what it's assigned
dcy ppwr packaging-unit supplier list "$SUPPLIER_ID" --project <project-id>
```

### Piping with jq

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# List supplier IDs for scripting
dcy organization-supplier list --format json | jq -r '.[].id'

# Find suppliers missing an email
dcy organization-supplier list --format json | jq '[.[] | select(.email == "")]'
```
