Documents and booklets¶
Documents are generated from the case data. A booklet bundles several documents into one PDF.
Download a booklet¶
POST /api/1/cases/{case_pk}/booklets/{id}/download
Request body
document_ids(array)file_information_proof_ids(array)instance_id(integer)proof_ids(array)
Example
curl -X POST \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<case_pk>/booklets/<id>/download
Response 200
The booklet as a PDF, built from the documents and proofs given.
Send a booklet by email¶
POST /api/1/cases/{case_pk}/booklets/{id}/send
Request body
email_address(string, email)email_body(string)email_subject(string)instance_id(integer)recipient_name(string)
Example
curl -X POST \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<case_pk>/booklets/<id>/send
Response 204
The booklet was sent to the given address.
Get a document¶
GET /api/1/cases/{case_pk}/documents/{id}
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<case_pk>/documents/<id>
Response 200
The generated document as a PDF.
Sent as */*.
Download a document preview¶
GET /api/1/cases/{case_pk}/documents/{id}/preview
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<case_pk>/documents/<id>/preview
Response 200
A preview of the generated document as a PDF.
Sent as */*.
Download a signed document¶
GET /api/1/cases/{case_pk}/documents/{id}/signed
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<case_pk>/documents/<id>/signed
Response 200
The signed document as a PDF.
Sent as */*.
Download all proofs of a case¶
GET /api/1/cases/{id}/all_proofs
One zip archive of every provided proof file on the case.
format(string, one ofjson,text)
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<id>/all_proofs
Response 200
A zip archive named proofs.zip.
Sent as text/plain.
Download the case booklet¶
GET /api/1/cases/{id}/booklet
booklet_id selects the booklet and is required. Append the instance id to it, separated by a
dash, to render the booklet for one instance of the case.
booklet_id(string, required) - Id of the booklet, optionally<booklet_id>-<instance_id>.language(string) - Language key for the rendered document, for exampleen. Defaults to the case's.
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<id>/booklet?booklet_id=<booklet_id>
Response 200
The booklet as a PDF.
Sent as application/pdf.
Download the signed booklet¶
GET /api/1/cases/{id}/signed_booklet
Available once the booklet has been signed.
format(string, one ofjson,text)language(string) - Language key for the rendered document, for exampleen. Defaults to the case's.
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<id>/signed_booklet
Response 200
The signed booklet as a PDF.
Sent as text/plain.
Download the default unsigned booklet¶
GET /api/1/cases/{id}/unsigned_booklet
The process's default booklet, without signatures. Use the case booklet endpoint to pick a specific booklet.
language(string) - Language key for the rendered document, for exampleen. Defaults to the case's.
Example
curl -X GET \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/cases/<id>/unsigned_booklet
Response 200
The unsigned booklet as a PDF.
Sent as application/pdf.
Upload a filled out document¶
POST /api/1/documents_upload/upload
Send a PDF that was generated by Atfinity and printed out. The QR codes on its pages say which case and which needed document each page belongs to, so one upload can carry pages of several cases. Pages whose case version is outdated are reported instead of stored.
Request body
Sent as multipart/form-data.
file(string, binary, required)
Example
curl -X POST \
-H "Authorization: Api-Key $ATFINITY_API_KEY" \
https://your-tenant.atfinity.app/api/1/documents_upload/upload
Response 200
Which cases the pages belonged to, and what was recognised per document.
affected_cases(array)analysed_documents(array)