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
EndpointsPOST
/v1/portal/publish_files
ProducesJSON
PaginationYes
Application permissions requiredPortal: Share client files
Files: Create, edit, delete
OAuth scopesFILE_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.

AttributeDescriptionExample
file_idThe ID of the file you want to associate with contacts."37"
publish_statusIndicates 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_statusIndicates 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"
errorA list of objects representing errors arising during publishing or notifying. See below for object details.See below.

Error objects

AttributeDescriptionExample
codeThe name of the error. String“notification_failed"
titleThe description of the error. String."Notification failed for some contacts."
detailThe details of the error, including the contacts that failed. String."Notification failed for contacts [1,2,3]"

Parameters

AttributeDescriptionExample
files_idThe 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_idsThe IDs of contacts that will always have the files published to portal, regardless of portal_publishing value. List of integers. Optional.[23,25]
portal_publishingThe scope of publishing the files to portal. String. Required.

Supported values:
-do_not_publish
-use_contact_preference
-publish
"publish"
contact_notificationThe 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
  }
}