Packages API
The Packages API allows you to retrieve and manage document packages stored in your vault.
Overview
A Package in Concord eVault represents a collection of related documents stored as a single unit. Packages are the primary way documents are organized and managed within a vault.
Key concepts: A Package is a container for one or more related files. A Package File is an individual document within a package. Folders can organize packages for better structure. Metadata (custom fields) can be attached to packages. A Package Type is one of AuthoritativeCopy, Receipt, or Upload. A Merge means two packages can be combined into one, consolidating their files and attachments.
| Scope | Description |
|---|---|
packages:read | View packages and download files |
packages:write | Create and modify packages |
packages | Full access (read + write) |
List Recent Packages
Retrieve a paginated list of the most recently imported packages.
GET /api/packages/recent
Required scope: packages:read.
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number (1-based) |
pageSize | integer | No | 20 | Items per page (max: 100) |
Response (200 OK)
{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organizationId": "1fa85f64-5717-4562-b3fc-2c963f66afa6",
"vaultId": "2fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Loan Document Package",
"packageType": "AuthoritativeCopy",
"source": "Api",
"numberOfFiles": 3,
"totalFileSize": 1245678,
"vaultFolder": {
"id": "7fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "2024 Q1 Loans"
},
"fields": [
{ "id": "field-001-guid", "name": "loanNumber", "value": "LN-2024-001" },
{ "id": "field-002-guid", "name": "borrowerName", "value": "John Smith" }
],
"importedAt": "2024-01-15T10:30:00Z"
}
],
"metadata": { "page": 1, "pageSize": 10, "totalCount": 1 }
}
Search Packages
Search packages by name, type, source, date range, and custom field values.
POST /api/packages/search
Required scope: packages:read.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | int | No | Page number (default: 1) |
pageSize | int | No | Items per page (1–100, default: 50) |
query | string | No | Search by package name |
packageType | string | No | Filter by type (comma-separated) |
source | string | No | Filter by source (Api, Transfer, Upload) |
importedAfter | string | No | Filter by import date (ISO 8601) |
importedBefore | string | No | Filter by import date (ISO 8601) |
fields | array | No | Filter by custom field values |
Response (200 OK): Returns a paginated list of PackageViewModel objects matching the criteria.
Get Package
Retrieve details for a specific package.
GET /api/packages/{id}
Required scope: packages:read.
Path parameters: id (guid, required) — Package ID.
Response (200 OK)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organizationId": "1fa85f64-5717-4562-b3fc-2c963f66afa6",
"vaultId": "2fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Loan Document Package",
"packageType": "AuthoritativeCopy",
"source": "Api",
"numberOfFiles": 3,
"totalFileSize": 1245678,
"vaultFolder": {
"id": "7fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "2024 Q1 Loans"
},
"fields": [
{ "id": "field-001-guid", "name": "loanNumber", "value": "LN-2024-001" },
{ "id": "field-002-guid", "name": "borrowerName", "value": "John Smith" }
],
"importedAt": "2024-01-15T10:30:00Z"
}
Error responses: 404 — Package not found in current vault.
List Folder Packages
List all packages within a specific folder.
GET /api/vault/folders/{vaultFolderId}/packages
Required scope: packages:read.
Path parameters: vaultFolderId (guid, required) — Folder ID.
Query parameters: page (integer, default 1) — page number; pageSize (integer, default 50, max 100) — items per page.
List Package Files
Retrieve all files within a package.
GET /api/packages/{vaultPackageId}/files
Required scope: packages:read.
Path parameters: vaultPackageId (guid, required) — Package ID.
Query parameters: page (integer, default 1), pageSize (integer, default 10, max 100).
Response (200 OK)
{
"data": [
{
"id": "8fa85f64-5717-4562-b3fc-2c963f66afa6",
"organizationId": "1fa85f64-5717-4562-b3fc-2c963f66afa6",
"vaultId": "2fa85f64-5717-4562-b3fc-2c963f66afa6",
"packageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fileName": "promissory_note.pdf",
"fileType": "application/pdf",
"fileSize": 245678
}
],
"metadata": { "page": 1, "pageSize": 10, "totalCount": 1 }
}
Download Package File
Download a specific file from a package. Files are returned with an appropriate watermark based on the package type.
GET /api/packages/{vaultPackageId}/files/{id}
Required scope: packages:read.
Path parameters: vaultPackageId (guid, required) — Package ID; id (guid, required) — File ID.
Response: Returns the file content as a PDF with appropriate Content-Type and Content-Disposition headers. A watermark is applied based on package type (AuthoritativeCopy, Receipt, UploadReceipt, or Upload). Note: File downloads are logged in the activity trail.
List Package Events
Retrieve the activity event history for a package.
GET /api/packages/{vaultPackageId}/events
Required scope: packages:read.
Path parameters: vaultPackageId (guid, required).
Query parameters: page (integer, default 1), pageSize (integer, default 25, max 100).
Response (200 OK)
{
"data": [
{
"id": "9fa85f64-5717-4562-b3fc-2c963f66afa6",
"organizationId": "1fa85f64-5717-4562-b3fc-2c963f66afa6",
"vaultId": "2fa85f64-5717-4562-b3fc-2c963f66afa6",
"packageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"eventType": "PackageImported",
"metadata": {},
"createdAt": "2024-01-15T10:30:00Z"
}
],
"metadata": { "page": 1, "pageSize": 25, "totalCount": 1 }
}
Event types
| Event type | Description |
|---|---|
PackageUploaded | Package uploaded via portal |
PackageImported | Package imported via API |
PackageReceived | Package received via transfer |
TransferInitiated | Transfer started for this package |
TransferRejected | Transfer was rejected |
TransferCompleted | Transfer completed successfully |
TransferAborted | Transfer was aborted |
PackageMergedInto | Another package was merged into this one |
Error responses: 404 — Package not found (includes packages that have been merged or rescinded).
Update Package Fields
Update custom field values for a package.
PATCH /api/packages/{id}/fields
Required scope: packages:write.
Path parameters: id (guid, required) — Package ID.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
fields | array | Yes | Array of field updates |
Each field update contains fieldId (guid) — the vault field ID — and value (string) — the new value (an empty string removes the field).
Response (200 OK): Returns the updated PackageViewModel with all fields.
Error responses: 400 — cannot update Receipt-type packages; 404 — package not found.
Merge Packages
Merge one package (the source) into another (the target). All files and attachments from the source are copied onto the target, and the source is marked as Merged. Once merged, the source package is hidden from all list, search, and folder endpoints, while a durable link back to the target is retained for audit purposes.
POST /api/packages/{id}/merge
Required scope: packages:write.
Path parameters: id (guid, required) — the source package to merge away.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mergeIntoVaultPackageId | guid | Yes | The target package that will receive the source data |
{
"mergeIntoVaultPackageId": "550e8400-e29b-41d4-a716-446655440001"
}
Allowed package type combinations
| Source | Target | Allowed |
|---|---|---|
| Upload | Upload | Yes |
| Upload | AuthoritativeCopy | Yes |
| AuthoritativeCopy | AuthoritativeCopy | Yes |
| AuthoritativeCopy | Upload | No |
| Receipt | (any) | No |
| (any) | Receipt | No |
Response (202 Accepted): The response includes a Location header pointing to the target package (/api/packages/{mergeIntoVaultPackageId}).
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mergedIntoVaultPackageId": "550e8400-e29b-41d4-a716-446655440001",
"status": "Merged",
"filesCopied": 2,
"attachmentsCopied": 1
}
| Field | Type | Description |
|---|---|---|
id | guid | The source package ID |
mergedIntoVaultPackageId | guid | The target package ID |
status | string | Source package status after the merge (Merged) |
filesCopied | integer | Number of files copied to the target |
attachmentsCopied | integer | Number of attachments copied to the target |
Error responses
| Status | Description |
|---|---|
| 400 | Invalid request (see reasons below) |
| 404 | Source or target package not found in the current vault |
| 422 | The vault is archived and cannot be modified |
A 400 is returned when any of the following apply: mergeIntoVaultPackageId is missing; the source and target are the same package; either package is not Active; a Receipt package is involved (as source or target); an AuthoritativeCopy package is being merged into an Upload package; either package has already been merged; or the source package has existing transfers.
Note: The merge is recorded as a PackageMergedInto event in the target package's activity trail, retrievable via GET /api/packages/{id}/events. The source package is no longer accessible after the merge — requesting its events returns 404 — so its PackageMerged event cannot be retrieved through the API.
Add Packages to Folder
Move multiple packages to a specific folder.
POST /api/vault/folders/{vaultFolderId}/packages
Required scope: packages:write.
Path parameters: vaultFolderId (guid, required) — Target folder ID.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
packageIds | guid[] | Yes | Array of package IDs to move |
Response (204 No Content): Packages already in the target folder are skipped. Activity is logged for each package moved.
Export Packages Report
Generate a CSV report of packages matching the specified criteria.
POST /api/packages/report
Required scope: packages:read.
Request body: Same filter parameters as the Search Packages endpoint.
Response: Returns a CSV file with package data including all visible vault fields as columns.
Response models (Packages API)
PackageViewModel
| Field | Type | Description |
|---|---|---|
id | guid | Unique identifier |
organizationId | guid | Organization ID |
vaultId | guid | Vault ID |
name | string | Package name |
packageType | string | AuthoritativeCopy, Receipt, etc. |
source | string | Api, Transfer, or Upload |
numberOfFiles | integer | Number of files |
totalFileSize | integer | Total size in bytes |
vaultFolder | object | Parent folder (id, name) |
transferId | guid | Associated transfer ID (nullable) |
transferBatchId | guid | Associated batch ID (nullable) |
fields | array | Custom field values (array of objects) |
importedAt | datetime | Import timestamp (ISO 8601) |
PackageFieldViewModel
| Field | Type | Description |
|---|---|---|
id | guid | Field ID |
name | string | Field name |
value | string | Field value |
MergePackageResponse
| Field | Type | Description |
|---|---|---|
id | guid | Source package ID |
mergedIntoVaultPackageId | guid | Target package ID |
status | string | Source package status after the merge (Merged) |
filesCopied | integer | Number of files copied to the target |
attachmentsCopied | integer | Number of attachments copied to the target |
PackageFileViewModel
| Field | Type | Description |
|---|---|---|
id | guid | Unique identifier |
organizationId | guid | Organization ID |
vaultId | guid | Vault ID |
packageId | guid | Package ID |
fileName | string | Original file name |
fileType | string | MIME type |
fileSize | integer | File size in bytes |
PackageEventViewModel
| Field | Type | Description |
|---|---|---|
id | guid | Event identifier |
organizationId | guid | Organization ID |
vaultId | guid | Vault ID |
packageId | guid | Package ID |
eventType | string | Type of event |
metadata | object | Additional event metadata |
createdAt | datetime | When the event occurred |
Next: Draft Packages API.
