Links

Upload Document

This tutorial should help you upload the first Document. Before moving forward, make sure your Authentication works and you understand the Key Concepts of the Pipeliner API, and make sure you know how to use API parameters
The Documents represent the physical file (.docx, .pdf, etc.) that can be linked to records in Pipeliner
Documents can be found on almost all Main Pipeliner Entities

Tutorial Assignment

Upload Document to the Account.

0. Required fields

Required API field Name
Description
filename
Name of the Document
content
The image in base64 encoded string value.
type
Required. Integer enum values are:
1 – S3File (recommended - Pipeliner Storage)
2 – S3Image (Pipeliner Storage),
3 – GoogleDriveFile,
4 – OneDriveFile,
5 – BoxFile,
6 – DropboxFile,
7 – SharepointFile,
8 – ExternalURL.

1. Prepare Data

Account_id

As we are going to upload document to a specific account, we need to retrieve its ID
get
https://us-east.pipelinersales.com/api/v100/rest/spaces/<space_id>
/entities/Accounts/{id}
{{baseUrl}}/entities/Accounts?include-deleted=false&filter[email1][email protected]
{
"is_delete_protected": false,
"id": "0bc376a4-c579-413a-9221-e86e4a134766",
"is_deleted": false,
"modified": "2019-02-01 10:01:23.011709+00:00",
"created": "2019-01-30 11:44:23.586083+00:00",
"account_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/AccountTypes/a456236f-6f23-0908-abfd-384aa0f62f9e",
"customer_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/04444b3a-c669-03bc-2c49-bcd7f047d41a",
"industry": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/acbda72f-2054-0b71-9d42-cb35aaa37600",
"owner": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Clients/00000000-0000-0000-0000-000000011a3d",
"parent_account": null,
"parent_account_relation_type": null,
"picture": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/CloudObjects/5ddfe953-a569-48e1-86bb-271e6506e7d0",
"unit": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/SalesUnits/ea33e8fb-9a56-4802-a175-2d1f406af7cf",
"account_class": 5,
"account_type_id": "a456236f-6f23-0908-abfd-384aa0f62f9e",
"address": "7 Lillian Plaza",
"city": "Coronda",
"comments": "",
"country": "Argentina",
"customer_type_id": "04444b3a-c669-03bc-2c49-bcd7f047d41a",
"email1": "[email protected]",
"email2": "",
"email3": "",
"email4": "",
"email5": "",
"health_category": null,
"health_status": null,
"home_page": "www.ziemannandsons.com",
"industry_id": "acbda72f-2054-0b71-9d42-cb35aaa37600",
"name": "Ziemann and Sons",
"owner_id": "00000000-0000-0000-0000-000000011a3d",
"parent_account_id": null,
"parent_account_relation_type_id": null,
"phone1": "+1 (888) 500-8000",
"..."
}

2. Upload Document

Uploading document consists of two steps, but we can actually accomplish this in one request:
  1. 1.
    Upload document to the Storage
  2. 2.
    Link Document to Account

Upload document & linking in one step

In this step, we will upload a document and immediately link that to the Account
post
https://us-east.pipelinersales.com/api/v100/rest/spaces/<space_id>
/entities/CloudObjectRelations
{
"cloud_object": {
"filename": "New PDF File.pdf",
"type": 1,
"content": "Content in basa64"
},
"account_id": "0bc376a4-c579-413a-9221-e86e4a134766"
}
It is recommended to include the File Type in the file name of the document (like *.pdf, *.jpg). Then Pipeliner can automatically recognize the format that helps sales people with the opening of documents

Uploading files from external storage

If you wish to upload files that are stored in external storage like (Sharepoint, Google drive) you can do that by changing the type attribute. In our case, we are going to Upload a document to Pipeliner that is stored on Google Drive storage.
The list of all types
1 – S3File (recommended - Pipeliner Storage)
2 – S3Image (Pipeliner Storage),
3 – GoogleDriveFile,
4 – OneDriveFile,
5 – BoxFile,
6 – DropboxFile,
7 – SharepointFile,
8 – ExternalURL.
For Uploading external files, you need to specify the url instead of content attribute
{
"cloud_object": {
"filename": "File from google drive",
"type": 3,
"url": "https://docs.google.com/spreadsheets/d/1qDQJPID0UHkGywAoopWLYMWHGVDwCo0M2nov-XmzU-Q/edit?usp=sharing"
},
"account_id": "0bc376a4-c579-413a-9221-e86e4a134766"
}