Accela Cloud Document Service (ACDS) — API Reference
Contents
- Overview & Concepts
- Authentication
- Upload Files
- Download Files
- Delete Files
- Get File Metadata
- List Documents
Overview & Concepts
The Accela Cloud Document Service (ACDS) provides a REST API for uploading, downloading, deleting, and retrieving metadata for documents associated with Accela records. ACDS replaces the legacy Accela Document Service (ADS) and supports large file uploads via a chunked upload model, which improves reliability on slow networks and enables resumable uploads.
ACDS serves as the document backend for:
- Accela Citizen Access (ACA)
- Civic Platform (CIVP)
- Direct REST API integrations
Documents are stored in Azure File Share for long-term persistence, using Azure Blob Storage as a temporary staging area during chunked upload assembly.
Key Concepts: Session-Based API
All ACDS operations follow a two-step session pattern:
- Create a session — POST to a session endpoint. This returns a
sessionIdand anexpiresInvalue. - Poll for status / retrieve results — GET the same session using the
sessionId.
This asynchronous pattern is used for all operations (upload, download, delete, metadata, list) because file operations may involve backend processing that takes time to complete.
Step 1: POST /documents/{operation}-sessions → returns { sessionId, expiresIn }
Step 2: GET /documents/{operation}-sessions/{sessionId} → returns status + result data
Base URL
https://{your-accela-environment}/documents/
Common Response Envelope
All endpoints return responses in the following envelope:
{
"traceId": "abc-123-trace-id",
"message": "Human-readable status",
"result": { ... },
"errors": []
}
| Field | Type | Description |
|---|---|---|
traceId | string | Correlation ID for this request. Include this when contacting support. |
message | string | Human-readable description of the outcome |
result | object | Operation-specific response payload (varies by endpoint) |
errors | string[] | Error messages. Empty array on success. |
Error Responses
| HTTP Status | Meaning | Common Cause |
|---|---|---|
| 400 | Bad Request | Missing required fields, invalid input |
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | Insufficient permissions for the document |
| 404 | Not Found | Session ID or document ID does not exist |
| 500 | Internal Server Error | Unexpected server-side failure |
Authentication
All session-creation endpoints require a Bearer token passed as an HTTP Authorization header. Identity context (tenant, agency, user) is also passed via HTTP headers — not in the request body.
Session-Creation Requests
Include the following headers on every session-creation POST:
Authorization: Bearer {your_access_token}
x-accela-agency: {agency_code}
x-accela-tenant-id: {tenant_id}
x-accela-tenant-name: {tenant_name}
x-accela-agency-user: {user_id}
Content-Type: application/json
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Construct OAuth2 Bearer token. Format: Bearer {token} |
x-accela-agency | string | No | Agency service-provider code |
x-accela-tenant-id | string | No | Tenant ID |
x-accela-tenant-name | string | No | Tenant name |
x-accela-agency-user | string | No | Calling user identifier |
x-accela-traceid | string | No | Caller-supplied correlation ID for distributed tracing |
x-accela-request-from | string | No | Caller type: MOBILE_APP or ACDS_ADAPTOR |
Follow-up Requests (Chunks, Commit, Poll)
After a session is created, subsequent requests (chunk uploads, commits, and polls) authenticate via the session ID in the URL path. You do not need to re-send the Authorization header for these calls.
For details on obtaining an access token, see API Authentication.
Upload Files
Uploading a file is a multi-step process using chunked uploads:
1. POST /documents/upload-sessions → Create upload session
2. POST /documents/upload-sessions/{id}/chunks/{n} → Upload each chunk
3. POST /documents/upload-sessions/{id}/commit → Commit / assemble file
4. GET /documents/upload-sessions/{id} → Check status & get documentId
Step 1 — Create an Upload Session
POST /documents/upload-sessions
Initializes an upload session. Returns a sessionId used for all subsequent upload operations.
Request Body
{
"uploadMeta": {
"fileName": "example.pdf",
"fileSize": "10MB",
"chunkSize": "5MB",
"fileDigest": "sha256:abc123...",
"storageType": "AZURE"
},
"document": {
"recordId": { ... },
"entityId": "string",
"entityType": "string",
"description": "string",
"uploadedBy": "string",
"recordType": {
"capGroup": "string",
"capType": "string",
"capSubType": "string",
"capCategory": "string"
}
}
}
uploadMeta Fields
| Field | Type | Required | Description |
|---|---|---|---|
fileName | string | Yes | Name of the file to be uploaded |
fileSize | DataSize | Yes | Total file size (e.g., "10MB", "1024KB") |
chunkSize | DataSize | Yes | Size of each chunk (e.g., "5MB") |
fileDigest | string | No | Optional checksum for integrity verification |
storageType | enum | No | Target storage backend: AZURE or CUSTOM |
document Fields
The document object is required.
| Field | Type | Required | Description |
|---|---|---|---|
entityId | string | Yes | Entity ID associated with the document |
entityType | string | Yes | Entity type (e.g. CAP, PARCEL, INSPECTION) |
recordId | object | No | Associated record identifier |
description | string | No | Document description |
uploadedBy | string | No | User who uploaded the document |
recordType | object | No | Record type breakdown (capGroup, capType, capSubType, capCategory) |
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "Upload session created",
"result": {
"sessionId": "550e8400-e29b-41d4-a716-446655440000",
"expiresIn": "3600"
},
"errors": []
}
| Field | Type | Description |
|---|---|---|
sessionId | UUID | Use this ID for all subsequent upload steps |
expiresIn | string | Session TTL in seconds |
Step 2 — Upload a Chunk
POST /documents/upload-sessions/{uploadSessionId}/chunks/{chunk}
Uploads a single binary chunk of the file. Chunks must be numbered starting from 1 and uploaded sequentially or in parallel. Each call is a multipart/form-data request.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uploadSessionId | UUID | Yes | Session ID from Step 1 |
chunk | integer | Yes | Chunk number (must be ≥ 1) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
digest | string | No | Optional checksum of this chunk for integrity verification |
Request
Content-Type: multipart/form-data
| Part | Description |
|---|---|
uploadedFile | Binary content of this file chunk |
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "Chunk received",
"result": {
"chunkNumber": 1,
"message": "Chunk 1 uploaded successfully"
},
"errors": []
}
Step 3 — Commit the Upload
POST /documents/upload-sessions/{uploadSessionId}/commit
Triggers assembly of all uploaded chunks into a single file, then transfers the assembled file to the backend document store. This is an asynchronous operation — the commit is queued and processed in the background.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uploadSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
{
"traceId": "trace-abc-123",
"message": "Commit accepted",
"result": {
"message": "Processing started"
},
"errors": []
}
Step 4 — Get Upload Status & Document ID
GET /documents/upload-sessions/{uploadSessionId}
Poll this endpoint after committing to retrieve the processing status and, once complete, the documentId of the newly stored document.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uploadSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
{
"traceId": "trace-abc-123",
"message": "Upload complete",
"result": {
"documentId": 98765,
"fileName": "example.pdf",
"state": "Complete",
"eventMessage": "Upload completed successfully."
},
"errors": []
}
State Values
| Value | Description |
|---|---|
Not Started | Commit is queued, not yet started |
In Progress | File assembly and transfer underway |
Complete | File stored successfully; documentId is populated |
Failed | Processing failed; see eventMessage for details |
Download Files
1. POST /documents/download-sessions → Create download session
2. GET /documents/download-sessions/{id} → Poll for status & retrieve download link
Step 1 — Create a Download Session
POST /documents/download-sessions
Initiates a download session for a given document. Returns a sessionId to poll for the generated download link.
Request Body
{
"documentId": 98765,
"fileKey": "optional-file-key",
"moduleName": "optional-module",
"storageType": "AZURE",
"recordId": {
"customId": "B2023-001",
"id": "123456"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
documentId | long | Yes | ID of the document to download |
fileKey | string | No | Alternative file key lookup |
moduleName | string | No | Module context for permission check |
storageType | enum | No | AZURE or CUSTOM |
recordId | object | No | Associated record for permission scoping |
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "Download session created",
"result": {
"sessionId": "660e8400-e29b-41d4-a716-446655440111",
"expiresIn": "3600"
},
"errors": []
}
Step 2 — Get Download Status & Link
GET /documents/download-sessions/{downloadSessionId}
Poll for the download link once the session is ready.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
downloadSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
{
"traceId": "trace-abc-123",
"message": "Download link generated",
"result": {
"documentId": 98765,
"shareFileLink": "https://storage.azure.com/...",
"shareFileLinkExpiresOn": "2026-03-18T22:00:00Z",
"state": "Complete",
"message": "Download link generated."
},
"errors": []
}
| Field | Type | Description |
|---|---|---|
documentId | long | The document ID |
shareFileLink | string | Time-limited direct download URL |
shareFileLinkExpiresOn | string | ISO 8601 expiry timestamp for the link |
state | enum | Not Started, In Progress, Complete, Failed |
message | string | Human-readable status message |
Delete Files
Important: Deletion is permanent at the storage layer. Once a delete operation completes, the document cannot be recovered through ACDS.
1. POST /documents/delete-sessions → Create delete session
2. GET /documents/delete-sessions/{id} → Poll for status
Step 1 — Create a Delete Session
POST /documents/delete-sessions
Initiates a delete operation for a document.
Request Body
{
"documentId": 98765,
"entityId": "optional-parent-entity-id",
"fileKey": "optional-file-key",
"moduleName": "optional-module",
"storageType": "AZURE",
"recordId": {
"customId": "B2023-001",
"id": "123456"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
documentId | long | Yes | ID of the document to delete |
entityId | string | No | Parent entity ID associated with the document |
fileKey | string | No | Alternative file key |
moduleName | string | No | Module context |
storageType | enum | No | AZURE or CUSTOM |
recordId | object | No | Associated record for permission scoping |
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "Delete session created",
"result": {
"sessionId": "770e8400-e29b-41d4-a716-446655440222",
"expiresIn": "3600"
},
"errors": []
}
Step 2 — Get Delete Status
GET /documents/delete-sessions/{deleteSessionId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleteSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
{
"traceId": "trace-abc-123",
"message": "Document deleted",
"result": {
"documentId": 98765,
"entityId": "optional-entity-id",
"state": "Complete",
"message": "Document deleted.",
"eventMessage": "DocumentDeleteAfter event triggered."
},
"errors": []
}
| Field | Type | Description |
|---|---|---|
documentId | long | The deleted document's ID |
entityId | string | Parent entity ID if provided |
state | enum | Not Started, In Progress, Complete, Failed |
message | string | Status message |
eventMessage | string | Result of any post-delete event hooks |
Get File Metadata
1. POST /documents/metadata-sessions → Create metadata session
2. GET /documents/metadata-sessions/{id} → Poll for metadata result
Step 1 — Create a Metadata Session
POST /documents/metadata-sessions
Initiates a metadata retrieval request for a document.
Request Body
{
"documentId": 98765,
"fileKey": "optional-file-key",
"moduleName": "optional-module",
"storageType": "AZURE",
"recordId": {
"customId": "B2023-001",
"id": "123456"
}
}
You can look up a document by documentId, fileKey, or both. At least one should be provided.
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "Metadata session created",
"result": {
"sessionId": "880e8400-e29b-41d4-a716-446655440333",
"expiresIn": "3600"
},
"errors": []
}
Step 2 — Get Metadata Result
GET /documents/metadata-sessions/{metadataSessionId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
metadataSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
Returns document metadata once the session is in Complete state. The result payload contains file metadata attributes such as file name, size, storage location, and associated record information.
List Documents
1. POST /documents/list-sessions → Create list session
2. GET /documents/list-sessions/{id} → Poll for document list result
Step 1 — Create a List Session
POST /documents/list-sessions
Initiates a request to list documents associated with a record or entity.
Request Body
{
"entityIds": "id1,id2,id3",
"entityType": "CAP",
"altIds": "alt1,alt2"
}
entityIds accepts a comma-separated list of entity IDs. entityType specifies the type (e.g. CAP, PARCEL, INSPECTION). altIds is optional for alternate ID lookups.
Response 201 Created
{
"traceId": "trace-abc-123",
"message": "List session created",
"result": {
"sessionId": "990e8400-e29b-41d4-a716-446655440444",
"expiresIn": "3600"
},
"errors": []
}
Step 2 — Get List Results
GET /documents/list-sessions/{listSessionId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
listSessionId | UUID | Yes | Session ID from Step 1 |
Response 200 OK
Returns a list of document metadata objects associated with the requested entities once the session reaches Complete state.
API Quick Reference
| Operation | Method | Endpoint | Description |
|---|---|---|---|
| Create Upload Session | POST | /documents/upload-sessions | Initialize a chunked file upload |
| Upload Chunk | POST | /documents/upload-sessions/{id}/chunks/{n} | Upload one chunk of the file |
| Commit Upload | POST | /documents/upload-sessions/{id}/commit | Assemble chunks and store file |
| Get Upload Status | GET | /documents/upload-sessions/{id} | Poll upload status; get documentId |
| Create Download Session | POST | /documents/download-sessions | Request a download link |
| Get Download Status | GET | /documents/download-sessions/{id} | Poll for link; retrieve download URL |
| Create Delete Session | POST | /documents/delete-sessions | Initiate deletion of a document |
| Get Delete Status | GET | /documents/delete-sessions/{id} | Poll deletion status |
| Create Metadata Session | POST | /documents/metadata-sessions | Request document metadata |
| Get Metadata | GET | /documents/metadata-sessions/{id} | Retrieve document metadata |
| Create List Session | POST | /documents/list-sessions | List documents for a record |
| Get List Results | GET | /documents/list-sessions/{id} | Retrieve list of documents |