LogoLogo
HomeSupport centerAPP
  • Overview
    • Quick Start
    • About the API
    • Authentication
  • API Reference
    • REST API
    • GraphQL API
  • Core API Concepts
    • Understanding the CRM Concept
    • Fields
    • API parameters
    • Dates
    • Pagination
    • Bulk Create, Update, Delete
    • Webhooks(Real-time updates)
  • Tutorials & Articles
    • Create Account
    • Create Contact
    • Create Opportunity
    • Create Product, Product Line Item
    • Create Custom Entity Record
    • Upload Document
    • Merging Accounts/Contacts
Powered by GitBook
On this page
  1. Tutorials & Articles

Upload Document

PreviousCreate Custom Entity RecordNextMerging Accounts/Contacts

Last updated 3 years ago

This tutorial should help you upload the first Document. Before moving forward, make sure your works and you understand the of the Pipeliner API, and make sure you know how to use

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

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

{{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"
}
Authentication
Key Concepts
API parameters
Documents can be found on almost all Main Pipeliner Entities
  • Tutorial Assignment
  • 0. Required fields
  • 1. Prepare Data
  • 2. Upload Document
  • POST/entities/CloudObjectRelations
post

Creates new cloudobjectrelation

Query parameters
validation-levelinteger · int32Optional

Specify validation level of cloudobjectrelation on create. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

Body
modifiedstring · date-timeRead-onlyOptional

Last modification time.

Example: 2019-01-01T00:00:00
createdstring · date-timeRead-onlyOptional

Creation time.

Example: 2019-01-01T00:00:00
account_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
activity_idstring · uuidOptional

Relation to single abstract entity instance. E.g. Relation to Lead/Oppty

Example: 01234567-abcd-dcba-ffff-000000000000
cloud_object_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
contact_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
email_sequence_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
email_template_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
lead_oppty_idstring · uuidOptional

Relation to single abstract entity instance. E.g. Relation to Lead/Oppty

Example: 01234567-abcd-dcba-ffff-000000000000
message_idstring · uuidOptional

Relation to single abstract entity instance. E.g. Relation to Lead/Oppty

Example: 01234567-abcd-dcba-ffff-000000000000
process_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
process_template_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
project_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
report_schedule_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
revisioninteger · int32Optional

Revision when entity was lastly changed.

Example: 1
Responses
201
Creation confirmation. Returns created cloudobjectrelation
application/json
500
unexpected error
application / json
post
POST /api/v100/rest/spaces/<space_id>/entities/CloudObjectRelations HTTP/1.1
Host: us-east.pipelinersales.com
Content-Type: application / json
Accept: */*
Content-Length: 769

{
  "cloud_object": {
    "id": "https://example.com"
  },
  "report_schedule": {
    "id": "https://example.com"
  },
  "account_id": "01234567-abcd-dcba-ffff-000000000000",
  "activity_id": "01234567-abcd-dcba-ffff-000000000000",
  "cloud_object_id": "01234567-abcd-dcba-ffff-000000000000",
  "contact_id": "01234567-abcd-dcba-ffff-000000000000",
  "email_sequence_id": "01234567-abcd-dcba-ffff-000000000000",
  "email_template_id": "01234567-abcd-dcba-ffff-000000000000",
  "lead_oppty_id": "01234567-abcd-dcba-ffff-000000000000",
  "message_id": "01234567-abcd-dcba-ffff-000000000000",
  "process_id": "01234567-abcd-dcba-ffff-000000000000",
  "process_template_id": "01234567-abcd-dcba-ffff-000000000000",
  "project_id": "01234567-abcd-dcba-ffff-000000000000",
  "report_schedule_id": "01234567-abcd-dcba-ffff-000000000000",
  "revision": 1
}
{
  "success": true,
  "data": {
    "is_delete_protected": false,
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "is_deleted": false,
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "account": "https://example.com",
    "appointment": "https://example.com",
    "task": "https://example.com",
    "cloud_object": "https://example.com",
    "contact": "https://example.com",
    "email_sequence": "https://example.com",
    "email_template": "https://example.com",
    "lead": "https://example.com",
    "oppty": "https://example.com",
    "email": "https://example.com",
    "memo": "https://example.com",
    "process": "https://example.com",
    "process_template": "https://example.com",
    "project": "https://example.com",
    "report_schedule": "https://example.com",
    "account_id": "01234567-abcd-dcba-ffff-000000000000",
    "activity_id": "01234567-abcd-dcba-ffff-000000000000",
    "cloud_object_id": "01234567-abcd-dcba-ffff-000000000000",
    "contact_id": "01234567-abcd-dcba-ffff-000000000000",
    "email_sequence_id": "01234567-abcd-dcba-ffff-000000000000",
    "email_template_id": "01234567-abcd-dcba-ffff-000000000000",
    "lead_oppty_id": "01234567-abcd-dcba-ffff-000000000000",
    "message_id": "01234567-abcd-dcba-ffff-000000000000",
    "process_id": "01234567-abcd-dcba-ffff-000000000000",
    "process_template_id": "01234567-abcd-dcba-ffff-000000000000",
    "project_id": "01234567-abcd-dcba-ffff-000000000000",
    "report_schedule_id": "01234567-abcd-dcba-ffff-000000000000",
    "revision": 1
  }
}