Skip to content
Last updated

Shared download APIs

Some v1 download endpoints are shared across services. Use them when you already have affidavit or attachment IDs and need to retrieve the corresponding files.

The two resources use different response formats:

  • /AffidavitsDownload returns affidavit PDFs in a ZIP archive.
  • /AttachmentDownload returns attachment metadata and Base64-encoded content in JSON.

For service-specific downloads, see the relevant service API reference, such as EviNotice API.


Download affidavit PDFs by ID

POST /AffidavitsDownload
GET /AffidavitsDownload
HEAD /AffidavitsDownload

Receives one or more affidavit identifiers and packages the corresponding PDF files in a ZIP archive. Obtain affidavit IDs from an AffidavitPublished callback or from a service Query response that includes affidavit metadata.

The endpoint requires HTTP Basic authentication. It rejects the entire request if it contains an affidavit not owned by the authenticated user. Use POST or GET to retrieve the archive; the route also accepts HEAD with the same identifiers.

Request parameters:

FieldLocationRequiredDescription
UniqueIdsJSON body for POST; repeated query parameter for GET or HEADYesUnique affidavit UUIDs. Do not repeat an ID. The configured maximum number of IDs can vary by deployment.

Duplicate IDs are invalid. Correct the identifier list instead of retrying the same request unchanged.

Example POST request:

curl -X POST "https://api.evicertia.com/AffidavitsDownload" \
  -u "$EVI_USER:$EVI_PASS" \
  -H "Content-Type: application/json" \
  --data '{"UniqueIds":["000c1f70-42ac-a3ea-149f-943879726a87"]}' \
  --output affidavits.zip

A successful response has content type application/zip and downloads as affidavits.zip. Each PDF is stored in the archive as:

<evidence-uuid>/<affidavit-uuid>.pdf

The entire request fails if any requested affidavit does not exist or is not owned by the authenticated user.

ResponseDescription
200 OKZIP archive containing the requested affidavit PDFs.
400 Bad RequestUniqueIds is missing or exceeds the deployment's configured limit.
401 UnauthorizedAuthentication failed.
403 ForbiddenThe account lacks the required API permission, or one or more requested affidavits are not owned by the authenticated user.
404 Not FoundOne or more requested affidavit IDs do not exist.

Callbacks and the standard affidavit metadata query options expose identifiers, not PDF bytes. The v1 Query contracts retain deprecated, single-result blob options for backward compatibility, but new integrations should use this endpoint when they need signed PDFs.


Download attachments by ID

POST /AttachmentDownload
GET /AttachmentDownload

Receives a list of attachment identifiers and returns attachment metadata and base64-encoded content.

Both operations require HTTP Basic authentication. Requests without valid credentials return 401 Unauthorized.

Request parameters:

FieldLocationRequiredDescription
UniqueIdsJSON body for POST; query parameter for GETYesList of attachment UUIDs to download.

Response fields (v1 responses are camelCase):

FieldDescription
resultsCollection of matching attachments (see fields below).
totalMatchesNumber of matching attachments found.
responseStatusError details when automatic exception handling returns one.

Each attachment in results contains:

FieldTypeDescription
uniqueIdUUIDUnique identifier of the attachment.
creationDatedate-timeWhen the attachment was created.
evidenceUniqueIdUUIDIdentifier of the evidence it belongs to.
partyIdUUIDIdentifier of the related party, when applicable.
contentIdstringContent identifier.
displayNamestringDisplay name.
filenamestringFile name.
mimeTypestringMIME type of the content.
contentDescriptionstringContent description.
contentDispositionstringContent disposition.
contentLocationstringContent location.
contentEncodingstringContent encoding.
contentLengthintegerContent length in bytes.
hashstringHash of the content (algorithm and value).
datastringAttachment content, Base64-encoded.
attributesarrayOptional key-value attributes; omitted when empty.

Example response:

{
  "results": [
    {
      "uniqueId": "000c1f70-42ac-a3ea-149f-943879726a87",
      "creationDate": "2020-11-20T17:28:57.1880970+01:00",
      "evidenceUniqueId": "000d1f70-42ac-a3ea-189f-943879726a87",
      "contentId": "ee302292-8f64-479b-b5dd-ac79010f8895",
      "displayName": "Attachment.pdf",
      "filename": "Attachment.pdf",
      "mimeType": "application/pdf",
      "contentDisposition": "attachment; filename=\"Attachment.pdf\"",
      "contentEncoding": "utf-8",
      "contentLength": 2960790,
      "hash": "{algorithm:SHA256,value:3/V5lRHf87BNUmWsFSOeeny0OUEUH8c8h2RgU0FjZp0=}",
      "data": "<base64-encoded file content>"
    }
  ],
  "totalMatches": 1
}

OpenAPI specification

Use the shared download OpenAPI specification for a machine-readable definition of these endpoints.