NAV
shell php python

Overview

Sample JSON response from our API
---------------------------------

{
"Header": {

"Status":"Created",
"Code": "201",
"Time": "2018-05-27 15:53:59",
"Endpoint": "addPerson",
"Message":"Contact added"

},

"Data":
{

"PersonID": "0000000000"

}

}

This technical reference is for organizations who would like to connect their account to external applications. Our RESTful API uses a JSON format for both input and output. Requests are validated with unique API tokens that can be generated within the Onpipeline application.

Our API is divided into Resources (Endpoints). Every resource is reachable with its correct name within the HTTP URL.

Any request receives a JSON response. The object is normally made of 2 arrays - Header and Data - but in case of errors you will see only the “Error” array.

The main service URL is:
api.onpipeline.com

Methods:
POST,GET

Please know that only HTTPS connections will be accepted. No data will be returned to non SSL connections. Please make sure all of your connections start with https:// in the URL.

Format specifications:

DATE FORMAT:
YYYY-MM-DD
DATETIME FORMAT:
YYYY-MM-DD HH:MM:SS
NUMBERS:
0.00

Time zone:

Note: We do not provide a developer sandbox.

Authentication

token = "your-token-here"
url = "https://api.onpipeline.com/ResourceName"

import json, requests

headers = {
'Authorization' : token
}

data = {}
jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()
curl "https://api.onpipeline.com/ResourceName"
-H "Authorization: your-token-here"
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/ResourceName";
/* Call the Resource URL */
$query = array();

$json_query = json_encode($query);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);

if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];

echo "Error: ".$errorcode." - ".$errormess;
exit;
}

//print_r($output);

API requests are validated with your personal API token that shall be passed for each request within the http “Authorization” header.

We expect a header that looks like the following:

Authorization: {Token}

Replace {Token} with your personal API token. A real token will look like:

Authorization: cVCE1ILBD_QR5UeuSM9lA60gdvnz...

A token can be issued within Onpipeline by the admin user and can be with “Read only” or Read and write” permissions. A read only Token will not have access to “write” operations (call to specific resources to add, modify, delete).

Tokens released to 3rd parties (Lead Sources) for saving leads to your Onpipeline account will only have an API access limited to the “LeadsIn” resource. All other Tokens will access the whole account.

Resources

Person

Person object - example
-----------------------

{
"PersonID": "1213453823ABC12313121",
"FirstName": "Mike",
"LastName": "Smith",
"OrgID": "9531451823ABC71183121",
"OrgName": "Mike, Inc",
"Fullname": "Mike Smith",
"NextEvent": "2015-05-19 15:30:00",
"DealsOpen": "0",
"DealsWon": "0",
"DealsLost": "0",
"EmailsSent": "0",
"EmailsReceived": "0",
"Source": "User",
"SourceName": "Robert",
"Created": "2015-02-09 12:35:41",

"Email": [
{
"Address":"mike@smith.com",
"Type":"work"
},
{
"Address":"mikes762@server.com",
"Type":"home"
}

],
"Phone": [
{
"Number":"111111111111",
"Type":"work"
},
{
"Number":"222222222222",
"Type":"mobile"
}
],
"Extra": [
{
"ID":"1111111",
"Value":"Managing Director"
}
]
}

Resources to access the person object.

Endpoint Description
PersonList List persons
PersonAdd Create a new contact person
PersonChange Modify a contact person
PersonDelete Delete a contact person

Person object:

Field Description
PersonID ID of the person
FirstName Person First Name
LastName Family Name,
Fullname Contact full name
OrgID Linked organization ID
OrgName Linked organization Name
NextEvent Next calendar event datetime
DealsOpen Open deals linked to person
DealsWon Won deals linked to person
DealsLost Lost deals linked to person
EmailsSent Emails sent to this person
EmailsReceived Email received from person
Source Created by User/API/Form
SourceName Who created the person (Name)
Created When the user was created (Datetime)
Email Emails (array)
Phone Phone numbers (array)
Extra Custom fields (array)

List Persons

curl "https://api.onpipeline.com/PersonList"
-H "Authorization: your-token-here"
-d '{"PersonID":"XXXXXXXXXXXX"}'
token = "your-token-here"
url = "https://api.onpipeline.com/PersonList"

import json, requests

headers = {
'Authorization' : token
}

data = {"PersonID":"XXXXXXXXXXXX"}
jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/PersonList";
/* Call the Resource URL */

$query = array(
"PersonID"=>"XXXXXXXXXXXX",

/*
"Extra" => array(
array("ID" => "00000000000", "Value" => "abc" ),
array("ID" => "00000000000", "Value" => "abc" )
)
*/

);

$json_query = json_encode($query);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);

if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];

echo "Error: ".$errorcode." - ".$errormess;
exit;
}


if($output){
foreach ($output['Data'] as $item){

echo $item['Fullname'].'<br>';
foreach($item['Email'] as $phone){
echo 'Email: '.$phone['Address'].' - '.$phone['Type'].'<br>';
}
foreach($item['Phone'] as $phone){
echo 'Phone: '.$phone['Number'].' - '.$phone['Type'].'<br>';
}

}
}

Endpoint: /PersonList

Available Filters Description
PersonID Person ID
Organization Organization Name
OrganizationID Organization ID
Fullname Full Name
MinCreated Created after a certain datetime
MaxCreated Created before a certain datetime
MinNextEvent Next event after a certain datetime
MaxNextEvent Next event before a certain datetime (last event)
Extra Custom fields (array) more info

Tip: You can get a single person with PersonID or list all person of an organization with OrgID.

Add Person

curl "https://api.onpipeline.com/PersonAdd"
-H "Authorization: your-token-here"
-d '{ "FirstName": "Mike", "LastName": "Smith", "OrgID": "123456789",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/PersonAdd";
/* Call the Resource URL */

$query = array(
"FirstName" => 'Mike',
"LastName" => 'Smith',
"Phone" => array(
array( "Number" => "+1111111111111", "Type"=>"work" ),
array( "Number" => "+2222222222222" , "Type"=>"home")
),
"Email" => array(
array( "Address" => "mike@company.com", "Type"=>"other" ),
),
"Extra" => array(
array( "ID" => "000000000000", "Value"=>"Any value" ),
),
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/PersonAdd"

import json, requests

headers = {
'Authorization' : token
}

data = { "FirstName": "Mike", "LastName": "Smith", "OrgID": "123456789",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Created",
"Code":"201",
"Time":"0000-00-00 00:00:00",
"Endpoint":"PersonAdd"
},

"Data":{
"PersonID":"123456789HSY7584306"
}
}

Endpoint: /PersonAdd

Field Description
FirstName * Contact first name
LastName * Contact family/last name
Phone Phone numbers (array)
Type:work/home/mobile/other
Email Email address (array)
Type:work/home/other
OrgID ID of Organization (must be valid)
Extra Custom fields (array), if any

(*) mandatory field

OrgID: It must be be a valid Organization ID. If the organization is new you should first add the Organization and then add the Person with the OrgID generated by the API.

Modify Person

curl "https://api.onpipeline.com/PersonChange"
-H "Authorization: your-token-here"
-d '{ "FirstName": "Mike", "LastName": "Smith", "PersonID": "123456789",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/PersonChange";
/* Call the Resource URL */

$query = array(
"PersonID" => '123456789',
"Phone" => array(
array( "Number" => "+1111111111111", "Type"=>"work" ),
array( "Number" => "+2222222222222" , "Type"=>"home")
),
"Email" => array(
array( "Address" => "mike@company.com", "Type"=>"other" ),
),
"Extra" => array(
array( "ID" => "000000000000", "Value"=>"Any value" ),
),
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/PersonChange"

import json, requests

headers = {
'Authorization' : token
}

data = { "PersonID": "123456789",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"PersonChange",
"PersonID":"123456789HSY7584306"
}
}

Endpoint: /PersonChange

Filter Description
PersonID Person ID (mandatory)
Field Description
FirstName Contact first name
LastName Contact family/last name
Phone Phone numbers (array)
Type:work/home/mobile/other
Email Email address (array)
Type:work/home/other
OrgID ID of Organization (must be valid)
Extra Custom fields (array), if any

Please use only the fields you are really updating. If you try to resend the same values (no change made in the content) the API call will be rejeted with error code 406.

Delete Person

curl "https://api.onpipeline.com/PersonDelete"
-H "Authorization: your-token-here"
-d '{ "PersonID": "123456789" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/PersonDelete";
/* Call the Resource URL */

$query = array(
"PersonID" => '123456789HSY7584306'
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/PersonDelete"

import json, requests

headers = {
'Authorization' : token
}

data = { "PersonID": "123456789HSY7584306" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"PersonDelete",
"PersonID":"123456789HSY7584306"
}
}

Endpoint: /PersonDelete

Filter Description
PersonID Person ID to be deleted

Be careful as this operation is permanent and cannot be undone.

Organization

Organization object - example
-----------------------------

{
"OrgID": "1213453823ABC12313121",
"OrgName": "Onpipeline",
"Address1": "Av Diagonal 458",
"Address2": "",
"Postcode": "08006",
"City": "Barcelona",
"Region": "Barcelona",
"Country": "Spain",
"FullAddress": "Av Diagonal 458, 08006 Barcelona",
"DealsOpen": "0",
"DealsWon": "0",
"DealsLost": "0",
"Source": "API",
"SourceName": "",
"Created": "2015-02-09 12:35:41",

"Extra": [
{
"ID":"1111111",
"Value":"Area1"
}
]
}

Resources to access the organization object.

Endpoint Description
OrgList List organizations
OrgAdd Create a new organization
OrgChange Modify organization
OrgDelete Delete organization

Organization object:

Field Description
OrgID ID of the Organization
OrgName Name of the Organization
Address1 Main address line
Address2 Additional address line (i.e. apt.)
Postcode Postal/ZIP code
City Town or city
Region Region or State
Country Country
FullAddress Complete address field
DealsOpen Open deals linked to Organization
DealsWon Won deals linked to Organization
DealsLost Lost deals linked to Organization
Source Created by User/API/Form
SourceName Who created the person (Name)
Created When the user was created (Datetime)
Extra Custom fields (array)

List Organizations

curl "https://api.onpipeline.com/OrgList"
-H "Authorization: your-token-here"
-d '{"OrgID":"XXXXXXXXXXXX"}'
token = "your-token-here"
url = "https://api.onpipeline.com/OrgList"

import json, requests

headers = {
'Authorization' : token
}

data = {"OrgID":"XXXXXXXXXXXX"}
jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/OrgList";
/* Call the Resource URL */

$query = array(
/*
"Extra" => array(
array("ID" => "00000000000", "Value" => "abc" ),
array("ID" => "00000000000", "Value" => "abc" )
)
*/

);

$json_query = json_encode($query);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);

if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];

echo "Error: ".$errorcode." - ".$errormess;
exit;
}


if($output){
foreach ($output['Data'] as $item){

echo $item['Fullname'].'<br>';
foreach($item['Email'] as $phone){
echo 'Email: '.$phone['Address'].' - '.$phone['Type'].'<br>';
}
foreach($item['Phone'] as $phone){
echo 'Phone: '.$phone['Number'].' - '.$phone['Type'].'<br>';
}

}
}

Endpoint: /OrgList

Available Filters Description
OrgID Organization ID
OrgName Organization Name
Postcode Postal/ZIP code
City City
Region Region or State
Country Country
FullAddress Complete address
MinCreated Created after a certain datetime
MaxCreated Created before a certain datetime
Extra Custom fields (array) more info

Tip: You can get a single organization with OrgID

Add Organization

curl "https://api.onpipeline.com/OrgAdd"
-H "Authorization: your-token-here"
-d '{ "OrgName": "Company_name_here" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/OrgAdd";
/* Call the Resource URL */

$query = array(
"OrgName" => "Company_name_here",
"Address1" => "Main_company_address",
"City" => "Town_or_city",
"Postcode" => "ABC00000",
"Region" => "State_or region",
"Country" => "Any_contry"
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/OrgAdd"

import json, requests

headers = {
'Authorization' : token
}

data = { "OrgName": "Company_name_here" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Created",
"Code":"201",
"Time":"0000-00-00 00:00:00",
"Endpoint":"OrgAdd"
},

"Data":{
"OrgID":"123456789HSY7584306"
}
}

Endpoint: /OrgAdd

Field Description
OrgName * Name of the Organization
Address1 Main address line
Address2 Additional address line (i.e. apt.)
Postcode Postal/ZIP code
City Town or city
Region Region or State
Country Country
Extra Custom fields (array)

(*) mandatory field

If you want the API to check for duplicates, please fill Postcode with a value. The check is made on OrgName and Postcode.

Modify Organization

curl "https://api.onpipeline.com/OrgChange"
-H "Authorization: your-token-here"
-d '{ "OrgID": "123456789HSY7584306" ,"Address1": "change_address_here" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/OrgChange";
/* Call the Resource URL */

$query = array(
"OrgID" => "123456789HSY7584306",
"Address1" => "change_address_here",
"Extra" => array(
array( "ID" => "000000000000", "Value"=>"Any value" ),
),
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/OrgChange"

import json, requests

headers = {
'Authorization' : token
}

data = { "OrgID": "123456789HSY7584306" ,"Address1": "change_address_here" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"OrgChange",
"OrgID":"123456789HSY7584306"
}
}

Endpoint: /OrgChange

Filter Description
OrgID Organization ID (mandatory)
Field Description
OrgName Name of the Organization
Address1 Main address line
Address2 Additional address line (i.e. apt.)
Postcode Postal/ZIP code
City Town or city
Region Region or State
Country Country
FullAddress Complete address field
Extra Custom fields (array)

Please use only the fields you are really updating. If you try to resend the same values (no change made in the content) the API call will be rejeted with error code 406.

Delete Organization

curl "https://api.onpipeline.com/OrgDelete"
-H "Authorization: your-token-here"
-d '{ "OrgID": "123456789" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/OrgDelete";
/* Call the Resource URL */

$query = array(
"OrgID" => '123456789HSY7584306'
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/OrgDelete"

import json, requests

headers = {
'Authorization' : token
}

data = { "OrgID": "123456789HSY7584306" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"OrgDelete",
"OrgID":"123456789HSY7584306"
}
}

Endpoint: /OrgDelete

Filter Description
OrgID Organization ID to be deleted

Be careful as this operation is permanent and cannot be undone.

Deals

Deal object - example
-----------------------

{
"DealID": "1213453823ABC12313121",
"DealName": "Company - New Deal",
"Status": "open",
"Value": "1000.00",
"Probability": "50",
"Pipeline": "Sales Pipeline",
"Stage": "Negotiation started",
"OwnerID": "123456789",
"Owner": "Paul",
"LinkedPersonID": "00000000000000",
"LinkedPerson": "Mike Smith",
"LinkedOrgID": "000000000000000",
"LinkedOrg": "Company Inc.",
"Involved":
[
"00000000000000",
"11111111111111"
],
"Created": "2015-05-19 15:30:00",
"CreatedbyID": "0000000000",
"CreatedBy": "Jon Doe",
"ExpClosing": "2015-05-28",
"Closed": "0000-00-00",
"NextEvent": "2015-05-20 11:00:00",
"LastUpdate":"2015-05-19 15:30:00",
"Products": [
"Equipment",
"Food"
],
"LostReason": "",
"Description": "free text",
"EmailsSent": "0",
"EmailsReceived": "0",
"Extra": [
{
"ID":"1111111",
"Value":"Any_Value"
}
]
}

Resources to access the deal object.

Endpoint Description
DealsList List Deals
DealAdd Create a new Deal
DealChange Modify Deal
DealDelete Delete Deal
DealUndelete Undelete a deal

Person object:

Field Description
DealID ID of the deal
DealName Name of the deal
Status Deal status (open/won/lost/deleted)
Value Deal value - decimal 0.00
Probability Integer value (0-100)
Pipeline Linked organization Name
Stage Next calendar event datetime
OwnerID Onwer ID
Owner Onwer Name
LinkedPersonID Linked person ID
LinkedPerson Linked person name
LinkedOrgID Linked organization ID
LinkedOrg Linked organization name
Involved Persons involved (IDs)
Created When the deal was created (Datetime)
CreatedbyID Who created the deal (Id)
CreatedBy Who created the deal (Name)
ExpClosing Expected closing (Date)
Closed When the deal was closed (Date)
NextEvent Next event linked to deal (Datetime)
LastUpdate When the deal was last updated (Datetime)
Products List products linked to deal
Description Deal description
EmailsSent Emails sent to this person
EmailsReceived Email received from person
Extra Custom fields (array)

List Deals

Endpoint: /DealsList

Available Filters Description
DealID Deal ID
Status open/won/lost/deleted
OwnerID Owner (User) ID
LinkedPersonID Linked person ID
LinkedOrgID Linked organization ID
Pipeline Pipeline name
Stage Stage name
MinClosed Closed from a certain date
MaxClosed Closed up to a certain date
MinCreated Created after a certain datetime
MaxCreated Created before a certain datetime
MinNextEvent Next event after a certain datetime
MaxNextEvent Next event before a certain datetime (last event)
Products Single product name search
LostReason Lost reason
Extra Custom fields (array) more info

Tip: You can get a single deal with DealID

Add Deal

curl "https://api.onpipeline.com/DealAdd"
-H "Authorization: your-token-here"
-d '{ "DealName" : "New deal", "PipelineID" : "1",
"StageID" : "1", "OwnerID" : "1", "LinkedPersonID" : "1" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/DealAdd";
/* Call the Resource URL */


$query = array(
"DealName" => "New deal",
"PipelineID" => "1",
"StageID" => "1",
"OwnerID" => "1",
"LinkedPersonID" => "1",
"ExpClosing" => "0000-00-00",
"Value" => "100.000",
"Probability" => "20",
"Products" => array("w","wa"),
"Involved" => array("000000000000","000000000000"),
"Extra" => array(
array("ID"=>"0000000000000","Value"=>"abc"),
)
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/DealAdd"

import json, requests

headers = {
'Authorization' : token
}

data = { "DealName" : "New deal", "PipelineID" : "1",
"StageID" : "1", "OwnerID" : "1", "LinkedPersonID" : "1" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Created",
"Code":"201",
"Time":"0000-00-00 00:00:00",
"Endpoint":"DealAdd"
},

"Data":{
"DealID":"HSY758430698"
}
}

Endpoint: /DealAdd

Field Description
DealName * Name of the new deal
Value Number with 2 decimals, separated by dot (0.00)
Probability Integer number 0-100
PipelineID * Valid Pipeline ID
StageID * Valid stage ID for this Pipeline
OwnerID * User ID owner of the deal
LinkedPersonID * Person linked to deal (ID)
LinkedOrgID Organization linked to deal (ID)
Involved Persons (IDs) involved (array)
ExpClosing Expected closing date (YYYY-MM-DD)
Products Product names to be linked (array)
Extra Custom fields (array) more info

(*) mandatory field

Modify Deal

curl "https://api.onpipeline.com/DealChange"
-H "Authorization: your-token-here"
-d '{ "DealID" : "HSY758430698", "Value": "100.00" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/DealChange";
/* Call the Resource URL */


$query = array(
"DealID" => "HSY758430698",
"Value" => "100.00",
"Probability" => "50",
"Extra" => array(
array("ID"=>"447383216","Value"=>"Cold"),
)
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/DealChange"

import json, requests

headers = {
'Authorization' : token
}

data = { "DealID" : "HSY758430698", "Value": "100.00" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":
{

"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"DealAdd",
"DealID" : "HSY758430698"

}
}

Endpoint: /DealChange

Filter Description
DealID ID of the Deal
Field Description
DealName Name of the Deal
Status open/won/lost
Value Number with 2 decimals, separated by dot (0.00)
Probability Integer number 0-100
StageID Valid stage ID for this Pipeline
OwnerID * User ID owner of the deal
LinkedPersonID * Person linked to deal (ID)
LinkedOrgID Organization linked to deal (ID)
Involved Persons (IDs) involved (array)
ExpClosing Expected closing date (YYYY-MM-DD)
Products Product names to be linked (array)
Extra Custom fields (array) more info

Please use only the fields you are really updating. If you try to resend the same values (no change made in the content) the API call will be rejeted with error code 406.

Delete Deal

curl "https://api.onpipeline.com/DealDelete"
-H "Authorization: your-token-here"
-d '{ "DealID": "123456789" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/DealDelete";
/* Call the Resource URL */

$query = array(
"DealID" => '123456789HSY7584306'
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/DealDelete"

import json, requests

headers = {
'Authorization' : token
}

data = { "DealID": "123456789HSY7584306" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"DealDelete",
"DealID":"123456789HSY7584306"
}
}

Endpoint: /DealDelete

Filter Description
DealID Deal ID to be deleted

Undelete Deal

curl "https://api.onpipeline.com/DealUndelete"
-H "Authorization: your-token-here"
-d '{ "DealID": "123456789" }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/DealUndelete";
/* Call the Resource URL */

$query = array(
"DealID" => '123456789HSY7584306'
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/DealUndelete"

import json, requests

headers = {
'Authorization' : token
}

data = { "DealID": "123456789HSY7584306" }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Accepted",
"Code":"202",
"Time":"0000-00-00 00:00:00",
"Endpoint":"DealUndelete",
"DealID":"123456789HSY7584306"
}
}

Endpoint: /DealUndelete

Filter Description
DealID Deal ID to be restored

This resource will restore a deal and set the status to “open”.

Users

Users - Sample JSON output:

{
"ID": "1234567",
"Name": "Mike",
"Email": "user@email",
"Status": "1",
"AdminFlag": "0",
"Permissions":[
"Pipeline": "0",
"CustomFields": "0",
"Delete": "0",
"WriteTeamEmails": "0",
"BulkImport": "0",
"BulkExport": "0",
"Leads": "0",
"WebForms": "0",
]
}

Endpoint: /UsersList

Field Description
ID User ID
Name User Name
Email User Email
Status 1 = Active
AdminFlag 1 = Administrator
Permissions: (array)
Pipeline 1 = Can edit pipelines
CustomFields 1 = Can edit custom fields
Delete 1 = Authorized to delete
WriteTeamEmails 1 = Can send email from its team SMTP
BulkImport 1 = Can import from files
BulkExport 1 = Can export data from files
Leads 1 = Can manage leads and sources
WebForms 1 = Can manage web forms

Teams

Team - Sample JSON output:

{
"Name": "Team Name",
"ID": "1234567",
"Members":[
{
"UserID":"000000000",
"Leader":"1",
},
{
"UserID":"000000000",
"Leader":"0",
}
]

}

Endpoint: /TeamsList

Field Description
ID Team ID
Name Team Name
Members: (array)
UserID User ID of the member
Leader 1 = team leader

Pipelines

Pipeline - Sample JSON output:

{
"PipelineName": "Pipeline Name",
"PipelineID": "1",
"Team": "",
"Stages":[
{
"ID": "1",
"Name": "Stage1"
},
{
"ID": "2",
"Name": "Stage2"
},
{
"ID": "3",
"Name": "Stage3"
}
]

}

Endpoint: /PipelineList

Field Description
PipelineName Name of the pipeline
PipelineID ID of the pipeline
Team If reserved to a team it will show the team ID
Stages: (array)
ID ID of stage
Name Stage name

Products

Endpoint: /ProductList

Sample JSON output

[
“Product1”,
“Product2”,
“Product3”
]

Leads IN

curl "https://api.onpipeline.com/Leadsin"
-H "Authorization: your-token-here"
-d '{ "FirstName": "Mike", "LastName": "Smith", "OrgName": "Company Inc.",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/Leadsin";
/* Call the Resource URL */

$query = array(
"FirstName" => 'Mike',
"LastName" => 'Smith',
"Phone" => array(
array( "Number" => "+1111111111111", "Type"=>"work" ),
array( "Number" => "+2222222222222" , "Type"=>"home")
),
"Email" => array(
array( "Address" => "mike@company.com", "Type"=>"other" ),
),
"Postcode" => '12345',
"Extra" => array(
array( "ID" => "000000000000", "Value"=>"Any value" ),
),
);

$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}
token = "your-token-here"
url = "https://api.onpipeline.com/Leadsin"

import json, requests

headers = {
'Authorization' : token
}

data = { "FirstName": "Mike", "LastName": "Smith", "OrgName": "Company Inc.",
"Email":[ { "Address":"mike@company.com", "Type":"work" } ],
"Phone":[ { "Number":"111111111111", "Type":"work" } ],
"Extra":[ { "ID":"1111111", "Value":"Managing Director" } ] }

jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

JSON response for accepted calls

{
"Header":{
"Status":"Created",
"Code":"201",
"Time":"0000-00-00 00:00:00",
"Endpoint":"Leadsin"
},

"Data":{
"LeadID":"123456789HSY7584306"
}
}

You or your partners may store new leads into the application. Access to this resource is grant to “Lead Sources” or API Tokens as follows. Please be advised that before you connect to our API the client IP address(es) shall be always whitelisted.

Endpoint: /Leadsin

Field Description
FirstName * Contact first name
LastName * Contact family/last name
Phone Phone numbers (array)
Type:work/home/mobile/other
Email Email address (array)
Type:work/home/other
OrgName Name of organization
AddressLine1 Address line
AddressLine2 Additional address (Apt., floor, etc.)
Postcode Postal / ZIP code
City City or town
Region Region or State
Country Country
Extra Custom fields (array), if any

(*) mandatory field

Extra: You don’t have to use custom fields if the information you are uploading is covered by standard fields, and/or the company admin does not instruct you to use them by providing proper IDs.

Call Tracking and Recording

curl "https://api.onpipeline.com/CallRecord"
-H "Authorization: your-token-here"
-d '{
"Type":"inbound",
"FromNumber":"+00 0000 0000 0000",
"ToNumber":"+00 0000 0000 0000",
"Start":"0000-00-00 00:00:00",
"End":"0000-00-00 00:00:00",
"mp3file": "BASE64FILECONTENTS"
}'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/CallRecord";
/* Call the Resource URL */

$audio_name='example.mp3'; /*file name*/
$audio_path=''; /*file path*/

$audiofile = file_get_contents($audio_path.$audio_name, true);
$audiofile = base64_encode($audiofile);

$query = array(
"Type"=>"inbound",
"FromNumber"=>"+00 0000 0000 0000",
"ToNumber"=>"+00 0000 0000 0000",
"Start"=>"0000-00-00 00:00:00",
"End"=>"0000-00-00 00:00:00",
"mp3file" => $audiofile
);

$json_query = json_encode($query);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ". $token));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];
echo "Error: ".$errorcode." - ".$errormess;
exit;
}

//print_r($output);

JSON response for accepted calls

{
"Header":{
"Status":"Created",
"Code":"201",
"Time":"0000-00-00 00:00:00",
"Endpoint":"CallRecord"},

"Data":
{
"CallID":"a867e5709368b0139076f3ed9879f7f3",
"LinkedTo":
[
{
"Person":"XXXXXXXXXXXX",
"Org":"YYYYYYYYYYY",
"Deal":"ZZZZZZZZZZZZ"
}
]
}
}

JSON Error Example

{
"Error":
{

"Code": "406",
"Message": "Not acceptable - The file must be mp3",
"Time": "0000-00-00 00:00:00",
"IP": "127.0.0.1"

}

}

This Resource allows your sales team to leverage all benefits of Onpipeline. It is available only to specific -write only- Tokens (Call Recorders), or Read and Write Tokens. If you provide the Token to a 3rd party call center we strongly advise that your generate a “Call Recorder” token (a Read and Write Token allows full access to your company data).

Endpoint: /CallRecord

Field Description
Type Accepted values are “inbound” or “outbound”
FromNumber Caller Phone Number
ToNumber Call Receiver Phone Number
Start Start date and time
End End date and time
mp3file File content (optional)

The “phone number” (FromNumber/ToNumber) will be used to attach the record to the proper contact > organization > deal. Numbers will be matched against digits (+44 (001) 1234-5678-910 will match with 4400112345678910 and vice versa). In case of unrecognized phone numbers our API returns an error message (406).

Call Recording
If you want to send the mp3 file of the phone call you will send the file contents - converted to base64 - within the API request (“mp3file” field). The connection will remain open until the file is completely uploaded (Max file size is 70 MBytes).

Custom Fields

curl "https://api.onpipeline.com/ListCustomFields"
-H "Authorization: Token"
-d '{"Table":"Persons"}'
$token = "your-token-here"; 
/* use your personal API token */
$url = "https://api.onpipeline.com/ListCustomFields";
/* Call the Resource URL */
$table = "Persons";
/* table name (Persons/Organizations/Deals) */

$query = array("Table" => $table);
$json_query = json_encode($query);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: ". $token
));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);

if($http_code > 200 || isset($output['Error'])) {
$errorcode=$output['Error']['Code'];
$errormess=$output['Error']['Message'];

echo "Error: ".$errorcode." - ".$errormess;
exit;
}

/* print_r($output); */

if($output){

foreach ($output['Data'] as $item){
echo $item['ID'].': '.$item['Name'].'<br>';
}

}
token = "your-token-here"
url = "https://api.onpipeline.com/ListCustomFields"

import json, requests

headers = {
'Authorization' : token
}

data = {"Table":"Persons"}
jsondata = json.dumps(data);

try:
response = requests.post(url,data=jsondata,headers=headers)
except:
print 'Error'
exit()

output = response.json()

for x in output['Data']:
print 'ID: ' + x['ID'] + ': ' + x['Name']

JSON Response Example

{
"Header":
{

"Status":"Accepted",
"Code": "200",
"Time": "2018-05-27 15:53:59",
"Endpoint": "ListCustomFields",
"Table":"Persons"

},

"Data": [

{
"Name":"Frequent Buyer",
"ID":"123456789"
},
{
"Name":"Role",
"ID":"123456789"
}
]
}

Custom fields (if any) could exist in

and can be retrieved or modified through the “Extra” array.

Please know the key of a custom field is its ID.
JSON post structure shall be the following:

“Extra”: [
{
“ID”:”1111111”,
“Value”:”any_value”
}
]

IDs and Names are accessible by admins or any user with permissions to edit custom fields (can be obained within Onpipeline). If you need to interact with custom fields through our API and don’t know the ID or the Name we suggest the following methods:

HTTP Responses / Errors

Sample JSON response with an error message
------------------------------------------

{
    "Error": 
        {

            "Code": "401",
            "Message": "Invalid Token",
            "Time": "2018-05-27 15:53:59",
            "IP": "127.0.0.1"

        }

}

Sample JSON response for a valid request
----------------------------------------

{
    "Header": 
        {

            "Status":"Created",
            "Code": "201",
            "Time": "2018-05-27 15:53:59",
            "Endpoint": "PersonAdd",
        },

    "Data": 
        {

            "PersonID":"00000000000000",

        }       

}

When API requests are successful, the API returns a 200-201-202 status code. If an error occurs, the API returns a higher code. Response codes are sent with the http header but are also part of the JSON response.

In case of errors you will find the “Code” in the “Error” array.
For other responses the “Code” is passed to the client with the “Header” array.

The body of the response contains a description of what caused the error.

Onpipeline uses the following HTTP response codes:

Code Meaning
200 OK (Query accepted)
201 Created (Item successfully created)
202 Accepted (Item modified or deleted)
400 Bad Request (Invalid Header, Missing Token etc.)
401 Unauthorized (Your API Token is wrong or inactive)
403 Forbidden (Invalid IP, No permissions to access)
404 Not Found (Resorce name not found)
406 Not Acceptable (Invalid JSON)
409 Conflict (Duplicate)
500 Internal Server Error (Try again later)