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.
Attribute | 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. String. - 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. String. - 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 | A list of objects representing errors arising during publishing or notifying. See below for object details. | See below. |
Error objects
Attribute | Description | Example |
---|---|---|
code | The name of the error. String | “notification_failed" |
title | The description of the error. String. | "Notification failed for some contacts." |
detail | The details of the error, including the contacts that failed. String. | "Notification failed for contacts [1,2,3]" |
Parameters
Attribute | Description | Example |
---|---|---|
files_id | The IDs of the files you want to publish to contacts' portals. List of integers. Required. Maximum of 500 files. | [37,38,39] |
publish_override_contact_ids | The IDs of contacts that will always have the files published to portal, regardless of portal_publishing value. List of integers. Optional. | [23,25] |
portal_publishing | The scope of publishing the files to portal. String. Required. Supported values: - do_not_publish - use_contact_preference - publish | "publish" |
contact_notification | The scope of notifying contacts about successful publishes. String. Required. Supported values: - do_not_notify - use_contact_preference - notify | "notify" |
Publish to Portal
Requests to publish a file to the Client Portal.
POST /v1/portal/publish_files
Example
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:
200 OK: Success
. This occurs even if failures during publish or notification occur.400 Bad request
: Missing required fields or too many files.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 1 day ago