Poll Executions

Poll for new file executions that Stedi has recently processed.

GET/polling/executions

This endpoint returns file executions that Stedi processed after the specified startDateTime.

Executions are ordered from oldest to newest according to the processedAt property. This is exclusive of the startDateTime. For example, if the provided startDateTime is 2023-08-10T18:00:00Z, an execution processed at exactly that time would not be included in the results. There is also a fifteen-second window where newly created executions are excluded, meaning Stedi returns results up to fifteen seconds before the time of your request. This functionality accounts for any network latency or clock drift within the systems to ensure you don't miss any executions.

Polling with page tokens

We don't recommend polling using startDateTime only. Due to the exclusive nature of startDateTime, you could potentially miss an execution if two executions occur at the exact same time and are on the edge of a pagination. Instead, you should use pageToken.

After the initial request, you can poll again immediately using pageToken to continue iterating through the pages of executions. The endpoint always returns a nextPageToken, regardless of whether additional executions match the request criteria. If the items array is empty, continue using the provided nextPageToken to poll for new executions. New executions will be returned when available.

We recommend storing pageToken values as part of your polling process. They don't expire, allowing you to start from that point in the execution stream again if you need to catch a system up to date or recover from a failure.

Note that pageToken values are unique per request, opaque, and shouldn't be parsed or modified in any way. They are not guaranteed to be in any particular format, and may change in the future.

Authorizationstringrequiredheader

A Stedi API Key for authentication.

Query Parameters

pageSizenumber

The maximum number of elements to return in a page. You can set this to a maximum of 500 elements. If not specified, the default is 100.

  • Range: ≥ 1
pageTokenstring

A token returned by a previous call to this operation in the nextPageToken. If not specified, Stedi returns the first page of results.

You must supply either this property or startDateTime in every request.

  • Required string length: 1 - 1024

An ISO 8601 formatted string. For example 2023-08-28T00:00:00Z. Stedi returns executions processed after this time.

You must supply either this property or pageToken in every request. The startDateTime must be at least one minute in the past.

  • Format: date-time

Response

application/json

ListPollingExecutions 200 response

Token for pagination to retrieve the next page of results; null if there are no more results

  • Required string length: 1 - 1024
itemsarray<object>required

The processed executions that match the request criteria. The items array is empty if there are no matching executions.

Array item
items[].createdAtstringrequired

The date and time when the resource was created, in ISO 8601 format. For example, 2023-08-28T00:00:00Z.

  • Format: date-time
items[].updatedAtstringrequired

The date and time when the resource was last updated, in ISO 8601 format. For example, 2023-08-28T00:00:00Z.

  • Format: date-time
items[].executionIdstringrequired

A unique identifier for the processed file within Stedi. This ID is included in the transaction processed event. You can also retrieve it manually from the file's details page in the Stedi portal.

items[].statusstringrequired

The status of the execution. An execution is COMPLETED when Stedi has finished processing the file with no errors. If the file is an outbound file, a COMPLETED status also means that Stedi successfully delivered it to the configured connection.

Possible values
COMPLETED
PARTIALLY_COMPLETED
FAILED
IGNORED
IN_PROGRESS
items[].directionstringrequired

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.

Possible values
INBOUND
OUTBOUND
UNKNOWN

The number of individual transactions included in the file.

The number of errors that occurred during processing. If the file was successfully processed completely, this value is 0.

A code specifying the reason for the fault.

Possible values
DELIVERY_FAILURE
FAILED_TO_EXTRACT_BUSINESS_IDENTIFIERS
FAILED_TO_FIND_GUIDE
FAILED_TO_FIND_LOCAL_PROFILE
FAILED_TO_FIND_PARTNER_PROFILE

A message providing more information about the fault. Note that if there are multiple faults, Stedi sets the first fault as the code and corresponding message.

The file format. For example, EDI/EDIFACT for an EDIFACT file or EDI/X12 for an X12 EDI file.

Possible values
CSV
EDI/EDIFACT
FILEPART
JSON
PSV

If true, you can retry the file in the Stedi portal.

The ID of this execution's parent execution, if it is part of a retry chain. When you retry a file, Stedi creates a child execution with a new ID and links it to the original (parent) execution.

The ID of this execution's child execution, if it is part of a retry chain. When you retry a file, Stedi creates a child execution with a new ID and links it to the original (parent) execution.

The unique identifier for the partnership within the Stedi platform.

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.

  • Pattern: ^([a-zA-Z0-9._-]+)$
  • Required string length: 1 - 81

The type of connection used for exchanging files.

Possible values
bucket
remote-ftp
stedi-ftp
as2

An autogenerated identifier for the connection within the Stedi platform.

  • Pattern: ^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$

The source of the file, including the directory where Stedi received it and the file name.

Show attributes

The directory where Stedi received the file for processing.

items[].source.namestringrequired

The name of the file.