Pipeliner CRM .NET SDKs API Documentation

Read and use the Pipeliner CRM API to build integrations between Pipeliner CRM and other apps.

The Pipeliner API for C# supports the .NET framework 4.0 and above. It is also possible to use it in Mono. Querying in the C# library is the same as in our Rest Services.

Download

Binaries Sources Version
PipelinerAPI-1.5.0.dll PipelinerAPI-1.5.0.cs 1.5.0

Dependencies

Name Version
Json.NET 6.0 release 3

Methods

Method Description
deleteEntities Deletes entities with given primary key.
deleteEntity Deletes entity with given primary key.
getCollections Retrieves list of collections in the pipeline.
getEntities Retrieves list of entities in Hash.
getEntityPublic Retrieves hash of public entities.
getErrorCodes Retrieves the hash of API error codes.
getFields Returns list of fields for specific entity.
getServerAPIUtcDateTime Retrieves the current server's UTC datetime for queried team space.
getTeamPipelineUrl Retrieves the datacenter URL for team space.
setCredentials API Password obtained from API Access in customers portal.
setEntities Creates a new entities. If ID is provided in data, then update is performed for existing entity.
setEntity Creates a new entity in collection. If ID is provided in data, then update is performed for existing entity.

deleteEntities Method

Syntax

 public System.String[] deleteEntities(System.String teamPipeline, System.String entity, System.String[] data, System.Int32 flag=FLAG_ROLLBACK_ON_ERROR)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entity System.String M Name of object.
data System.String[] M Array with IDs to delete.
flag System.Int32 O The processing of command can be modified by combination of flags: FLAG_ROLLBACK_ON_ERROR[0] – if any error is occurred no entity will be processed, entire batch will be rollbacked and exception thrown. FLAG_IGNORE_ON_ERROR[1] – it any error occures for an entity , this entity is ignored and system continues with the next one. FLAG_GET_NO_DELETED_ID[4] - The method returns list of ID, which cannot be deleted. Could be used with combination with FLAG_IGNORE_ON_ERROR. FLAG_IGNORE_AND_RETURN_ERRORS[8] – if any error occurs for an entity, this entity is ignored and system continues with the next one.

Return value

Array of result for deleted entities.

Remarks

Deletes entities with given primary key.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String ids = new String[]{"PY-7FFFFFFF-12345678-1234-1234-1234-1234567890"};
                String result[] = service.deleteEntities(teamPipelineID, "Contact", ids);
                Console.WriteLine(result[0]);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

deleteEntity Method

Syntax

 public System.String deleteEntity(System.String teamPipeline, System.String entityName, System.String id)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entityName System.String M Name of object.
id System.String M The unique identificator of entity.

Return value

ID of deleted entity.

Remarks

Deletes entity with given primary key.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String id = "PY-7FFFFFFF-12345678-1234-1234-1234-1234567890";
                String result = service.deleteEntity(teamPipelineID, "Contacts", id);
                Console.WriteLine(result);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getCollections Method

Syntax

public System.String[] getCollections(System.String teamPipeline)

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.

Return value

String array of collections.

Remarks

Retrieves list of collections in the pipeline.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String[] retVal = service.getCollections(teamPipelineID);
                Console.WriteLine(retVal[0]);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getEntities Method

Syntax

 public dynamic getEntities(System.String teamPipeline, System.String entityName, System.String query=null)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entityName System.String M Name of object.
query System.String O Params for requested entity. Query is equal to params followed after '?'.

Return value

Dynamic object with response body.

Remarks

Retrieves list of entities in dynamic object.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String query = "limit=5&filter=FIRST_NAME::Todd"
                dynamic result = service.getEntities(teamPipelineID, "Contacts", query);
                Console.WriteLine(result[0].FIRST_NAME);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getEntityPublic Method

Syntax

 public System.Collections.Generic.Dictionary getEntityPublic(System.String teamPipeline)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.

Return value

Dictionary with server API collections as keys and entity names as values.

Remarks

Retrieves the dictionary list of public entities.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                Dictionary retVal = service.getEntityPublic(teamPipelineID);
                Console.WriteLine(retVal["Accounts"]);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getErrorCodes Method

Syntax

 public System.Collections.Generic.Dictionary getErrorCodes(System.String teamPipeline)  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.

Return value

Dictionary with server API errors as integer keys and string of API error codes as values.

Remarks

Retrieves the list of API error codes.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                Dictionary retVal = service.getErrorCodes(teamPipelineID);
                Console.WriteLine(retVal[301]);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getFields Method

Syntax

 public dynamic getFields(System.String teamPipeline, System.String entityName, System.String query=null)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entityName System.String M Name of entity class or entity collection.
query System.String O REST query string for filtering (e.g. "filter=CUSTOM::TRUE")

Return value

List of dictionaries which contains information about fields:

  • API_NAME - field name used in API as key.
  • CALC_FORMULA - calculated formula for autocalculated fields, or None if not set.
  • CHOICES - if dropdown or radio button, then dictionary is set with IDs of datasets as keys and their names as values, otherwise None is set.
  • CUSTOM - true if custom field, false if system field.
  • DEFAULT - default value for field. If not set, then None.
  • DESCRIPTION - description of field.
  • ID - unique identificator of field. Used as ID_FIELD in Data entity.
  • MAX_VALUE - max allowed value. For decimal types, it is maximal number, for unicode types it is maximal length of string.
  • MIN_VALUE - min allowed value for decimal an datetime types.
  • NAME - field name shown in Pipeliner.
  • PL_TYPE - Pipeliner field type.
  • READONLY - true if field is readonly, otherwise false.
  • REQUIRED - true if field is required, otherwise false.
  • TYPE - Type of field. Supported types - [string, unicode, datetime, long, Decimal, list]

Remarks

Returns list of fields for specific entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                dynamic retVal = service.getFields(teamPipelineID, "Contacts");
                Console.WriteLine(retVal[0].API_NAME);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getServerAPIUtcDateTime Method

Syntax

public System.DateTime getServerAPIUtcDateTime(System.String teamPipeline)

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.

Return value

Current server's UTC date as datetime.

Remarks

Retrieves the current server's UTC datetime for queried team space.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String retVal = service.getServerAPIUtcDateTime(teamPipelineID);
                Console.WriteLine(retVal);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

getTeamPipelineUrl Method

Syntax

public System.String getTeamPipelineUrl(System.String teamPipeline)

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.

Return value

Datacenter URL for current team space.

Remarks

Retrieves the datacenter URL for team space.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String retVal = service.getTeamPipelineUrl(teamPipelineID);
                Console.WriteLine(retVal);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

setCredentials Method

Syntax

public void setCredentials(System.String username, System.String password)
Parameter Type Required Description
username System.String M API Token obtained from API Access in customers portal.
password System.String M API Password obtained from API Access in customers portal.

Remarks

Sets username and password for connection.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);
        }
    }
 }

setEntities Method

Syntax

public System.String[] setEntities(System.String teamPipeline, System.String entity, System.String[] data, System.Int32 flag=FLAG_ROLLBACK_ON_ERROR)
  

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entity System.String M Name of object.
data System.String[] M String array with serialized JSON strings as batch entities.
flag System.Int32 O The processing of command can be modified by combination of flags: FLAG_ROLLBACK_ON_ERROR[0] – if any error is occurred no entity will be processed ,entire batch will be rollbacked and exception thrown. FLAG_IGNORE_ON_ERROR[1] – it any error occures for an entity , this entity is ignored and system continues with the next one. FLAG_GET_NO_DELETED_ID[4] - The method returns list of ID, which cannot be deleted. Could be used with combination with FLAG_IGNORE_ON_ERROR. FLAG_IGNORE_AND_RETURN_ERRORS[8] – if any error occurs for an entity, this entity is ignored and system continues with the next one. FLAG_VALIDATE_ONLY_UPDATED_FIELDS[256] - flag will validate only updated fields in entity instead of all fields.

Return value

Array of results for requested entities.

Remarks

Creates a new entities. If ID is provided in data, then update is performed for existing entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String entities[] = new String[]{"{\"ID\": \"PY-7FFFFFFF-12345678-1234-1234-1234-1234567890\", \"FIRST_NAME\":\"Richard\"}"};
                String result[] = service.setEntities(teamPipelineID, "Contact", entities);
                Console.WriteLine(result[0]);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }

setEntity Method

Syntax

public System.String setEntity(System.String teamPipeline, System.String entityName, System.String data)

Parameters

Parameter Type Required Description
teamPipeline System.String M Name of team space to be used.
entityName System.String M Name of object.
data System.String M Serialized JSON string with created or updated fields.

Return value

ID of created or updated entity.

Remarks

Creates a new entity in collection. If ID is provided in data, then update is performed for existing entity.

Throws

HTTPErrorException Raises on HTTP error code from server with API error message.

Example

 In C#:

 using System;
 using System.Collections.Generic;
 using PipelinerSDK;

 namespace Example
 {
    class Example
    {
        static void Main(string[] args)
        {
            String username = "API Token";
            String password = "API Password";
            String teamPipelineID = "Team Pipeline ID";
            String serviceURL = "Service URL";

            RestAPI service = new RestAPI(serviceURL);
            service.setCredentials(username, password);

            try
            {
                String entity = "{\"ID\": \"PY-7FFFFFFF-12345678-1234-1234-1234-1234567890\", \"FIRST_NAME\":\"Richard\"}"
                String result = service.setEntity(teamPipelineID, "Contacts", entity);
                Console.WriteLine(result);
            }
            catch (HTTPErrorException ex)
            {
                Console.WriteLine(ex.CODE);
                Console.WriteLine(ex.MESSAGE);
            }
        }
    }
 }