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

Tutorial Assignment

Upload Document to the Account.

0. Required fields

1. Prepare Data

Account_id

As we are going to upload document to a specific account, we need to retrieve its ID

{{baseUrl}}/entities/Accounts?include-deleted=false&filter[email1]=info@ziemann-and-sons.de
{
            "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": "info@ziemann-and-sons.de",
            "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. Upload document to the Storage

  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

{
    "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"
}

Last updated