Test mode
Build and test your integration for free, with predictable sample results.
A test key is free and begins with sk_test_. It accepts the same requests as a live key and
validates them the same way. It never processes a document. Every analysis returns a sample result
built from your request instead. When your integration works, switch to a live key of the same
integration.
Every step of the quickstart works unchanged with a test key.
What a test key does
| Operation | With a test key |
|---|---|
| Upload a file | Checks size and media type, then discards the bytes and keeps only the metadata |
| Download a preview | Returns the same one-page sample PDF for every test file with pages. Text files return 404 preview_unavailable. |
| Create an analysis | Validates the request, then answers 200 with a succeeded sample result |
| Read, cancel and delete | Behave as for live resources |
| Webhook events | Go only to the integration's test webhook, never to the live one |
Test and live data are separate, as Authentication
explains. Every test resource and event has mode: test. A test analysis accepts only test files of
its own integration. A test file expires 24 hours after upload.
Sample results
A test analysis never reads the document. It builds its result from the request alone. The result
has the same shape as a live result of the same request, and engine_revision is
test-fixtures.v1.
Documents
Each input file is one document with one page. Text formats have no pages.
Document types
The request selects document types. The files receive these types one after another, in catalog key
order. The first file gets the first type, the second file the second type, and so on. After the
last type, the order starts again. If the request selects no document type, every file is
no_match.
Periods
A period requirement counts the documents of one type over a number of months. In a test result, the
documents of that type cover consecutive months. Each file gets one month in period. The last
month is the month before the reference date.
Fields
Every field is found with a fixed value of its type:
| Field type | Sample value |
|---|---|
string | "Test value" |
number | 1.5 |
integer | 1 |
boolean | true |
date | The reference date |
money | 1000 EUR |
enum | The first allowed value |
enum_set | A set that holds the first allowed value |
| Structured types | One fixed record with every subfield stated, or a list with one such record |
Dates inside a structured value are the reference date. Amounts are 1000 EUR. If a field's
constraints rule out its sample value, the field is not_found instead.
Checks and requirements
Every check is fulfilled. Collection requirements are evaluated over the sample documents in the
same way as for live results. You can use this to test how your integration handles missing
documents. Per-document requirements are not_evaluated, as in live results.
Other values
Confidences are 1.0. There are no citations. Every usage count is zero.
The same request with the same reference date always returns the same result. If these rules change,
test analyses get a new engine_revision, such as test-fixtures.v2.
Limits
Test requests count against the integration's rate limit, which its test and live keys share. All
test keys of your workspace also share a second, lower limit for test traffic.
Rate limits explains how to handle 429. Test files and analyses have
their own limits, counted separately from live ones.