> 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, or TRADACOMS documents for a specific trading partner.

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

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

Supports all [global flags](https://developer.celigo.com/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 [--fields <spec>] [--limit <n>] [--file-type <type>]
```

**Arguments**

None.

**Flags**

| Flag                 | Type    | Default   | Description                                                                                                                                                                                                                                                                       |
| -------------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--fields <spec>`    | string  | `default` | Fields to print per row. `default` prints `_id`, `name`, and the table columns; `all` prints complete documents; a comma-separated list selects specific fields (dot notation allowed). See [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md). |
| `--limit <n>`        | integer | —         | Return at most `<n>` rows, fetching a single page.                                                                                                                                                                                                                                |
| `--file-type <type>` | string  | —         | Only the profiles of this EDI standard: `edix12`, `edifact`, or `tradacoms`. Any other value is refused before the request. Sent as `fileType`. Added in celigo-cli 2026.11.2.                                                                                                    |

**Example**

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

# Only the EDIFACT profiles
celigo edi-profiles list --file-type edifact --format table
```

**Corresponds to**: [`GET /v1/ediprofiles`](https://developer.celigo.com/api/api-reference/b2b-manager/edi-profiles#get-v1-ediprofiles) — with `fileType` as a query parameter under `--file-type`.

***

## `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](https://developer.celigo.com/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/b2b-manager/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). Interchange and group ids are never invented: the partner's come from the connector when its form prescribes them — a form that holds the `XXXXXXXXXXXXXXX` stand-in leaves them to you — and your own never do. Since celigo-cli 2026.10.1, a value the form prescribes for your own interchange or group id (`myInterchangeId`, `myGroupId`) is not copied into the profile: no connector can know the ids you trade under. Every id left to you is listed on stderr. 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`](https://developer.celigo.com/cli/commands/trading-partner-connectors.md#celigo-trading-partner-connectors-list).

Since celigo-cli 2026.10.2, the scaffold stores two envelope values the way inbound parsing matches them. The platform's parser trims the file's ISA02, ISA04 and ISA06 but compares the profile's values as stored. So a blank ISA02 or ISA04 (`isa02`, `isa04`) that the connector's form fills with spaces is stored as `""`, and a partner interchange id (`tpInterchangeId`) that the form pads to 15 characters is stored trimmed. Stderr says what changed — for example, `Note: Stored isa02 and isa04 as "" where the connector's form has spaces: inbound parsing matches a blank ISA02/ISA04 only against an empty value.` Values in your own body are sent as written. Earlier releases copied the form's values unchanged, and such a profile failed every inbound file with `422` "… doesn't match with the expected data in the EDI profile".

Since celigo-cli 2026.11.2, the scaffold keeps two more of a form's stand-ins out of the profile:

* Some forms hold a role word such as `SENDERID`, or nothing, where the partner's interchange or group id goes. The scaffold leaves that id out, and stderr lists it with the ids to set. Earlier releases stored the word as the partner's id.
* An EDIFACT form's control number is sent as the integer the profile takes. A value that is not a number is left out, and stderr says so: `Note: Left out controlNumber: the connector's form has 'N/A', which is not an integer from 1 to 999999999 — the profile starts at the platform's default, 1.`

Also since celigo-cli 2026.11.2, a `--tp-connector` reference with no letters or digits, such as `"---"`, is refused instead of being matched to a connector.

Since celigo-cli 2026.10.1, the body — or the scaffold — is checked before it is sent, and before `--dry-run` prints it: a body that is not a JSON object, or that holds masked credential placeholders (`"******"`), is refused with no override, and the body is checked against the published API schemas — a field the spec does not document, a wrong JSON type, or a value outside an enum prints a warning on stderr, and the request is still sent. A blank `--tp-connector` or `--name` (an unset shell variable) is refused.

**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, and waits for it to close). With `--tp-connector`, a body piped without `--file` must start arriving within 1 second (since celigo-cli 2026.10.1; it was 50 ms). 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/b2b-manager/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`. Since celigo-cli 2026.10.1 a mask is four or more asterisks and nothing else; a lone `*` is sent as a value. |

**Request body**

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

Since celigo-cli 2026.10.1, `update` checks the body against the published API schemas before sending: a field the spec does not document, a wrong JSON type, or a value outside an enum prints a warning on stderr, and the request is still sent. Only what the update adds or changes is reported — when the body has findings, the current copy is read first, and shapes it already holds are not.

**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/b2b-manager/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.

Since celigo-cli 2026.10.1, the document is checked against the published API schemas before the PUT (warnings on stderr, never a block; shapes the profile already holds are not reported), and when the server's reply still holds a field's previous value, `set` prints `not stored <field> the server answered the PUT but still holds its previous value …` on stderr and exits 1. An EDI profile has no operate-level fields, so `set` needs `full` mode.

**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](https://developer.celigo.com/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/b2b-manager/edi-profiles#get-v1-ediprofiles-_id) then [`PUT /v1/ediprofiles/{_id}`](https://developer.celigo.com/api/api-reference/b2b-manager/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/b2b-manager/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 stored unpadded.** X12 ISA fields are fixed-width in the file, but inbound parsing trims the file's ISA02, ISA04 and ISA06 and compares them with the profile's values as stored. Store a blank ISA02/ISA04 as `""` and the partner's interchange id without padding. A space-filled blank or a padded id fails every inbound file with `422` "… doesn't match with the expected data in the EDI profile". `create --tp-connector` stores the values it copies from the connector's form this way (since celigo-cli 2026.10.2); values in your own body are sent as written.
* **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 left for you to set — the partner's where the form holds a stand-in (`XXXXXXXXXXXXXXX`, or since celigo-cli 2026.11.2 a role word such as `SENDERID`), and your own, which it never copies from the form.
* **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. Since celigo-cli 2026.10.1 it also proceeds when the catalog read behind the note fails: stderr says `Note: could not check trading partner connectors for "Acme Retail inbound": <reason>`.

## Related

* [edi-transactions](https://developer.celigo.com/cli/commands/edi-transactions.md) — read the transaction log produced when flows exchange documents against these profiles.
* [file-definitions](https://developer.celigo.com/cli/commands/file-definitions.md) — parsing rules for the raw file formats the profile envelopes.
* [file-definition-rules](https://developer.celigo.com/cli/commands/file-definition-rules.md) — generate those parsing rules from a partner's specification PDF.
* [trading-partner-connectors](https://developer.celigo.com/cli/commands/trading-partner-connectors.md) — the connectors `create --tp-connector` scaffolds from.
* [connections](https://developer.celigo.com/cli/commands/connections.md) — `connections create --tp-connector` links the partner's AS2, FTP, or S3 connection to the same connector.
* [flows](https://developer.celigo.com/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
