> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/edi-profiles.md).

# edi-profiles

EDI document profile configurations that tell the platform how to parse and envelope X12 / EDIFACT documents for a specific trading partner.

**REST API**: [EDI Profiles](https://developer.celigo.com/api/api-reference/edi-profiles)

```
celigo edi-profiles <subcommand> [args] [flags]
```

Supports all [global flags](/cli/getting-started/global-flags.md).

***

## Subcommands

| Subcommand                            | Purpose                                                                                                                                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `list`                                | List all EDI profiles.                                                                                                                                       |
| `get <id>`                            | Fetch one EDI profile by ID.                                                                                                                                 |
| `create`                              | Create an EDI profile from a JSON body (`--file <path>` or stdin). `--tp-connector <id\|name>` scaffolds the profile a trading partner connector prescribes. |
| `update <id>`                         | Full replace from a JSON body (`--file <path>` or stdin); destructive `PUT`.                                                                                 |
| `set <id> key=value …`                | Safe field edit: GET → modify → PUT. Supports `key=file://<path>`.                                                                                           |
| `delete <id>`                         | Delete an EDI profile.                                                                                                                                       |
| `dependencies <id>` (alias `used-by`) | List resources that depend on this EDI profile.                                                                                                              |
| `audit <id>`                          | Show the EDI profile's audit log (change history).                                                                                                           |

***

## `celigo edi-profiles list`

List every EDI profile in the account. Default table columns: `_id`, `name`, `lastModified`.

In celigo-cli 2026.8.1 through 2026.8.8 the default `list` failed with `422 Unprocessable Entity` because the endpoint rejects the `include` projection, and only `--fields all` worked; since 2026.9.1 the default form works again (rows are trimmed client-side to the same columns).

**Signature**

```bash
celigo edi-profiles list
```

**Arguments**

None.

**Flags**

None beyond the [global flags](/cli/getting-started/global-flags.md) (`--format`, `--jq`, `--profile`, `--verbose`).

**Example**

```bash
celigo edi-profiles list --format table
```

**Corresponds to**: [`GET /v1/ediprofiles`](https://developer.celigo.com/api/api-reference/edi-profiles#get-v1-ediprofiles)

***

## `celigo edi-profiles get`

Fetch a single EDI profile by ID.

**Signature**

```bash
celigo edi-profiles get <id>
```

**Arguments**

| Argument | Type   | Required | Description        |
| -------- | ------ | -------- | ------------------ |
| `<id>`   | string | Yes      | EDI profile `_id`. |

**Flags**

None beyond the [global flags](/cli/getting-started/global-flags.md).

**Example**

```bash
celigo edi-profiles get 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`GET /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/edi-profiles#get-v1-ediprofiles-_id)

***

## `celigo edi-profiles create`

Create an EDI profile from a JSON body. Read the body from a file with `-f, --file`, or pipe it on stdin.

Since celigo-cli 2026.9.1 the command is connector-aware. `--tp-connector <id|name>` scaffolds the profile the trading partner connector prescribes — the file type, the X12 version, and the ISA/GS flags and qualifiers — with your body's fields on top (`--name` alone is body enough). The partner's and your own interchange and group ids are never invented: the connector's forms hold them as `XXXXXXXXXXXXXXX` placeholders, so the CLI lists them on stderr for you to set. A hand-written profile whose name refers to a partner that has a connector gets a stderr note naming the connector and the `--tp-connector` command to use. Browse connectors with [`trading-partner-connectors list`](/cli/commands/trading-partner-connectors.md#celigo-trading-partner-connectors-list).

**Signature**

```bash
celigo edi-profiles create --file <path>
celigo edi-profiles create < body.json     # or pipe on stdin
celigo edi-profiles create --tp-connector <id|name> --name <name> [--file <path>] [--dry-run]
```

**Arguments**

None.

**Flags**

| Flag                        | Type    | Default | Description                                                                                                                                                                                     |
| --------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f, --file <path>`         | string  | —       | Read the JSON body from a file instead of stdin (`--file -` also means stdin). Added in celigo-cli 2026.6.1.                                                                                    |
| `--tp-connector <id\|name>` | string  | —       | Scaffold the profile from this trading partner connector: the full connector name, or a base name that has one variant. Your body's fields win over the scaffold. Added in celigo-cli 2026.9.1. |
| `--name <name>`             | string  | —       | Profile name. With `--tp-connector` a body is then optional. Added in celigo-cli 2026.9.1.                                                                                                      |
| `--dry-run`                 | boolean | `false` | Print the body that would be sent (the scaffold, with `--tp-connector`) without creating anything. Added in celigo-cli 2026.9.1.                                                                |

**Request body**

A JSON object matching the `POST /v1/ediprofiles` request schema. Common top-level fields include `name`, `format` (`x12` | `edifact`), envelope settings (ISA/GS for X12, UNB/UNH for EDIFACT), and `transactions[]` with per-document definitions. With `--tp-connector` the body is optional and is merged over the scaffold.

**Example**

```bash
celigo edi-profiles create --file ./ansi-850-profile.json

# Scaffold the profile a trading partner connector prescribes; the ids left to you are listed on stderr
celigo edi-profiles create --tp-connector 7b2c3d4e5f6a7b8c9d0e1f2a --name "Acme Retail inbound"

# See the scaffold first
celigo edi-profiles create --tp-connector 7b2c3d4e5f6a7b8c9d0e1f2a --name "Acme Retail inbound" --dry-run

# Scaffold, then set the interchange ids in the same create
celigo edi-profiles create --tp-connector 7b2c3d4e5f6a7b8c9d0e1f2a --name "Acme Retail inbound" --file ./ids.json
```

**Corresponds to**: [`POST /v1/ediprofiles`](https://developer.celigo.com/api/api-reference/edi-profiles#post-v1-ediprofiles), preceded by reads of the trading partner connector catalog (`GET /v1/tpconnectors`, `GET /v1/tpconnectors/{_id}`) for the scaffold and the name check. `--dry-run` sends no `POST`.

***

## `celigo edi-profiles update`

Replace an EDI profile with a JSON body (`--file <path>` or stdin).

> ⚠️ **`update` erases omitted fields.** `PUT` is a full replace — any envelope block, transaction, or segment missing from the body is cleared. `GET` the profile first, edit it, then send back the complete object — or use `set` for partial edits.

**Signature**

```bash
celigo edi-profiles update <id> --file <path>
celigo edi-profiles update <id> < body.json     # or pipe on stdin
```

**Arguments**

| Argument | Type   | Required | Description        |
| -------- | ------ | -------- | ------------------ |
| `<id>`   | string | Yes      | EDI profile `_id`. |

**Flags**

| Flag                | Type    | Default | Description                                                                                                  |
| ------------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| `-f, --file <path>` | string  | —       | Read the JSON body from a file instead of stdin (`--file -` also means stdin). Added in celigo-cli 2026.6.1. |
| `--force`           | boolean | `false` | Submit even if the body contains masked credential values (`***`) copied from a `GET`.                       |

**Request body**

Pass the complete resource — any envelope block, transaction, or segment you omit will be removed on save. Prefer `set` for partial edits.

**Example**

```bash
celigo edi-profiles update 5f83a9b2c7d3e8f1a2b3c4d5 --file ./ansi-850-profile.json
```

**Corresponds to**: [`PUT /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/edi-profiles#put-v1-ediprofiles-_id)

***

## `celigo edi-profiles set`

Safe field edit: the CLI does a GET, applies one or more `key=value` assignments, then `PUT`s the full object back. Prefer this over `update` for partial changes — envelope and transaction nesting makes manual full-body edits error-prone.

**Signature**

```bash
celigo edi-profiles set <id> <assignments...>
```

**Arguments**

| Argument           | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                     |
| ------------------ | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<id>`             | string | Yes      | EDI profile `_id`.                                                                                                                                                                                                                                                                                                                              |
| `<assignments...>` | string | Yes      | One or more `key=value` pairs. Values are JSON-parsed (`disabled=false` → boolean, quoted strings stay strings). `key=null` removes the field. Dot notation (`envelope.ISA.senderId=ACME`) and array indexing (`transactions[0].name="850"`) are supported. Use `key=file://<path>` to load a value from a file (added in celigo-cli 2026.6.1). |

**Flags**

None beyond the [global flags](/cli/getting-started/global-flags.md).

**Examples**

```bash
# Rename a profile
celigo edi-profiles set 5f83a9b2c7d3e8f1a2b3c4d5 name="ACME X12 outbound"

# Update an envelope identifier
celigo edi-profiles set 5f83a9b2c7d3e8f1a2b3c4d5 envelope.ISA.senderQualifier=ZZ envelope.ISA.senderId=ACME
```

**Corresponds to**: [`GET /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/edi-profiles#get-v1-ediprofiles-_id) then [`PUT /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/edi-profiles#put-v1-ediprofiles-_id)

***

## `celigo edi-profiles delete`

Delete an EDI profile by ID. Prompts for confirmation unless `-y` is passed.

> ⚠️ **`delete` is immediate.** Any flow wired to this profile starts failing on the next document until you repoint it. Run `dependencies` first.

**Signature**

```bash
celigo edi-profiles delete <id> [-y]
```

**Arguments**

| Argument | Type   | Required | Description        |
| -------- | ------ | -------- | ------------------ |
| `<id>`   | string | Yes      | EDI profile `_id`. |

**Flags**

| Flag          | Type    | Default | Description                               |
| ------------- | ------- | ------- | ----------------------------------------- |
| `-y`, `--yes` | boolean | `false` | Skip the interactive confirmation prompt. |

**Example**

```bash
celigo edi-profiles delete 5f83a9b2c7d3e8f1a2b3c4d5 -y
```

**Corresponds to**: [`DELETE /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/edi-profiles#delete-v1-ediprofiles-_id)

***

## `celigo edi-profiles dependencies`

List resources that depend on this EDI profile (alias: `used-by`). Use it to check whether a profile is safe to delete — an empty result means nothing references it.

**Signature**

```bash
celigo edi-profiles dependencies <id>
```

**Arguments**

| Argument | Type   | Required | Description        |
| -------- | ------ | -------- | ------------------ |
| `<id>`   | string | Yes      | EDI profile `_id`. |

**Example**

```bash
celigo edi-profiles dependencies 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: `GET /v1/ediprofiles/{_id}/dependencies`

***

## `celigo edi-profiles audit`

Show the audit log (change history) for one EDI profile.

**Signature**

```bash
celigo edi-profiles audit <id>
```

**Arguments**

| Argument | Type   | Required | Description        |
| -------- | ------ | -------- | ------------------ |
| `<id>`   | string | Yes      | EDI profile `_id`. |

**Example**

```bash
celigo edi-profiles audit 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: `GET /v1/ediprofiles/{_id}/audit`

***

## Gotchas

* **One profile per trading partner per direction.** Inbound and outbound typically need separate profiles — inbound envelope identifiers are the partner's, outbound are yours. Clone rather than toggle.
* **Envelope identifiers are case-sensitive and padded.** X12 ISA fields are fixed-width; match exactly what the partner sends in their onboarding spec or acknowledgments will reject.
* **Profiles are referenced by flows and file definitions.** Before deleting, confirm no active flow is wired to the profile — the reference will dangle and the flow will start failing on the next document.
* **Generation endpoint is not exposed by the CLI.** `POST /v1/ediprofiles/generate` (derive a profile from a sample file) is UI-only; the workflow is complex enough that Celigo kept it in the browser.
* **API path is `ediprofiles` (no hyphen).** The CLI command is `edi-profiles`; the underlying endpoint is `/v1/ediprofiles`.
* **Interchange identity lives on the profile, never on the connection.** The ISA/GS (or UNB/UNH) sender and receiver ids and qualifiers belong to the EDI profile; the AS2 connection carries only transport identity. `create --tp-connector` scaffolds the profile's flags and qualifiers from the connector but lists the interchange and group ids for you to set — the connector's forms hold them as `XXXXXXXXXXXXXXX` placeholders.
* **A partner name is a hint, not a gate.** A hand-written profile named after a partner that has a trading partner connector gets a stderr note naming the connector and the `--tp-connector` command; the create still proceeds.

## Related

* [edi-transactions](/cli/commands/edi-transactions.md) — read the transaction log produced when flows exchange documents against these profiles.
* [file-definitions](/cli/commands/file-definitions.md) — parsing rules for the raw file formats the profile envelopes.
* [file-definition-rules](/cli/commands/file-definition-rules.md) — generate those parsing rules from a partner's specification PDF.
* [trading-partner-connectors](/cli/commands/trading-partner-connectors.md) — the connectors `create --tp-connector` scaffolds from.
* [connections](/cli/commands/connections.md) — `connections create --tp-connector` links the partner's AS2, FTP, or S3 connection to the same connector.
* [flows](/cli/commands/flows.md) — flows that reference an EDI profile to envelope or parse documents during execution.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.celigo.com/cli/commands/edi-profiles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
