POST
/
fragments
/
{fragmentGroupId}
curl --request POST \
  --url https://core.us.stedi.com/2023-08-01/fragments/{fragmentGroupId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "guideId": "01HQ1XPE9C3SCEB2ND7VC53A8M",
  "fragment": {
    "baseline_item_data_PO1_loop": [
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "123",
          "quantity_02": 3,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 3
        }
      },
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "456",
          "quantity_02": 4,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 4
        }
      },
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "789",
          "quantity_02": 5,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 5
        }
      },
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "756",
          "quantity_02": 3,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 3
        }
      },
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "432",
          "quantity_02": 4,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 4
        }
      },
      {
        "baseline_item_data_PO1": {
          "assigned_identification_01": "543",
          "quantity_02": 5,
          "unit_or_basis_for_measurement_code_03": "XX",
          "unit_price_04": 5
        }
      }
    ]
  }
}'
{
  "fragmentGroupId": "some-transaction-id",
  "createdAt": "2024-02-21T00:00:00Z",
  "fragmentId": "d3b3e3e3-3e3e-3e3e-3e3e-3e3e3e3e3e3e"
}

You can optionally specify a mapping to transform the fragment to Stedi’s Guide JSON format. If you don’t specify a mapping, the fragment must match the Guide JSON format for the specified guide.

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. For example, if you enable fragments on the LIN loop in an 846 Inventory Inquiry/Advice, you can stage fragments containing batches of LIN loops. Later, when you call the Create Outbound Transaction endpoint, Stedi stitches the fragments together into a single transaction and delivers it to your trading partner.

Authorizations

Authorization
string
header
required

A Stedi API Key for authentication.

Headers

Idempotency-Key
string

A unique string to identify this request to the server. The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents sending duplicate data to your trading partners in case of network errors or other intermittent failures. Learn more.

Path Parameters

fragmentGroupId
string
required

A unique ID for a group of fragments on Stedi. Stedi creates a new fragment group if one does not exist with the specified ID.

Body

application/json

Response

201
application/json
CreateOutboundFragment 201 response

The response is of type object.