Pipeliner CRM Cloud API

Uploading Documents

This tutorial describes how to upload the documents to Leads, Opportunities, Accounts, and Contacts. The following image describes the feature to upload documents through the Pipeliner CRM user interface.

Upload documents GUI

Endpoint name: CloudObjects.create

This endpoint uses the POST method to upload the documents as an attachment. To upload a document using this API endpoint, there are several parameters you must pass.

Parameter name Value Description
filename  String Required. The filename will the name of the file with the file type detail. Example: Sample. jpeg, Test.docx.
mime_type String Required. The mime type is a text string that identifies a specific file format. The attachment type and the subtype must be separated by a forward slash. Example: image/jpeg
type Integer Required. Integer enum values are:

1 – S3File2, 2 – S3Image, 3 – GoogleDriveFile, 4 – OneDriveFile, 5 – BoxFile, 6 – DropboxFile, 7 – SharepointFile, 8 – ExternalURL.

content String Required.  The image URI is in base64 encoded string value.

Request URL Syntax
Copy to Clipboard
Example Request URL
Copy to Clipboard
Request Body Example
Copy to Clipboard

Note: For uploading the document, the file types must be defined, and content type must be base64 string value.

Example Response
Copy to Clipboard
Status Code

201 Created

Associating an uploaded document with a record

After you upload a document, you can associate it with a record. In the Pipeliner CRM, records refer to entities, such as Leads, Contacts, Accounts, and Opportunities.

You can also associate your document with other entities, such as Message, Activity, EmailTemplate, Process, and ReportSchedule.

To associate your document with a record, you need to use the .list endpoint to fetch the list of all records and identify the record with which you want to associate a document. Similarly, you need to use the CloudObjects.list endpoint to fetch the list of all cloud objects (documents) and identify the document you want to associate.

For example, to associate an Account with a document, use the Accounts.List and CloudObjects.list endpoints to identify the Account and document you need to associate.

Endpoint name: CloudObjectRelations.create

This endpoint uses the POST method to associate the uploaded documents with a record or other entities.

The following example uses the CloudObjectRelations endpoint to associate a document with an Account.

Parameter Value Description
account_id String Required. The ID of the Account with which you want to associate a specified document.
cloud_object_id String Required. The ID of the document with which you want to associate a specified Account.

Request URL Syntax

Copy to Clipboard

Example Request URL

Copy to Clipboard

Request Body Example

Copy to Clipboard

Tip:

  • Similarly, you can associate other records or entities with a document. For example, to associate a document with a Contact, provide the parameters, contact_id, and cloud_object_id, in the request body.
  • You can associate multiple documents with a record or entity.
Example Response

Copy to Clipboard

Status Code

201 Created

After passing the POST request to associate a document with an Account, if you get the “success”: true message, then it means your record and document are associated successfully.

How to associate an Account with a document using Postman

You can use Postman or any other API tool for associating an Account with a document using the CloudObjectRelations.create API. The below screenshot explains the steps to send the request with the required parameters in the JSON format.

Associate Upload Document