Data extract APIs
Data extraction APIs are designed to provide programmatic access to the transactional data (the documents, events, payload, and trading partner information) as it moves through the network. You can use the APIs to create custom scripts, alerts, or reports. The capability can help you easily access data for analysis and decision-making.
Overview
Data extraction APIs can help augment the UI such that you can access the data without logging in to InFlight. The API is able to extract the data by using your client ID and secret.
The API has the following capabilities and features.
- Use filters like direction, document type, sender and receiver IDs, and timestamps to retrieve relevant documents.
- Retrieve full or summary details of a document by using its ID, document code, reference number, or JMS identifiers.
- Use the document count endpoint to get the number of documents that meet your criteria.
- Access the raw payload that is associated with a document event by using the payload ID.
- Query the sender and receiver IDs to correlate EDI IDs with trading partners in your internal applications.
- Build scripts to monitor document states and trigger alerts when issues arise.
- Integrate document tracking and event data into your own applications for real-time visibility.
Use case
The following are some of the use cases of the Data extract APIs.
- EDI transaction status
- When something goes wrong with an EDI document, you must login into InFlight to find, check, and resolve the issue. However, with the Data extract APIs, you can create custom script to query the document status and retrieve the details.
- Enhance the UI
- You might want to inquire about the state of document delivery. In such a case, you can customize your in-house user interface (UI) to include events from your B2Bi SaaS instance.
- Pending document status
- Sometimes, some documents that were sent to your B2Bi SaaS instance produce an error and are therefore not received in the application. Such documents, since not delivered, do not appear in the application. You can trace such documents by using the Data extract APIs.
- Examine documents to triage issues
- You might need to scan and examine the contents of a document from within your B2Bi SaaS instance. In such a case, you can enhance the capabilities of your in-house UI by using the Data extract APIs to gain full visibility.
API endpoints
The following table contains an indicative list of endpoints in the API.
| Capability | Use | Parameters |
|---|---|---|
| Search documents | GET/v2/geos/{geo}/environments/{environment}/documents
retrieves a list of documents with filters if available. For example, direction,
doc_type, sender_id, or receiver_id. |
|
| Get document by ID | GET/v2/geos/{geo}/environments/{environment}/documents/id/{id}
retrieves a full document by its identifiers. |
|
| Get the document by the document code | GET/v2/geos/{geo}/environments/{environment}/documents/code/{documentCode}
retrieves a full document using a document code. |
|
| Get the document by reference number | GET/v2/geos/{geo}/environments/{environment}/documents/referencenumber/{id}
retrieves a summary of documents that match a reference number. |
|
| Get document by JMS message ID | GET/v2/geos/{geo}/environments/{environment}/documents/jmsmessageid/{id}
retrieves a document summary by JMS message ID. |
|
| Get document by JMS correlation ID | GET/v2/geos/{geo}/environments/{environment}/documents/jmscorrelationid/{id}
retrieves a document summary by JMS correlation ID. |
|
| Get document by JMS ID | GET/v2/geos/{geo}/environments/{environment}/documents/jmsid/{id}
retrieves a document summary by JMS ID. |
|
| Get document count | GET/v2/geos/{geo}/environments/{environment}/documentcount
retrieves the count of documents that match the specified filters. |
|
| Get payload by ID | GET/geos/{geo}/environments/{environment}/payloads/{id}
retrieves the payload that is associated with a document event.Note: This path does not include
/v2. |
|
| Get attachment by index | GET/geos/{geo}/environments/{environment}/payloads/{id}/attachments/{index}
retrieves the payload index. |
|
| Lookup trading partner | POST/v2/geos/{geo}/environments/{environment}/tradingpartners
shared trading partner details along with their respective EDI IDs. |
|
Access the API
For more information, see Data extract APIs.