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

# Get Execution Metadata

> Fetch a file execution's metadata document.

This endpoint retrieves a file execution's metadata document.

There are no size restrictions on documents when fetching from this endpoint.

## Response

This endpoint returns a 302 Temporary redirect to the document download URL. Many HTTP clients will automatically follow this redirect, or have a simple follow redirects configuration to set. For example, using the `-L` or `--location` flag in cURL will automatically follow the redirect. In this case, the response will contain the full metadata document.

In the event you cannot, or chose not to automatically follow the redirect, the body of the response contains a JSON object with a single key `documentDownloadUrl` which contains a temporary URL to download the document. This URL is available for 60 minutes.

## Example

The following is an example of the metadata document for a 277CA claim acknowledgment:

<Accordion title="Metadata example">
  ```json Example X12 metadata response
  {
    "version": "2024-01-01",
    "interchanges": [
      {
        "envelope": {
          "senderQualifier": "ZZ",
          "senderId": "STEDITEST",
          "receiverQualifier": "ZZ",
          "receiverId": "111222333444555",
          "date": "2025-02-12",
          "time": "22:20",
          "versionNumberCode": "00501",
          "controlNumber": 11,
          "acknowledgmentRequestedCode": "0",
          "usageIndicatorCode": "T",
          "trailer": {
            "numberOfIncludedFunctionalGroups": 1,
            "controlNumber": 11
          },
          "segments": {
            "isa": "ISA*00*          *00*          *ZZ*STEDITEST      *ZZ*111222333444555   *250212*2220*^*00501*000000011*0*T*:",
            "iea": "IEA*1*000000011"
          }
        },
        "acknowledgments": [],
        "standard": "x12",
        "span": {
          "start": 0,
          "end": 941
        },
        "delimiters": {
          "segment": "~",
          "element": "*",
          "composite": ":",
          "repetition": "^"
        },
        "functionalGroups": [
          {
            "envelope": {
              "functionalIdentifierCode": "HN",
              "applicationSenderCode": "STEDITEST",
              "applicationReceiverCode": "111222333444555",
              "date": "2025-02-12",
              "time": "22:20:43",
              "controlNumber": 11,
              "responsibleAgencyCode": "X",
              "release": "005010X214",
              "trailer": {
                "numberOfIncludedTransactionSets": 1,
                "controlNumber": 11
              },
              "segments": {
                "gs": "GS*HN*STEDITEST*111222333444555*20250212*222043*11*X*005010X214",
                "ge": "GE*1*11"
              }
            },
            "span": {
              "start": 106,
              "end": 925
            },
            "transactionSets": [
              {
                "id": "277",
                "controlNumber": "1001",
                "implementationConventionReference": "005010X214",
                "trailer": {
                  "numberOfIncludedSegments": 26,
                  "controlNumber": "1001"
                },
                "span": {
                  "start": 167,
                  "end": 917
                },
                "trackedIdentifiers": {
                  "BHT-03": [
                    "181135085"
                  ],
                  "TRN-02": [
                    "20250212170508224",
                    "12341234",
                    "0",
                    "01J99GTR3J1X4C303BCMEX2KSZ"
                  ]
                }
              }
            ]
          }
        ]
      }
    ]
  }
  ```
</Accordion>
