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

<ParamField path="id" type="string" required>
  Document audit ID
</ParamField>

### Response

`DocumentDetail`

<ResponseField name="acknowledgment" type="string">
  Generated 997 / TA1 / CONTRL acknowledgment for inbound documents.
</ResponseField>

<ResponseField name="document" type="DocumentRecord" required>
  <Expandable title="DocumentRecord">
    <ResponseField name="control_number" type="string" required />

    <ResponseField name="correlation_id" type="string">
      Ties this record to the request's logs (and, for outbound, its delivery). Defaulted for log lines written before correlation tracking existed.
    </ResponseField>

    <ResponseField name="direction" type="string" required>
      `inbound` or `outbound`.
    </ResponseField>

    <ResponseField name="id" type="string" required />

    <ResponseField name="partner_id" type="string" required />

    <ResponseField name="processed_at" type="string (date-time)" required />

    <ResponseField name="reference" type="string" required>
      Human-readable handle: PO number, shipment ID, invoice number.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      `accepted`, `rejected`, or `sent`.
    </ResponseField>

    <ResponseField name="transaction_set" type="string" required>
      Transaction set ID, e.g. `850`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="parsed" type="object">
  Canonical parsed payload returned by the transaction parser.
</ResponseField>

<ResponseField name="raw" type="string" required>
  Full raw interchange or outbound wire that produced this record.
</ResponseField>

<ResponseField name="segments" type="object[]">
  X12 segment list when available. Empty for EDIFACT until message-level segment rendering is promoted into the EDIFACT crate API.
</ResponseField>

<ResponseField name="validation_error" type="string">
  Partner-guide or parser failure when the document was rejected.
</ResponseField>

<ResponseField name="validation_issues" type="crate.partners.ValidationIssue[]">
  Structured guide violations behind `validation_error`, with 999-grade segment/element positions — everything a partner needs to fix the file.
</ResponseField>

### Status codes

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://edi.stateset.com/v1/documents/{id}' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```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": []
  }
  ```
</ResponseExample>
