IntriMail API v3
Intrimail.dms.co.uk
This is the documentation for API version 3 of the IntriMail multi-channel communication system
What is IntriMail?
IntriMail is a hybrid communication system that takes submitted documents and processes them into physical and electronic letters.
Terms
Term | Description |
|---|---|
Blob | A blob is the file data, base-64 encoded that contains the document being submitted. |
Pack | A pack is a single deliverable letter. Packs are created from Jobs. |
Job | A job is a document submitted to IntriMail. It may consist of a single letter or multiple letters. It may be extremely basic and contain only text or it may be fully formed and ready to print. In addition, when a framework is submitted by the API a job is created by the system. |
Configuration
Your system provider will have configured your account to include all the necessary elements to successfully submit jobs to the IntriMail system. The calls you make to submit the job must reference these elements correctly. When you make the GET /print/configuration call the system will return the options available for each of the elements. For example, there may be two options for ink - colour and mono. The corresponding GUID returned for these options is used to identify which print method to use on the submitted job.
NB: These settings change very infrequently, however, if your service provider does make a change, the GUID will be changed also. It is necessary to check the configuration periodically, but it is not necessary to check this on every submission. Doing so will produce unnecessary overheads and likely cause your submissions to be throttled.
Throttling
This API uses the following throttling policy to ensure fair use for everyone. Please respect 429 responses and throttle your requests accordingly.
Endpoint | Maximum Call Rate |
|---|---|
/print | 10 per second |
/job | 30 per minute |
/pack | 30 per minute |
/authenticate | 5 per minute |
Responses to your requests will contain X-Rate-Limit-* headers detailing the throttle rate in effect and in the event of a 429 these response headers will also include information about the suggested retry period to achieve a non-throttled call. If you would like to discuss an increase in your API throttle limit, please contact IntriMail support team at intrimail@dms.co.uk
Idempotency
To safely retry a [POST], [PUT], [PATCH] or [DELETE] request (for example after a network timeout) without risking it being processed twice, generate a unique key (a GUID is ideal) and send it in an [Idempotency-Key] header.
If a request using that key has already completed, the original response is returned unchanged (with an [Idempotency-Replayed: true] response header) instead of the operation being repeated. If a request using that key is still being processed you'll receive a 409 response, and reusing the key with different request parameters returns a 422. Keys are only remembered for a limited time, so retries should be made reasonably promptly.
Deprecation Policy
Deprecated versions remain available for at least 6 months before retirement.
Clients are expected to move to the latest version as soon as possible.
New features and endpoints will only be added to the latest version.
Critical fixes may be backported to older versions at our discretion.
Note
For the document submission process to function correctly all print settings of the IntriMail account you will be submitting documents to must be fully configured. Please ensure you are familiar with the configuration of the accounts you're working with in order to aid debugging.
Authenticate
Authenticate and receive a token for accessing the API.
/AUTHENTICATE/FOCUS/{ACCOUNTGUID}
PATH PARAMETERS
Field | Required/Optional | Type |
|---|---|---|
accountGUID | Required | string <uuid> |
HEADER PARAMETERS
Title | Required/Optional | Type |
|---|---|---|
Idempotency-Key | Optional | string, ≤256 characters
Example: [4c9faa5c-f588-45ac-b770-ccce21e67270]
A unique key (a GUID is ideal) identifying this logical request. Safely retry the call using the same key without risking it being processed twice - a completed request replays its original response, a request still in progress returns 409, and reusing the key with different request parameters returns 422 |
Responses
200 — Success
/AUTHENTICATE/ME
Responses
200 — Success
/AUTHENTICATE/AUTHCODE
HEADER PARAMETERS
Field | Required/Optional | Type |
|---|---|---|
Idempotency-Key | Optional | string, ≤256 characters
Example: [4c9faa5c-f588-45ac-b770-ccce21e67270]
A unique key (a GUID is ideal) identifying this logical request. Safely retry the call using the same key without risking it being processed twice - a completed request replays its original response, a request still in progress returns 409, and reusing the key with different request parameters returns 422 |
HEADER PARAMETERS
Field | Required/Optional | Type |
|---|---|---|
redirectUrl | Optional | string or null |
verifier | Optional | string or null |
code | Optional | string or null |
provider | Optional | string or null |
Responses
200 — Success
/AUTHENTICATE/REFRESH
HEADER PARAMETERS
Title | Required/Optional | Type |
|---|---|---|
Idempotency-Key | Optional | string, ≤256 characters
Example: [4c9faa5c-f588-45ac-b770-ccce21e67270]
A unique key (a GUID is ideal) identifying this logical request. Safely retry the call using the same key without risking it being processed twice - a completed request replays its original response, a request still in progress returns 409, and reusing the key with different request parameters returns 422 |
Responses
200 — Success
Acquire a token
Submit credentials and receive a JWT bearer token for accessing the API. Use this token in all your API calls by passing it in the "Authorization" header, preceded by "Bearer ".
POST
authenticate/focus/{accountGuid}
GET
/authenticate/me
POST
/authenticate/authcode
Request samples
Content Type - application/json
{
"provider": "string",
"code": "string",
"verifier": "string",
"redirectUrl": "string"
}
POST
/authenticate/refresh
