Endpoints for initiating, submitting and committing a print job to the IntriMail system.
A submission will require the following steps as a minimum
-
A call to Initialise to create the submission, specify the processing options and acquire a job GUID
-
One or more calls to Document Part to provide the document for submission
-
A call to Commit to finalise the submission and indicate further settings for processing
Initialising a submission will involve populating a number of settings, the available options for which can be retrieved by a call to the Get Configuration endpoint.
Attachments to a document would be supplied with further Document Part calls with a fileIndex greater than 0
Get Configuration
Retrieves the full set of available settings for use by client software looking to generate a submission to the IntriMail system.
Pack
Operations on packs. A pack is a single letter to a single recipient within the IntriMail system.
Get Pack
Returns full details of a pack, including references to the PDF for each version of the pack, the pack's status transitions and the recipient and delivery details.
GET /pack/12345678-1234-1234-1234-123456789012
PATH PARAMETERS
Field | Required | Type | Description |
|---|---|---|---|
packGuid | Required | string <uuid> |
Responses
> 200 — Returns the pack
- 400 — Bad Request - pack GUID not valid or other malformed request
- 401 — Not authorised
Update Pack Statuses
Updates the status of one or more packs, up to a maximum of 100 packs per call.
Packs can be updated to one of the following statuses:
-
Printed
-
Rejected
-
Posted
-
Delivered
-
Returned
-
User Action Required
-
Failed
-
Confirmed Downloaded for Printing
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
|
REQUEST BODY SCHEMA: APPLICATION/JSON
Field | Required/Optional | Type | Description |
|---|---|---|---|
permitPartialUpdate | Optional | boolean | |
packs | Optional | array of objects or null
(PublicPackStatusBatch
UpdateRequestPackStatus) | If a partial update is permitted, the successful updates will be committed even if one or more in the batch fail. If a partial update is not permitted, any failures within the batch will mean none of the batch update is committed. |
Responses
200 — Success
Job
Endpoints for querying submitted jobs in the IntriMail system
Get Status
Gets the processing status of a job and any packs identified in that job
PATH PARAMETERS
Field | Required/Optional | Type |
|---|---|---|
jobGuid | [object Object] | string <uuid> |
Responses
200 — Success
Blob
Endpoints for uploading and downloading files (blobs) within the IntriMail system
UploadBlob
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
|
REQUEST BODY SCHEMA: APPLICATION/JSON
Title | Required/Optional | Type | Description |
|---|---|---|---|
mimeType | Optional | string or null | The MIME type of the file |
filename | Optional | string or null | The name of the file. This
is currently only used by IntriMail to extract the filename extension. |
data | Optional | string or null | The file data, base-64 encoded |
Responses
200 — Success
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
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 |
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 ".
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 |
REQUEST BODY SCHEMA: APPLICATION/JSON
Field | Required / Optional | Type | Description |
|---|---|---|---|
token | Required | string or null | If you're attempting to get an APIv3 token in exchange for a supported external identity provider's token, pass that token in here |
password | Required | string or null | This should be set to the user's password |
emailAddress | Required | string or null, ≤255 characters | This should be set to the e-mail address of the user you're authenticating as |
accountLogin | Required | string or null, ≤255 characters | This should be set to the "login" value for the IntriMail account you're authenticating against |
instance | Required | string or null, ≤50 chars | This should be set to the instance of IntriMail you're authenticating against. Please request this value from the IntriMail support team. |
Responses
200 — Success
DEPRECATED - Previously used to get JWKS for the keys used to sign API tokens. Keys are now unique to an instance so the replacement endpoint *keys/{instance}* must be used instead
Responses
200 — Success
Get JWKS for the keys used to sign API tokens
The JWKS details returned can be used to validate any current API authentication tokens
HEADER PARAMETERS
Field | Required / Optional | Type |
|---|---|---|
instance | Required | string |
Responses
200 — Success
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.
POST
authenticate/focus/{accountGuid}
GET
/authenticate/me
POST
/authenticate/authcode
Request samples
Payload
Content Type - application/json
{
"provider": "string",
"code": "string",
"verifier": "string",
"redirectUrl": "string"
}
POST
/authenticate/refresh
POST
/authenticate
Request samples
Payload
Content Type - application/json
{
"instance": "string",
"accountLogin": "string",
"emailAddress": "string",
"password": "string",
"token": "string"
}
Response samples
200
Content Type - application/json
{
"token": "string",
"idpToken": "string"
}
GET
/authenticate/keys
Response samples
200
Content Type - application/json
{
- "keys": [
+ { … }
]
}
GET
/authenticate/keys
Response samples
200
Content Type - application/json
{
- "keys": [
+ { … }
]
}
POST
/blob
Request samples
Payload
Content Type - application/json
{
"data": "string",
"filename": "string",
"mimeType": "string"
}
Response samples
200
Content Type - application/json
{
"blobGuid": "4c9faa5c-f588-45ac-b770-ccce21e67270"
}
GET
/job/status/{jobGuid}
Response samples
200
Content Type - application/json
{
"guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc",
"submittedAt": "2019-08-24T14:15:22Z",
"startedProcessingAt": "2019-08-24T14:15:22Z",
"processedAt": "2019-08-24T14:15:22Z",
"completed": true,
- "packs": [
+ { … }
]
}
GET
/pack{packGuid}
Response samples
200
Content Type - application/json
{
"status": "processing",
"guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc",
"releasedAt": "2019-08-24T14:15:22Z",
- "recipient": {
"description": "string",
"firstLineOfAddress": "string",
"postcode": "string"
},
"packIndex": 0,
"holdReason": "string",
"failureReason": "string",
- "versions": [
+ { … }
],
- "statusTransitions": [
+ { … }
],
- "passthrough": [
+ { … }
],
- "extracted": [
+ { … }
]
}
POST
/pack/batch
Request samples
Payload
Content Type - application/json
{
- "packs": [
{ … }
],
"permitPartialUpdate": true
}
Response samples
200
Content Type - application/json
{
"committed": true,
- "packs": [
{ … }
]
}
Endpoints for querying submitted jobs in the IntriMail system
