Introduction
The Intelliprint API is organized around REST. Every resource has a predictable URL and every endpoint accepts request bodies encoded as JSON or with form encoding. Responses are JSON-encoded with standard HTTP status codes.
Authentication
Intelliprint API uses account-level API keys to authenticate you to your account. There are no separate API keys for test mode. Instead, when you want to create a test Print Job, just set the testmode parameter to true.
API Key Generation
You can generate an API key here.
Authorization Header
Provide your API key in the Authorization header as HTTP Bearer auth.
Example
curl https://api.rnbdata.uk/v1/prints \ -u key_EXAMPLE: #The colon prevents curl from asking for a password.
SDKs
- JSBrowser
- Node.js
- PHP
Base URL
https://api.rnbdata.uk/v1
Testing
It’s important to note that when testing, you should always use test mode to avoid incurring charges and to avoid printing unnecessary items. When creating a test Print Job, simply set the testmode parameter to true.
To retrieve the list of Print Jobs, including testmode Print Jobs, set the testmode parameter to true. This will retrieve all testmode Print Jobs created within the last week.
To check if a particular Print Job is in test mode, look for the testmode boolean attribute in the Print Job object.
Demo files are available for testing, including a single demo letter and multiple letters. The multiple letters file can be split using the split_by_content option and setting the splitting word to “Dear”. This file with these splitting options will result in 100 separate letters.
It’s important to thoroughly test and verify your Print Jobs before confirming them to ensure a seamless printing experience.
Here are some demo files you can use for creating a Print Job:
Single Letter | A single demo letter. |
Multiple Letters | Use split_by_content and set the splitting word to Dear .This file with these splitting options should result in 100 separate letters. |
Rate Limits
The Intelliprint API has a rate limit of 100 requests per 1 minute. If you surpass this limit, the API will reply with the rate_limited error (HTTP status code 429).
If you plan on making more frequent requests than that, you should implement methods that automatically retry a request that fails with the rate_limited error code after waiting for some time.
Example Response
{ "error": { "message": "You're making too many requests, please wait a few seconds then try again", "type": "rate_limited", "code": "rate_limited" } }
Errors
On top of detailed JSON-encoded error messages, Intelliprint also gives back conventional HTTP status codes you can use to determine the result.
2.x.x status codes mean the request succeeded. 4.x.x status codes mean an error on your end (You can refer to the error.message to learn more). 5.x.x status codes mean an error on Intelliprint’s end.
Here is a breakdown of the error object:
- message
This is a human readable message describing the error. - type
The type of error. One of invalid_request_error, authentication_error, rate_limited or internal_error. - code
The error code. One of body_too_large, body_incorrect_format, parameter_invalid, parameter_missing, parameter_unknown, no_api_key, invalid_api_key, forbidden, payment_error, not_found, rate_limited or internal_error. - param
Not always present. The parameter that caused the error.
EXAMPLE RESPONSE
{ "error": { "message": "Missing required param: file", "type": "invalid_request_error", "code": "parameter_missing", "param": "file" } }