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

# Document detail

> Document drill-down detail

### Path parameters

**id** `string` *required*

Document audit ID

### Response

`DocumentDetail`

**acknowledgment** `string,null`

Generated 997 / TA1 / CONTRL acknowledgment for inbound documents.

**document** `DocumentRecord` *required*

An entry in the processed-document log.

**DocumentRecord**

**control\_number** `string` *required*

**correlation\_id** `string`

Ties this record to the request's logs (and, for outbound, its delivery). Defaulted for log lines written before correlation tracking existed.

**direction** `string` *required*

`inbound` or `outbound`.

**id** `string` *required*

**partner\_id** `string` *required*

**processed\_at** `string (date-time)` *required*

**reference** `string` *required*

Human-readable handle: PO number, shipment ID, invoice number.

**status** `string` *required*

`accepted`, `rejected`, `generated`, `queued`, or legacy `sent`.

**transaction\_set** `string` *required*

Transaction set ID, e.g. `850`.

**parsed** `object`

Canonical parsed payload returned by the transaction parser.

**raw** `string` *required*

Full raw interchange or outbound wire that produced this record.

**segments** `object[]`

X12 segment list when available. Empty for EDIFACT until message-level segment rendering is promoted into the EDIFACT crate API.

**validation\_error** `string,null`

Partner-guide or parser failure when the document was rejected.

**validation\_issues** `RejectionDetail[]`

Structured guide findings with 999-grade segment/element positions. Accepted inbound findings without a validation error remain advisory warnings, including after persistence or partner-policy changes. SNIP levels and remediation details match the processing response.

**RejectionDetail**

**code** `string` *required*

Stable machine code: `set_not_accepted`, `missing_segment`, `missing_reference`, `missing_element`, `value_not_allowed`, `too_short`, `too_long`, `too_few`, `too_many`, `missing_qualified_segment`, `count_mismatch`, `bad_format`, or `condition_failed`.

**component** `integer,null`

1-based component selected by an element rule. EDIFACT defaults to 1; omitted for whole X12 elements and legacy findings without this detail. Minimum: `1`.

**element** `integer,null`

1-based element position (999 IK4-01 numbering). Minimum: `0`.

**message** `string` *required*

**recorded\_severity** `RecordedSeverity,null`

Severity recorded by the producer of a document-ledger finding. Allowed values: `'error'`, `'warning'`.

**segment** `string`

Segment tag the issue is about (empty for set-level issues).

**segment\_position** `integer,null`

1-based position counting ST (X12, 999 IK3-02) or UNH (EDIFACT) as 1. Absent when the segment is missing entirely. Minimum: `0`.

**value** `string,null`

The offending value, when one is present.

**severity** `string` *required*

Effective processing severity: `error` or `warning`. Accepted advisory findings use `warning`, preserving their SNIP classification and detail.

**snip\_level** `integer (int32)` *required*

SNIP integrity level: 2 envelope, 3 implementation-guide, 4 value/code-set. Minimum: `0`.

**suggested\_fix** `string,null`

A short remediation hint, when one is known for this issue's code.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Document drill-down detail |
| `403` | Admin credential required |
| `404` | Unknown document |

### Using this contract

Read the [source OpenAPI document](https://docs.stateset.com/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request GET \
  --url 'https://api.edi.stateset.com/v1/documents/{id}' \
  --header "Authorization: Bearer $EDI_API_TOKEN"
```

```json 200 theme={null}
{
  "acknowledgment": "string",
  "document": {
    "control_number": "string",
    "correlation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "direction": "string",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "processed_at": "2026-08-31T14:22:05Z",
    "reference": "ORD-10042",
    "status": "pending",
    "transaction_set": "string"
  },
  "parsed": null,
  "raw": "string",
  "segments": [
    {}
  ],
  "validation_error": "string",
  "validation_issues": [
    {
      "code": "string",
      "component": 1,
      "element": 1,
      "message": "Two-person tent, green — replacement for damaged pole set.",
      "recorded_severity": "error",
      "segment": "string",
      "segment_position": 1,
      "value": "49.00",
      "severity": "string",
      "snip_level": 1,
      "suggested_fix": "string"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.