INFINITE-REST-API Getting Started Guide
Introduction
INFINITE-REST-API is a RESTful service for sending to and retrieving from Infinite EDI-type documents.
INFINITE-REST-API consists of three functional parts.
-
Start with Authentication to receive authorization token needed in next steps or use token received in previous communication. Authorization token is valid for 5 minutes. Every other request done in 5 minutes can be authorized by this token.
-
Upload content of EDI documents to send single document
-
Start with Authentication to receive authorization token needed in next steps or use token received in previous communication. Authorization token is valid for 5 minutes. Every other request done in 5 minutes can be authorized by this token.
-
Download single transmission status to receive status of sent document. Every document sent to infinite gains different statuses during processing. This option gives ability to see current processing status.
-
Confirm receive EDI transmission statuses removes status received in previous step from status queue. This step gives access to next status ready to download.
-
Start with Authentication to receive authorization token needed in next steps or use token received in previous communication. Authorization token is valid for 5 minutes. Every other request done in 5 minutes can be authorized by this token.
-
Download metadata of EDI documents to obtain
documentId
for use in next step. -
Download content of EDI documents to download and store single document in local system.
-
Confirm receive EDI documents to delete metadata of downloaded document form event queue. IMPORTANT: confirming receive EDI document must be proceeded to gain access to next document in the queue. Omitting this step will result in that download metadata will return still the same
documentId
Overview
HTTP verbs
INFINITE-REST-API service tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
Verb | Usage |
---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to update an existing resource, full updates only |
|
Used to delete an existing resource |
HTTP status codes
INFINITE-REST-API service tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
Status code | Usage |
---|---|
|
Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request, the response will contain an entity describing or containing the result of the action. |
|
The request has been fulfilled, resulting in the creation of a new resource. |
|
The request has been accepted for processing, but the processing has not been completed. The request might or might not be eventually acted upon, and may be disallowed when processing occurs. |
|
The server successfully processed the request, but is not returning any content. |
|
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). |
|
Authentication is required and has failed or has not yet been provided. The user does not have the necessary credentials. |
|
The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort. |
|
The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible. |
|
The requested content has been permanently deleted from server, with no forwarding address. |
|
The requested exam cannot be used (it doesn’t exist or is in wrong state) |
|
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. |
|
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state. |
Resources
Authentication
Any request to resources must be authenticated and authorized based on authorization token passed in HTTP header Authorization
.
Obtain authorization token
A POST
request is used to obtain authorization token. E.g when user name is exampleClientId
and password is exampleClientPass
make a string
exampleClientId:exampleClientPass
and obtain its Base64 witch is ZXhhbXBsZUNsaWVudElkOmV4YW1wbGVDbGllbnRQYXNz
and use it in authorization header with prefix Basic
Example HTTP request
POST /oauth2/token HTTP/1.1
Host: api-edi.infinite-paperless.com
Authorization: Basic ZXhhbXBsZUNsaWVudElkOmV4YW1wbGVDbGllbnRQYXNz
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
Body part of this request should be grant_type=client_credentials . Don’t replace literal client_credentials with user name, password or anything else.
|
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/oauth2/token' -i -X POST \
-H 'Authorization: Basic ZXhhbXBsZUNsaWVudElkOmV4YW1wbGVDbGllbnRQYXNz' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials'
Request headers
Name | Optional | Description |
---|---|---|
|
|
Basic authorization data, where credentials is the base64 encoding of id and password joined by a single colon : |
Request body
grant_type=client_credentials
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1934
{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyOWYyMjM3ZC1hYTNiLTQzN2EtOGRmZS04YmJkNTZmMGQ1NDMiLCJjbGllbnRJZCI6IjBlNzZhMGIyLTM1YWUtNDE2Ny1hN2E5LTE5NjJmYWE4OGU1ZCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNTY4MjA1NTk1LCJpYXQiOjE1NjgyMDUyOTUsImp0aSI6IjJlMjQ4YzNlLWU5YjgtNGEzMi05NzdjLTFjMDQ1ZDMyMmFjNSJ9.VRI14tpTW7EztUXo3fYH4k-yFvTARrcf0StY6qXEIhw","expires_in": 3600,"token_type": "bearer"}
Be sure to preserve access_token for authenticating further communication.
|
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Access token. |
|
|
|
How long access token is valid (in seconds). |
|
|
|
Access token type |
Documents
The Documents resource is used to send and receive EDI-type documents.
Upload content of EDI documents
A POST
request uploads a specific EDI document (order, invoice or anything else).
Example HTTP request
POST /api/base/documents HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiNDZlNGUyNi03Njg2LTRjMzItODY1Zi1mNzMxNjYzYmI2MWUiLCJjbGllbnRJZCI6IjZmYzgzOWQ2LTE1NzEtNGI4ZC05MWZkLWZjZjVmNmMwZWRmZCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAzLCJpYXQiOjE2NTc3MTI1MDMsImp0aSI6IjJiMTFiZGM3LTJhYjQtNGYwNS1hZDgxLWM0YjAzZWZhOGY2NiJ9.h1mC4XQuLdJnW_u4Hv9O5ENJIPbtT4LXuD48nmSj23g
X-EDI-Version: v1
X-EDI-DocumentType: XML_INFINITE_ORDER
X-EDI-ClientTransmissionId: 1aa916eb-37c4-4e7a-8790-bb84c0361eca
Content-Length: 30
Host: api-edi.infinite-paperless.com
request document content bytes
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/documents' -i -X POST \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiNDZlNGUyNi03Njg2LTRjMzItODY1Zi1mNzMxNjYzYmI2MWUiLCJjbGllbnRJZCI6IjZmYzgzOWQ2LTE1NzEtNGI4ZC05MWZkLWZjZjVmNmMwZWRmZCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAzLCJpYXQiOjE2NTc3MTI1MDMsImp0aSI6IjJiMTFiZGM3LTJhYjQtNGYwNS1hZDgxLWM0YjAzZWZhOGY2NiJ9.h1mC4XQuLdJnW_u4Hv9O5ENJIPbtT4LXuD48nmSj23g' \
-H 'X-EDI-Version: v1' \
-H 'X-EDI-DocumentType: XML_INFINITE_ORDER' \
-H 'X-EDI-ClientTransmissionId: 1aa916eb-37c4-4e7a-8790-bb84c0361eca' \
-d 'request document content bytes'
X-EDI-DocumentType is the name of mapping used by infinite system to consume send file.
It should by obtained from Infinite Implementation Team. `XML_INFINITE_ORDER' is just an example not part of the solution.
|
Request headers
Name | Optional | Description |
---|---|---|
|
|
Word |
|
|
API version |
|
|
Document type, for example: XML_INFINITE_ORDER, XML_INFINITE_INVOICE |
|
|
Unique client transmission id. This parameter is used to identify duplicated requests. |
|
|
Unique client transmission channel id. This optional parameter can be used to identify the device sending request in case when the same access token is used by multiple devices. |
|
|
MD5 checksum of document content |
Request body
request document content bytes
Example response
HTTP/1.1 202 Accepted
Content-Type: application/json;charset=UTF-8
Content-Length: 111
{"transmissionId":"daea18a3-4e1a-4bce-86a8-866dc463595c","documentChecksum":"814702b4a451fc5bf1443b248d143672"}
After document upload one can check status of it. The status checking process consists of two
requests Download single transmission status and Confirm receive EDI transmission statuses. Remember to save transmissionId from this response for the purpose of this requests. You can also use batch api to Download multiple transmission statuses and Confirm receive multiple EDI transmission statuses at the same time.
|
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Unique transmission id assigned to not duplicated requests. Requests are deduplicated by X-EDI-ClientTransmissionId header. Any future transmission status related to this request will be identified by this value. |
|
|
|
MD5 checksum of document content |
Download content of EDI documents
This section describes how to download a document from infinite system. Before downloading one have to Download metadata of EDI documents to obtain documentId
and after document download Confirm receive EDI documents. This confirmation removes document form queue of documents ready for download.
A GET
request downloads a specific EDI document content.
Example HTTP request
GET /api/base/documents/4d472c63-f8c8-4041-8963-c4f1759e90c0/content HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4NzI2Y2JmZi0wOGNlLTQyNDEtOGVjNy00ZmE2MmVmMzk4ZTciLCJjbGllbnRJZCI6ImY5ZjJhYTgwLTBhZWMtNDZiOC1hMzU0LWY2YWRhMWRkMDlmOCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6IjljZmZhMDQ5LWJmMDAtNDYxNC1hMjZjLWZkYjJkY2RiYWQ0OCJ9.WMt3-zPvORoZnWW9afgOoAeOYnFOCoRUeY67ATSha4g
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/documents/4d472c63-f8c8-4041-8963-c4f1759e90c0/content' -i -X GET \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4NzI2Y2JmZi0wOGNlLTQyNDEtOGVjNy00ZmE2MmVmMzk4ZTciLCJjbGllbnRJZCI6ImY5ZjJhYTgwLTBhZWMtNDZiOC1hMzU0LWY2YWRhMWRkMDlmOCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6IjljZmZhMDQ5LWJmMDAtNDYxNC1hMjZjLWZkYjJkY2RiYWQ0OCJ9.WMt3-zPvORoZnWW9afgOoAeOYnFOCoRUeY67ATSha4g' \
-H 'X-EDI-Version: v1'
Path parameters
/api/base/documents/{documentId}/content
Parameter | Optional | Description |
---|---|---|
|
|
Document id (obtained from GET method on /api/base/events-queue/documents resource Download metadata of EDI documents) to download document content |
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
Example response
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 31
response document content bytes
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
Event queue
The event queue resource is abstraction of awaiting events to retrieve.
Documents event queue
The documents event queue resource is used to obtain metadata and confirm receive awaiting EDI documents. It gives information needed to download the document described in Download content of EDI documents.
Download metadata of EDI documents
A GET
request download metadata of first awaiting EDI document from documents event queue.
Example HTTP request
GET /api/base/events-queue/documents HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYzJhODAwZi01MzYzLTQ1ZTktYTZiMy03OWZmMjNhMjNkZmMiLCJjbGllbnRJZCI6ImQ5ZGM2OGQ4LTA4MWQtNDc1Mi1hYTkxLTIzNjA0YTdkZjJlNyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6Ijg4OGEyYTJhLTk1ZDUtNGYwNS1hYmVjLTg3MmY2YTBlZmM3NyJ9.J6XUyq2YoNPZypyPH8SHk1u5LA3Df8LzfJri9eauDfo
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/events-queue/documents' -i -X GET \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYzJhODAwZi01MzYzLTQ1ZTktYTZiMy03OWZmMjNhMjNkZmMiLCJjbGllbnRJZCI6ImQ5ZGM2OGQ4LTA4MWQtNDc1Mi1hYTkxLTIzNjA0YTdkZjJlNyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6Ijg4OGEyYTJhLTk1ZDUtNGYwNS1hYmVjLTg3MmY2YTBlZmM3NyJ9.J6XUyq2YoNPZypyPH8SHk1u5LA3Df8LzfJri9eauDfo' \
-H 'X-EDI-Version: v1'
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-EDI-QueueLength: 1
Content-Length: 185
{"eventId":"f78876a8-be41-47d2-9a86-4231d7edce2b","documentId":"d1b84e10-0b92-4c73-b1dc-70719f6dbc61","documentType":"ExampleType","documentChecksum":"814702b4a451fc5bf1443b248d143672"}
Remember to save documentId and use it in Download content of EDI documents
|
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
|
|
Events queue length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Event id to confirm receive document metadata and content |
|
|
|
Document id to download its content |
|
|
|
Document type, for example: ORDER, INVOICE |
|
|
|
MD5 checksum of document content |
Confirm receive EDI documents
After downloading document one have to delete it from queue to gain access to further documents.
A DELETE
request confirm receive EDI document metadata and related content.
Example HTTP request
DELETE /api/base/events-queue/documents/45c8a570-e443-45e3-a100-ff52d15d1c13 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjYmExZGY3OS0yYWQ5LTQwM2EtYWMyZi05MGZhMTE0YjJmYjQiLCJjbGllbnRJZCI6IjUwYWMxZjJkLTkzNGEtNGJlNi05ZjJhLTExMWM2YzU1MzBmNyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6ImRjNjJkMTU4LWZmMTYtNGU5Zi1iYTZiLTU2NThkODgyMzBkOSJ9.N7kksqnYOEvu2o3SjIYcn_QYoFDfSqBSJLA-cJZaLTM
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/events-queue/documents/45c8a570-e443-45e3-a100-ff52d15d1c13' -i -X DELETE \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjYmExZGY3OS0yYWQ5LTQwM2EtYWMyZi05MGZhMTE0YjJmYjQiLCJjbGllbnRJZCI6IjUwYWMxZjJkLTkzNGEtNGJlNi05ZjJhLTExMWM2YzU1MzBmNyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODAyLCJpYXQiOjE2NTc3MTI1MDIsImp0aSI6ImRjNjJkMTU4LWZmMTYtNGU5Zi1iYTZiLTU2NThkODgyMzBkOSJ9.N7kksqnYOEvu2o3SjIYcn_QYoFDfSqBSJLA-cJZaLTM' \
-H 'X-EDI-Version: v1'
Path parameters
/api/base/events-queue/documents/{eventId}
Parameter | Optional | Description |
---|---|---|
|
|
Event id (obtained from GET method on /api/base/events-queue/documents resource) to confirm receive document metadata and content |
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
Example response
HTTP/1.1 204 No Content
Status 204 No Content means success. Last accessed status was deleted from queue. Next statuses can be red.
|
Statuses event queue
The statuses event queue resource is used to obtain statuses related to transmitted EDI documents. Statuses can be downloaded in two ways: fetching one status at a time or fetching batch with multiple statuses.
Download single transmission status
A GET
request download metadata of first awaiting transmission status from statuses event queue.
Example HTTP request
GET /api/base/events-queue/statuses HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlMWI4NGMyZS1lNTk0LTQ5ZmQtOGNlZC02ZGJkMmIyMzg1MTYiLCJjbGllbnRJZCI6ImE3ZGYwOTVkLWRjOWEtNGEwYy1hYzA2LTE2NmY1OGJlZGYzNSIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjUzYmM1NmUzLTc2NzQtNGUzYS05MTgzLWQxYzFkMDZlMGEwYSJ9.oXMe1SYPICeDPG0cWQY9dM5vXll9l4COD9QibusKwKc
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/events-queue/statuses' -i -X GET \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlMWI4NGMyZS1lNTk0LTQ5ZmQtOGNlZC02ZGJkMmIyMzg1MTYiLCJjbGllbnRJZCI6ImE3ZGYwOTVkLWRjOWEtNGEwYy1hYzA2LTE2NmY1OGJlZGYzNSIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjUzYmM1NmUzLTc2NzQtNGUzYS05MTgzLWQxYzFkMDZlMGEwYSJ9.oXMe1SYPICeDPG0cWQY9dM5vXll9l4COD9QibusKwKc' \
-H 'X-EDI-Version: v1'
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
|
|
Unique client transmission channel id. This optional parameter can be used to identify the device sending request in case when the same access token is used by multiple devices. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-EDI-QueueLength: 1
Content-Length: 198
{"eventId":"c875661f-6d9b-4f5e-bddf-5447ba160967","transmissionId":"075e7ca7-879f-4193-9166-177dda05cbf5","transmissionStatusCode":"ExampleCode","transmissionStatusDescription":"ExampleDescription"}
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
|
|
Events queue length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Event id to confirm receive transmission status metadata |
|
|
|
Transmission id |
|
|
|
Transmission status code |
|
|
|
Transmission status description |
Download multiple transmission statuses
A GET
request download metadata of multiple statuses in order they appear on the statuses event queue. Number of fetched statuses is determined by depth
parameter.
Example HTTP request
GET /api/base/batch/events-queue/statuses?depth=100 HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NjQyZWViMC04OTA3LTRhYmQtOTM3OS1hMDdhNGY0MzZkNmYiLCJjbGllbnRJZCI6IjQ2NzQ1NTM5LTk3YzktNGQ5Zi1iYWJjLWFiYmU0YTc3Yzc3NSIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjU5MGE5OTk5LTUwMTktNGZhYS04NjM0LTU5MzFhYTMxMGUyMCJ9.M1vINfJRGIu3nheSX6Q-GlacBzSe1oiyRRCEN1srBUs
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/batch/events-queue/statuses?depth=100' -i -X GET \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NjQyZWViMC04OTA3LTRhYmQtOTM3OS1hMDdhNGY0MzZkNmYiLCJjbGllbnRJZCI6IjQ2NzQ1NTM5LTk3YzktNGQ5Zi1iYWJjLWFiYmU0YTc3Yzc3NSIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjU5MGE5OTk5LTUwMTktNGZhYS04NjM0LTU5MzFhYTMxMGUyMCJ9.M1vINfJRGIu3nheSX6Q-GlacBzSe1oiyRRCEN1srBUs' \
-H 'X-EDI-Version: v1'
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
|
|
Unique client transmission channel id. This optional parameter can be used to identify the device sending request in case when the same access token is used by multiple devices. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-EDI-QueueLength: 1
Content-Length: 223
{"statuses":[{"eventId":"063b7ea6-4607-4b32-a371-c6f4c794dcc4","transmissionId":"dcfc8225-d871-4e9b-a0ac-e132b2cb3116","transmissionStatusCode":"ExampleCode","transmissionStatusDescription":"ExampleDescription"}],"count":1}
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
|
|
Events queue length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Number of downloaded statuses in batch. May be less than depth parameter or even zero, if there is less statuses than given depth |
|
|
|
Batch of downloaded statuses |
|
|
|
Event id to confirm receive transmission status metadata |
|
|
|
Transmission id |
|
|
|
Transmission status code |
|
|
|
Transmission status description |
Confirm receive EDI transmission statuses
A DELETE
request confirm receive transmission status.
Example HTTP request
DELETE /api/base/events-queue/statuses/0dc954f4-5eb7-4f0a-9a8a-681879e9023c HTTP/1.1
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4ZTNiYzkwOS1kNjFhLTRlY2ItOGNlZi0xZDg3ODRkNjZlNTQiLCJjbGllbnRJZCI6IjEwNjQ3NTZjLTIxOWYtNDMyOS05ZmJjLWE0NDI3NzEzMjIyMCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjQzYjMxOGU0LWUyNWUtNGM2Zi04MDFmLTQxY2NiYjZhMzU4MiJ9.4tdaFsLi3ARriBLUKDb6RIlQ7Gg8pSmEwW-npbet1YU
X-EDI-Version: v1
Host: api-edi.infinite-paperless.com
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/events-queue/statuses/0dc954f4-5eb7-4f0a-9a8a-681879e9023c' -i -X DELETE \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4ZTNiYzkwOS1kNjFhLTRlY2ItOGNlZi0xZDg3ODRkNjZlNTQiLCJjbGllbnRJZCI6IjEwNjQ3NTZjLTIxOWYtNDMyOS05ZmJjLWE0NDI3NzEzMjIyMCIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjQzYjMxOGU0LWUyNWUtNGM2Zi04MDFmLTQxY2NiYjZhMzU4MiJ9.4tdaFsLi3ARriBLUKDb6RIlQ7Gg8pSmEwW-npbet1YU' \
-H 'X-EDI-Version: v1'
Path parameters
/api/base/events-queue/statuses/{eventId}
Parameter | Optional | Description |
---|---|---|
|
|
Event id (obtained from GET method on /api/base/events-queue/statuses or /api/base/batch/events-queue/statuses resource) to confirm receive transmission status metadata |
Request headers
Name | Optional | Description |
---|---|---|
|
|
Bearer access token |
|
|
API version |
Example response
HTTP/1.1 204 No Content
Confirm receive multiple EDI transmission statuses
A POST
request confirm receive multiple transmission statuses.
Example HTTP request
POST /api/base/batch/events-queue/statuses HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmMGUzZmFkMi03NGFhLTRkZmMtYTBhZC02NWM3Mjk1NmQyNWMiLCJjbGllbnRJZCI6IjRkZTIzNWRjLWE2MGMtNDkzNy1hNzJjLWRhYTI5YTY0ZWM3MyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjEwMWUwZWQxLWFiZDgtNDk5OS1iM2FjLTI1MGU2YjNhMTJiOSJ9.HI1W31pUxJJfmxSRQ3rP3S_ojB3j37X5K9M5CXkyTpo
X-EDI-Version: v1
Content-Length: 95
Host: api-edi.infinite-paperless.com
{
"requests": [
{"method": "DELETE", "eventId": "106cbcc3-1082-44bf-8097-74c1ceb9a599"}
]
}
Example CURL request
$ curl 'https://api-edi.infinite-paperless.com/api/base/batch/events-queue/statuses' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmMGUzZmFkMi03NGFhLTRkZmMtYTBhZC02NWM3Mjk1NmQyNWMiLCJjbGllbnRJZCI6IjRkZTIzNWRjLWE2MGMtNDkzNy1hNzJjLWRhYTI5YTY0ZWM3MyIsInJvbGVzIjpbIlJFU1RfQ0xJRU5UIl0sImlzcyI6IkV4YW1wbGUgVG9rZW4gSXNzdWVyIiwiZXhwIjoxNjU3NzEyODExLCJpYXQiOjE2NTc3MTI1MTEsImp0aSI6IjEwMWUwZWQxLWFiZDgtNDk5OS1iM2FjLTI1MGU2YjNhMTJiOSJ9.HI1W31pUxJJfmxSRQ3rP3S_ojB3j37X5K9M5CXkyTpo' \
-H 'X-EDI-Version: v1' \
-d '{
"requests": [
{"method": "DELETE", "eventId": "106cbcc3-1082-44bf-8097-74c1ceb9a599"}
]
}'
Request headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Bearer access token |
|
|
API version |
Request fields
Path | Type | Description |
---|---|---|
|
|
Batch requests to confirm received transmission status metadata |
|
|
Method name to confirm received transmission status metadata, should be: DELETE |
|
|
Event id (obtained from GET method on /api/base/events-queue/statuses or /api/base/batch/events-queue/statuses resource) to confirm receive transmission status metadata |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 97
{"responses":[{"method":"DELETE","eventId":"106cbcc3-1082-44bf-8097-74c1ceb9a599","status":204}]}
Response headers
Name | Optional | Description |
---|---|---|
|
|
Content type |
|
|
Content length |
Response fields
Path | Type | Optional | Description |
---|---|---|---|
|
|
|
Responses to batch requests to confirm received transmission status metadata |
|
|
|
Method name to confirm received transmission status metadata: DELETE |
|
|
|
Event id of confirmed received transmission status metadata |
|
|
|
Result status code of called method to confirm received transmission status metadata. Successful completion of the method will result in a returned code of 204 (No Content) |
FAQ
Multiple client devices with the same access token
When there are many client devices with the same access token, and each of them expects for transmission status,
INFINITE infrastructure need to know to which of client devices send transmission status. To distinguish between client devices
and make it possible, client has to add optional header X-EDI-ClientTransmissionId
when sending document and
downloading transmission status. Header value must be unique for each client device.
Because X-EDI-ClientTransmissionId header is optional, sending document and getting transmission status
without this header might end successfully in terms of INFINITE infrastructure, however, it may produce hard-to-detect
errors on the client side. Make sure to include this header both when sending files and downloading transmission status.
|