Skip to main content

Photos & Documents

Retrieve face images and manage the file documents attached to a person. These endpoints return or accept binary content (images / files), so the Curl and PowerShell examples are the most direct.

API Endpoints

  • Base URL (Cloud): https://customername.econnectcloud.com/identities
  • Base URL (On-prem): https://<server-host-or-ip>:5009
MethodEndpointDescriptionPermission
GET/api/v1/people/enrollmentPhoto/{faceId}Download a face's enrollment photo (JPEG).Authenticated
GET/api/v1/people/detectionPhoto/{faceId}/{detectionId}Download a detection photo (JPEG).Authenticated
POST/api/v1/people/fileDocuments/uploadUpload a file document for a person (multipart).Add Identity Files
GET/api/v1/people/{personId}/fileDocuments/{documentId}/dataDownload a file document.Read Identity Files

Authentication

Requires a JWT bearer token. See Authentication.

Permissions

The permission names and category below are what you'll see in the Identities web app under System → System settings → Roles.

OperationPermissionCategory
Enrollment / detection photos(any authenticated user)
Upload a file documentAdd Identity FilesIdentities
Download a file documentRead Identity FilesIdentities

Code Examples

API_URL="https://customername.econnectcloud.com/identities"
TOKEN="your_jwt"

# Download an enrollment photo (JPEG) by faceId
curl -sk "$API_URL/api/v1/people/enrollmentPhoto/<faceId>" \
-H "Authorization: Bearer $TOKEN" -o enrollment.jpg

# Download a detection photo (JPEG)
curl -sk "$API_URL/api/v1/people/detectionPhoto/<faceId>/<detectionId>" \
-H "Authorization: Bearer $TOKEN" -o detection.jpg

# Upload a file document for a person (multipart). personId + name are required.
curl -sk -X POST "$API_URL/api/v1/people/fileDocuments/upload" \
-H "Authorization: Bearer $TOKEN" \
-F "personId=0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d" \
-F "name=ID Card" \
-F "description=Front of ID" \
-F "file=@id-card.pdf"

# Download a file document by its public document id
curl -sk "$API_URL/api/v1/people/0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d/fileDocuments/<documentId>/data" \
-H "Authorization: Bearer $TOKEN" -o id-card.pdf

Photos

enrollmentPhoto and detectionPhoto return raw image/jpeg bytes (HTTP 200), or 404 if the image isn't found. Write the response to a file (-o in curl, -OutFile in PowerShell).

Upload a File Document

POST /api/v1/people/fileDocuments/upload is a multipart/form-data request:

Form fieldRequiredDescription
fileYesThe file to store (any form part that carries a filename).
personIdYesThe person (GUID) the document belongs to.
nameYesDisplay name for the document.
descriptionNoOptional description.
publicIdNoCaller-supplied id; a GUID is generated if omitted. Use this value as {documentId} when downloading.

Returns 200 OK on success.

Response Codes

CodeMeaning
200 OKSuccess (image/file bytes for downloads; empty body for upload).
400 Bad RequestUpload missing personId or name, or not a multipart request.
404 Not FoundThe requested photo or document does not exist.
401 UnauthorizedMissing or invalid JWT.
403 ForbiddenThe user lacks the required Identities files permission.