Get Fragment
Retrieve metadata for a fragment.
/transactions/{transactionId}/fragments/{fragmentIndex}
This endpoint retrieves metadata about a specific fragment within a transaction. To retrieve the fragment itself, use the Get Fragment Output endpoint.
Fragments allow you to split large transactions into smaller chunks for easier processing. You can enable fragments for one repeated EDI segment in each transaction set and then split the transaction into chunks based on that segment.
A Stedi API Key for authentication.
Path Parameters
A unique identifier for the processed transaction within Stedi. This ID is included in the transaction processed event. You can also retrieve it manually from the transaction's details page within the Stedi app.
The identifier for a specific fragment within a processed transaction. This ID is included in the fragment processed event, or you can retrieve it manually from the transaction's details page within the Stedi app.
Response
GetTransactionFragment 200 response
A unique identifier for the processed transaction containing this fragment. This ID is included in the transaction processed event. You can also retrieve it manually from the transaction's details page within the Stedi portal.
A unique identifier for the processed file containing this fragment. This ID is included in the file processed event. You can also retrieve it manually from the file's details page in the Stedi portal.
The direction of the transaction. Inbound transactions are those you receive from a payer, provider, or other trading partner. Outbound transactions are those you send to a payer, provider, or other trading partner.
INBOUND
OUTBOUND
UNKNOWN
Indicates whether the transaction contains test or production data. Stedi determines this from the value in ISA15
Usage Indicator Code.
test
production
other
The date and time when Stedi processed the transaction containing the fragment, in ISO 8601 format. For example, 2023-08-28T00:00:00Z
.
- Format:
date-time
The identifier for the fragment within a processed transaction.
Details about fragments included in the transaction, if applicable. Fragments break large transactions into smaller parts for easier processing and management.
The URL to review the transaction within the Stedi portal.
A list of artifacts related to the transaction containing the fragment.
Information about the associated partnership.
A partnership describes all aspects of the EDI relationship between two profiles in your Stedi account, such as which transaction sets they will exchange and other important information for processing EDI files.
Details about the X12 EDI transaction.
curl --request GET \
--url "https://core.us.stedi.com/2023-08-01/transactions/{transactionId}/fragments/{fragmentIndex}" \
--header "Authorization: <api_key>"
fetch("https://core.us.stedi.com/2023-08-01/transactions/{transactionId}/fragments/{fragmentIndex}", {
headers: {
"Authorization": "<api_key>"
}
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://core.us.stedi.com/2023-08-01/transactions/{transactionId}/fragments/{fragmentIndex}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api_key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://core.us.stedi.com/2023-08-01/transactions/{transactionId}/fragments/{fragmentIndex}"
response = requests.request("GET", url, headers = {
"Authorization": "<api_key>"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://core.us.stedi.com/2023-08-01/transactions/{transactionId}/fragments/{fragmentIndex}"))
.header("Authorization", "<api_key>")
.GET()
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
{
"message": "string"
}
{
"message": "string",
"code": "string"
}
{
"message": "string",
"code": "string"
}
{
"message": "string",
"code": "string"
}
{
"message": "string",
"code": "string"
}
{
"message": "string",
"cause": {
"name": "string",
"message": "string",
"stack": "string"
}
}
{
"message": "string",
"code": "string"
}
{
"message": "string",
"code": "string"
}