Pipeliner CRM Hybrid API

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

Dependencies

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

Copy to Clipboard

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.
FLAG_VALIDATE_ONLY_UPDATED_FIELDS[256] – flag will validate only updated fields in entity instead of all fields.

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

Copy to Clipboard

deleteEntity Method

Syntax

Copy to Clipboard

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

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

Copy to Clipboard

getCollections Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getEntities Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getEntityPublic Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getErrorCodes Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getFields Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getServerAPIUtcDateTime Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

getTeamPipelineUrl Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

setCredentials Method

Syntax

Copy to Clipboard

Parameters

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

Copy to Clipboard

setEntities Method

Syntax

Copy to Clipboard

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

Copy to Clipboard

setEntity Method

Syntax

Copy to Clipboard

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 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

Copy to Clipboard