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}
1
{{baseUrl}}/entities/Accounts?include-deleted=false&filter[email1][email protected]
Copied!
1
{
2
"is_delete_protected": false,
3
"id": "0bc376a4-c579-413a-9221-e86e4a134766",
4
"is_deleted": false,
5
"modified": "2019-02-01 10:01:23.011709+00:00",
6
"created": "2019-01-30 11:44:23.586083+00:00",
7
"account_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/AccountTypes/a456236f-6f23-0908-abfd-384aa0f62f9e",
8
"customer_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/04444b3a-c669-03bc-2c49-bcd7f047d41a",
9
"industry": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/acbda72f-2054-0b71-9d42-cb35aaa37600",
10
"owner": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Clients/00000000-0000-0000-0000-000000011a3d",
11
"parent_account": null,
12
"parent_account_relation_type": null,
13
"picture": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/CloudObjects/5ddfe953-a569-48e1-86bb-271e6506e7d0",
14
"unit": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/SalesUnits/ea33e8fb-9a56-4802-a175-2d1f406af7cf",
15
"account_class": 5,
16
"account_type_id": "a456236f-6f23-0908-abfd-384aa0f62f9e",
17
"address": "7 Lillian Plaza",
18
"city": "Coronda",
19
"comments": "",
20
"country": "Argentina",
21
"customer_type_id": "04444b3a-c669-03bc-2c49-bcd7f047d41a",
22
"email1": "[email protected]",
23
"email2": "",
24
"email3": "",
25
"email4": "",
26
"email5": "",
27
"health_category": null,
28
"health_status": null,
29
"home_page": "www.ziemannandsons.com",
30
"industry_id": "acbda72f-2054-0b71-9d42-cb35aaa37600",
31
"name": "Ziemann and Sons",
32
"owner_id": "00000000-0000-0000-0000-000000011a3d",
33
"parent_account_id": null,
34
"parent_account_relation_type_id": null,
35
"phone1": "+1 (888) 500-8000",
36
"..."
37
}
Copied!

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
1
{
2
"cloud_object": {
3
"filename": "New PDF File.pdf",
4
"type": 1,
5
"content": "Content in basa64"
6
},
7
"account_id": "0bc376a4-c579-413a-9221-e86e4a134766"
8
}
Copied!
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
1
{
2
"cloud_object": {
3
"filename": "File from google drive",
4
"type": 3,
5
"url": "https://docs.google.com/spreadsheets/d/1qDQJPID0UHkGywAoopWLYMWHGVDwCo0M2nov-XmzU-Q/edit?usp=sharing"
6
},
7
"account_id": "0bc376a4-c579-413a-9221-e86e4a134766"
8
}
Copied!