Client Portal
Operationalize your client engagement by publishing a report or file to the Client Portal and notifying clients in a single API call.
As a pre-step to this workflow, you can generate reports, upload files, or associate a file to a portfolio via API, or do this manually in Addepar.
Base route | /v1/portal/publish_files |
Endpoints | POST /v1/portal/publish_files |
Produces | JSON |
Pagination | Yes |
Application Permissions Required | Portal: Share client files Files: Create, edit, delete |
OAuth Scopes | FILE_WRITE and PUBLISH_FILE |
Resource overview
The Publish to Portal API returns a resource object containing the file ID and status in a successful POST response.
Attributes | Description | Example |
---|---|---|
file_id | The ID of the file you want to associate with contacts. | 37 |
publish_status | Indicates if the file was published to the Portal. -If you share a file with multiple contacts, and the file fails to share with one contact, the job will say fail .-If the file is shared with all listed contacts without issue, it will say success . | success |
notify_status | Indicates if the contact was notified via email. - If you requested to notify multiple contacts, and one contact couldn't be notified, the job will say fail .- If all contacts are notified without issue, the job will say success .- If you don't notify any contacts, the message will return success . | success |
error | If any contacts fail to be published or notified, you'll receive their Contact ID. | \[ { "code": "notification_failed", "title": "Notification failed for some contacts.", "detail": "Notification failed for contacts [1,2,3]." } ] |
Parameters
Required Parameters
Attribute | Description | Example | Validation |
---|---|---|---|
files_id | The ID of the file you want to associate with contacts. Integer. | [1,2,3] | - Exceeds 500 file limit. - File ID not found or invalid. - Missing File ID - File-to-Portfolio association is missing. Note: Portfolio cannot be an asset |
portal_publishing | Indicates the scope of contacts you wish to publish the file. Supported values: - use_contact_preference - publish | use_contact_preference | - Parameter is missing or invalid |
contact_notification | Indicates the scope of which contacts will receive a notification upon a successful publish Supported values: - use_contact_preference - notify - do_not_notify | do_not_notify | - Parameter is missing or invalid |
Publish to Portal
Requests to publish a file to the Client Portal.
GET /v1/portal/publish_files
GET https://examplefirm.addepar.com/api/v1/portal/publish_files
{
"data": {
"type": "publish_portal_files_request",
"attributes": {
"files_id": [37,38,39],
"portal_publishing": "publish",
"contact_notification": "DO_NOT_NOTIFY"
}
}
}
HTTP/1.1 200
{
"data": [
{
"id": "37",
"type": "publish_files_result",
"attributes": {
"file_id": 37,
"notify_status": "success",
"publish_status": "success"
},
"links": {
"self": "/v1/publish_files_result/37"
}
},
{
"id": "38",
"type": "publish_files_result",
"attributes": {
"file_id": 38,
"notify_status": "success",
"publish_status": "success"
},
"links": {
"self": "/v1/publish_files_result/38"
}
},
{
"id": "39",
"type": "publish_files_result",
"attributes": {
"file_id": 39,
"notify_status": "success",
"publish_status": "success"
},
"links": {
"self": "/v1/publish_files_result/39"
}
}
],
"included": [],
"links": {
"prev": null,
"next": null
}
}
Response codes:
- 400 Bad request: Failed on validation.
- 403 Forbidden: Lacking file permission or client portal publish file permission.
Partial fail example
When you request to publish files to the portal, if the publish or notification fails for one or more contacts, the job will still be processed. However, you will receive a notice of the failures along with the contact IDs.
HTTP/1.1 200
{
"data": [
{
"id": "37",
"type": "publish_files_result",
"attributes": {
"file_id": 37,
"notify_status": "fail",
"publish_status": "success",
"error": [
{
"code": "notification_failed",
"title": "Notification failed for some contacts.",
"detail": "Notification failed for contacts [1,2,3]."
}
]
},
"links": {
"self": "/v1/publish_files_result/37"
}
},
{
"id": "38",
"type": "publish_files_result",
"attributes": {
"file_id": 38,
"notify_status": "fail",
"publish_status": "fail",
"error": [
{
"code": "publish_failed",
"title": "Publish failed for some contacts.",
"detail": "Publish failed for contacts [4,5]."
},
{
"code": "notification_failed",
"title": "Notification failed for some contacts.",
"detail": "Notification failed for contacts [1,2,3]."
}
]
},
"links": {
"self": "/v1/publish_files_result/38"
}
}
],
"included": [],
"links": {
"prev": null,
"next": null
}
}
Updated 7 months ago