Teamgate

Suggest Edits

Getting Started with Teamgate API

 

This documentation will help you to get started with RESTful Teamgate API. Out API receives and parses CORS (Cross-Origin Resource Sharing) requests and returns results in JSON format. Every request must have application key (APP_KEY) and users AUTH_TOKEN.

Suggest Edits

Application Key

 

Application key is a unique sequence of symbols, assigned to your app by request. You should set APP_KEY in every API request. By this key we determine whether your application has rights to send requests to our API. APP_KEY should be added to every request's header as „X-App-Key” parameter.

Settings -> Additional Features -> External Apps -> New API Key Request

Settings -> Additional Features -> External Apps -> New API Key Request

Suggest Edits

Authorization Token

 

Unique authorization token is being generated to every user in Teamgate. You can find it in your profile or by using API method „authorization” (see http://developers.teamgate.com/). This token is used to determine user in our system and should be set in every request's header as „X-Auth-Token” parameter.

My Profile -> Integrations -> AUTH_TOKEN

My Profile -> Integrations -> AUTH_TOKEN

Suggest Edits

Users Permissions

 

Every request should have APP_KEY as header parameter „X-App-Key” and user's AUTH_TOKEN as header parameter „X-Auth-Token”. By these parameters Teamgate API checks permissions whether user can call specified API method. Users permissions are set using roles tree in your account settings (Settings → Users Management → User Roles).

Suggest Edits

Making API Request

 

Teamgate API uses simple URL rules. Every request should have APP_KEY and AUTH_TOKEN. API URL for all requests is https://api.teamgate.com/. Simply add to url controller, action and parameters required by action (e.g. controller: sales, action getSalesUdfList – https://api.teamgate.com/sales/getSalesUdfList). All requests should be sent by POST, GET, PUT or DELETE methods. Also, don't forget to add APP_KEY and AUTH_TOKEN as header parameters. APP_KEY is passed with header parameter „X-App-Key“, AUTH_TOKEN is passed with header parameter „X-Auth-Token“. Result is returned in JSON format, for example {"success":true,"data":{the_data}}. Success would have true or false values.

Suggest Edits

API Request Limits

 

Request limiting of the API is primarily considered on a per-account — or more accurately described, per Application Key in your account. By default rate limit is 1000 requests by Application Key per 1 day (24 hours). If you want to increase the limit of API requests, please write to us at support@teamgate.com.

HTTP Headers and Response Codes

If you hit the rate limit on a given endpoint, this is the body of the HTTP 193 message that you will see:

{
    "success": false,
    "error": "API key request limit reached: 1000",
    "code": 193
}

Teamgate API uses HTTP and some custom response codes to indicate the success or failure of an API request.

The codes consist of 3 numbers. The first number generally denotes the type of error.

19x codes means that something went wrong with authentication, 2xx codes generally indicate success, 4xx codes indicate a problem with the request that was sent, incorrect query parameter/syntax etc, 5xx codes means that something went wrong on the blog's server, and 7xx codes indicate internal application errors.

Error responses

Errors are returned in JSON, with a top-level error keys code and message.

Each error currently has a message and an error Type.

This error response format is likely to get an overhaul in the near future.

Examples:

{
    "success": false,
    "error": "API key request limit reached: 1000",
    "code": 193
}
{
  "success": false,
  "error": "Url invalid",
  "code": 750
}

HTTP success/error codes used:

Code Message
190 APP_KEY_NOT_FOUND
191 APP_KEY_INVALID
192 APP_NOT_ACTIVE
193 API key request limit reached: xxxx
194 URL_INVALID
196 ACCOUNT_EXPIRED
197 USER_TOKEN_INVALID
198 USERNAME_OR_PASSWORD_INVALID
199 GATEWAY_ERROR
200 OK. Response for successful HTTP requests.
201 Created. The request has been fulfilled, resulting in the creation of a new resource.
400 Bad Request. The server cannot or will not process the request due to an apparent client error.
403 Forbidden. The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource.
404 Not Found. The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
405 Method Not Allowed. A request method is not supported for the requested resource.
500 Internal Server Error. A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
700 REQUEST_TYPE
701 APP_KEY
702 API_KEY
703 USERNAME_OR_PASSWORD
704 USER_NOT_ACTIVE
705 APP_NOT_ACTIVE
706 QUERY_LIMIT
707 ACCESS_TOKEN
708 DB
709 NO_APP_DATA
710 NO_API_USERS_DATA
711 WRONG_DATA
712 NO_PERMISSIONS
713 NOT_SECURE_CONNECTION
714 WRONG_IP
715 NO_APP_KEY
716 DB_NAME_INVALID
717 USER_NOT_FOUND
720 DATA_LIMIT
750 ACTION_ERROR
760 DB_QUERY_ERROR

Properties

Supported users properties:

Attribute Description
id
Integer
readonly
Unique key of the User.
name
String
Name of the User.
surname
String
Surname of the User.
username
String
readonly
Username of the User.
email
String
readonly
Email of the User.
position
String
Position of the User.
picture
Object
The user pictures. For the user picture is using Picture object. Read more information about Picture object here.
language
Object
The user language. Read more information about users Language object here.
locale
String
User locale code.
timeZone
String
User's time zone.
role
String
The role of the user in Teamgate system.
created
Object
readonly
Date and time User was created. Information is read only, because automatically generated by the server.
isActive
Boolean
Indicator the user is active or not.
lastLogin
Array
readonly
Date and time of the last user login. Information is read only, because automatically generated by the server.
Suggest Edits

Get a User

Returns the data of specific user.

 
gethttps://api.teamgate.com/v4/users/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$userId = 2;
$result = $teamgate->users->get($userId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data":{
        "id": 2,
        "name": "Michael",
        "surname": "Jonson",
        "username": "michael.jonson@example.net",
      	"picture":{
        	"small": "https://ws-us1.teamgate.com/images/example/users_photos/2/small.jpg",
          "medium": "https://ws-us1.teamgate.com/images/example/users_photos/2/middle.jpg",
          "large": "https://ws-us1.teamgate.com/images/example/users_photos/2/big.jpg"
        },
        "email": "michael.jonson@example.net",
        "position": "Administrator",
        "language": {
          "code": "en",
          "name":	"english"
        },
        "locale": "en_gb",
        "timeZone": "Europe/Helsinki",
        "created": {
          "time": "2015-10-28T09:00:00+03:00"
        },
        "role": "Admin",
        "isActive": "yes",
        "lastLogin": {
          "time": "2016-10-10T08:23:45+03:00"
        }
    }
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the User.

Example: ?id=2

Suggest Edits

Get a list of Users

Returns a paginated list of either deleted users or all users in the account.

 
gethttps://api.teamgate.com/v4/users
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->users->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
	"success": true,
	"data":[
    {
      "id": 2,
      "name": "Michael",
      "surname": "Jonson",
      "username": "michael.jonson@example.net",
      "picture":{
      	"small": "https://ws-us1.teamgate.com/images/example/users_photos/2/small.jpg",
       	"medium": "https://ws-us1.teamgate.com/images/example/users_photos/2/middle.jpg",
       	"large": "https://ws-us1.teamgate.com/images/example/users_photos/2/big.jpg"
        },
      "email": "michael.jonson@example.net",
      "position": "Administrator",
      "language": {
        "code": "en",
        "name":	"english"
      },
      "locale": "en_gb",
      "timeZone": "Europe/Helsinki",
      "created": {
        "time": "2015-10-28T09:00:00+03:00"
      },
      "role": "Admin",
      "isActive": "yes",
      "lastLogin": {
      	"time": "2016-10-10T08:23:45+03:00"
      }
		},
			{
          "id": 3,
          "name": "John",
          "surname": "Brown",
          "username": "john.brown@example.net",
          "picture":{
            "small": "https://ws-us1.teamgate.com/images/example/users_photos/3/small.jpg",
            "medium": "https://ws-us1.teamgate.com/images/example/users_photos/3/middle.jpg",
            "large": "https://ws-us1.teamgate.com/images/example/users_photos/3/big.jpg"
            },
          "email": "john.brown@example.net",
          "position": "CEO",
          "language": {
            "code": "en",
            "name":	"english"
          },
          "locale": "en_gb",
          "timeZone": "Europe/Helsinki",
          "created": {
            "time": "2015-10-28T11:30:00+03:00"
          },
          "role": "Admin",
          "isActive": "yes",
          "lastLogin": {
            "time": "2016-10-10T08:45:59+03:00"
          }
      ]
}
 

Parameters

Attribute Description
name
String
Name of the User. You can search by full name or by fragment of name.
Example for strict search: ?name=Jonathan
And search by text fragment: ?name[like]=Jon
surname
String
Surame of the User. You can search by full surname or by fragment of surame.
Example for strict search: ?name=Brown
And search by text fragment: ?name[like]=Bro
email
String
Email of the user.
Example: ?email=jonathan@example.com
username
String
Username of the user.
Example: ?username=jonathan@example.com
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
isActive
Boolean
Indicator the lead is active or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isActive=yes
position
String
Posotion of the user.
Example: ?position=CEO
lastLoginTime
String
User last login time.
Example: ?lastLoginTime=2016-11-22T11:53:53+02:00

How to get the active users list?

<?php

$usersData = array(
    'isActive' => 'yes'
);
$result = $teamgate->users->get($usersData);

Properties

Supported properties from Leads, People, Companies and Deals properties list.

Properties

Supported leads properties:

Attribute Description
id
Integer
readonly
Unique key of the Lead.
name
String
Name of the Lead. Maximum length is 255 characters.
company
Object
The leads primary company. For the lead company is using Company object. Read more information about leads Company object here.
picture
String
The leads picture. For the lead picture is using Picture object. Read more information about leads Picture object here.
status
Object
The lead status. Read more information about leads Status object here.
owner
Object
For the owner is using User object. Read more information about User object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
industry
Object
The lead industry. Industry are assigned from a common industry list. Read more information about Industry object here.
created
Object
readonly
User, date and time Lead record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Lead record was updated. information is read only, because automatically generated by the server. Read more information about Updated object here.
isDeleted
Boolean
Indicator the lead is deleted or not.
emails
Array
An array of email objects for the lead. Read more information about Email object here.
phones
Array
An array of phone objects for the leaed. Read more information about Phone object here.
urls
Array
An array of url objects for the lead. Read more information about Url object here.
addresses
Array
An array of address objects for the lead. Read more information about Address object here.
Suggest Edits

Get a Lead

Returns the data of specific lead.

 
gethttps://api.teamgate.com/v4/leads/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;
$result = $teamgate->leads->get($leadId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data":{
      "id": 1,
      "name": "Michael Jonson",
      "picture": {
        "small": "https://ws-us1.teamgate.com/images/example/leads_images/1/small.jpg",
        "medium": "https://ws-us1.teamgate.com/images/example/leads_images/1/middle.jpg",
        "large":"https://ws-us1.teamgate.com/images/example/leads_images/1/large.jpg"
      },
      "owner": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      },
      "status": {
      	"id": 580,
        "name": "New",
        "time": "2016-10-11T15:11:48+03:00"
      },
      "starred": "yes",
      "source": {
        "id": 33,
        "name": "www.google.com"
      },
      "industry": {
        "id": 43,
        "name": "Banking"
      },
      "created": {
        "time": "2016-10-15T09:18:05+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "updated": {
        "time": "2016-10-15T09:23:45+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "isDeleted": "no",
      "company": {
        "id": 2,
        "name": "Example Comapny Ltd",
        "jobTitle": "CEO",
      },
      "emails": [
        {
          "id": 123,
          "value": "info@example.com",
          "type": "support"
        },
        {
          "id": 124,
          "value": "michael@example.com",
          "type": "work"
        }
      ],
      "phones": [
        {
          "id": 234,
          "value": "+44 1234 5678",
          "type": "mobile"
        },
        {
          "id": 235,
          "value": "+44 1234 5600",
          "type": "work"
        }
      ],
      "urls": [
        {
          "id": 345,
          "value": "http://mywebaxample.com",
          "type": "website"
        },
        {
          "id": 346,
          "value": "https://facebook.com/MyComapnyExample",
          "type": "facebook"
        }
      ],
      "addresses": [
        {
          "id": 345,
          "value": {
            "street": "11 Cundy Rd.",
            "city": "London",
            "zip": "E16 3DJ",
            "state": "Newham",
            "latitude": "51.5109393",
            "longitude": "0.030166",
            "country":{
              "iso": "GBR",
              "name": "United Kingdom"
            }
          },
          "type": "work"
        },
        {
          "id": 346,
          "value": {
            "street": "J. Jasinskio st. 16A",
            "city": "Vilnius",
            "zip": "03163",
            "state": "Vilnius region",
            "latitude": "54.6871235",
            "longitude": "25.2581209",
            "country":{
              "iso": "LTU",
              "name": "Lithuania"
            }
          },
          "type": "shipping"
        }
    	]
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Lead.

Example: ?id=1

Suggest Edits

Get a list of Leads

Returns a paginated list of either deleted leads or all leads in the account.

 
gethttps://api.teamgate.com/v4/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->leads->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
	"success": true,
	"count": 2,
	"data": [
	{
		"id": 1,
		"name": "Michael Jonson",
    "picture": {
      "small": "https://ws-us1.teamgate.com/images/example/leads_images/1/small.jpg",
      "medium": "https://ws-us1.teamgate.com/images/example/leads_images/1/middle.jpg",
      "large":"https://ws-us1.teamgate.com/images/example/leads_images/1/large.jpg"
    },
		"owner": {
			"id": 2,
			"name": "John",
			"surname": "Smith",
			"username": "john.smith@test.com"
		},
    "status": {
      	"id": 580,
        "name": "New",
        "time": "2016-10-11T15:11:48+03:00"
      },
    "starred": "yes",
    "source": {
      "id": 33,
      "name": "www.google.com"
    },
    "industry": {
      "id": 43,
      "name": "Banking"
    },
    "created": {
      "time": "2016-10-15T09:18:05+03:00",
      "user": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      }
    },
    "updated": {
      "time": "2016-10-15T09:23:45+03:00",
      "user": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      }
    },
    "isDeleted": "no",
    "company": {
      "id": 2,
      "name": "Example Comapny Ltd",
      "jobTitle": "CEO",
    },
    "emails": [
      {
        "id": 123,
        "value": "info@example.com",
        "type": "support"
      },
      {
        "id": 124,
        "value": "michael@example.com",
        "type": "work"
      }
    ],
    "phones": [
      {
        "id": 234,
        "value": "+44 1234 5678",
        "type": "mobile"
      },
      {
        "id": 235,
        "value": "+44 1234 5600",
        "type": "work"
      }
    ],
    "urls": [
      {
        "id": 345,
        "value": "http://mywebaxample.com",
        "type": "website"
      },
      {
        "id": 346,
        "value": "https://facebook.com/MyComapnyExample",
        "type": "facebook"
      }
    ],
    "addresses": [
      {
        "id": 345,
        "value": {
          "street": "11 Cundy Rd.",
          "city": "London",
          "zip": "E16 3DJ",
          "state": "Newham",
          "latitude": "51.5109393",
          "longitude": "0.030166",
          "country":{
            "iso": "GBR",
            "name": "United Kingdom"
          }
        },
        "type": "work"
      },
      {
        "id": 346,
        "value": {
          "street": "J. Jasinskio st. 16A",
          "city": "Vilnius",
          "zip": "03163",
          "state": "Vilnius region",
          "latitude": "54.6871235",
          "longitude": "25.2581209",
          "country":{
            "iso": "LTU",
            "name": "Lithuania"
          }
        },
        "type": "shipping"
      }
    ]
  }

    {
      "id": 3,
      "name": "William Brown",
      "picture": {
        "small": "https://ws-us1.teamgate.com/images/example/leads_images/3/small.jpg",
        "medium": "https://ws-us1.teamgate.com/images/example/leads_images/3/middle.jpg",
        "large":"https://ws-us1.teamgate.com/images/example/leads_images/3/large.jpg"
      },
      "owner": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      },
      "status": {
      	"id": 580,
        "name": "Unqualified",
        "time": "2016-10-11T15:12:12+03:00"
      },
      "starred": "no",
      "source": {
        "id": 32,
        "name": "www.bing.com"
      },
      "industry": {
        "id": 43,
        "name": "Food industry"
      },
      "created": {
        "time": "2016-10-15T09:43:15+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "updated": {
        "time": "2016-10-15T09:43:15+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "isDeleted": "no",
      "company": {
        "id": 5,
        "name": "Best Food Company Ltd",
        "jobTitle": "COO",
      },
      "emails": [
        {
          "id": 125,
          "value": "info@bestexample.com",
          "type": "support"
        },
        {
          "id": 126,
          "value": "william.brown@bestexample.com",
          "type": "work"
        }
      ],
      "phones": [
        {
          "id": 236,
          "value": "+44 1234 5680",
          "type": "mobile"
        },
        {
          "id": 237,
          "value": "+44 1234 5700",
          "type": "work"
        }
      ],
      "urls": [
        {
          "id": 347,
          "value": "http://bestwebaxample.com",
          "type": "website"
        },
        {
          "id": 348,
          "value": "https://facebook.com/BestComapnyExample",
          "type": "facebook"
        }
      ],
      "addresses": [
        {
          "id": 458,
          "value": {
            "street": "11 Cundy Rd.",
            "city": "London",
            "zip": "E16 3DJ",
            "state": "Newham",
            "latitude": "51.5109393",
            "longitude": "0.030166",
            "country":{
              "iso": "GBR",
              "name": "United Kingdom"
            }
          },
          "type": "work"
        },
        {
          "id": 459,
          "value": {
            "street": "J. Jasinskio st. 16A",
            "city": "Vilnius",
            "zip": "03163",
            "state": "Vilnius region",
            "latitude": "54.6871235",
            "longitude": "25.2581209",
            "country":{
              "iso": "LTU",
              "name": "Lithuania"
            }
          },
          "type": "shipping"
        }
      ]
    }
  ]
}
 

Parameters

Attribute Description
name
String
Name of the Lead. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=John%20Smith
And search by text fragment: ?name[like]=John
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the lead.
Example: ?createdUserId=6
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
updatedUserId
Integer
Unique identifier of the user who updated the lead.
Example: ?updatedUserId=6
ownerId
Integer
Unique identifier of the user who is lead owner.
Example: ?ownerId=6
isDeleted
Boolean
Indicator the lead is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the lead is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
status
String
Status name of the lead.
Example: ?status=John
statusId
Integer
Status Id of the lead.
Example: ?statusId=1
source
String
Source of the lead.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
industry
String
Industry of the lead.
Example: ?industry=Banking
industryId
Integer
Unique identifier of the industry.
Example: ?industryId=234
phone
String
Phone number of the lead. The minimum number of characters for the search is 3. The search is performed by the last characters.
Example: ?phone=556664
email
String
Email address of the lead. The minimum number of characters for the search is 3.
Example: ?email=@gmail.com
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • createdTime
  • createdUserId
  • updatedTime
  • updatedUserId
  • ownerId
  • ownerUsername
  • isDeleted
  • starret
  • status
  • stautsId
  • source
  • sourceId
  • industry
  • industryId

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0

How to get a list of Leads by parameters?

<?php
$leadParams = array(
  'isDeleted' => 'no',
  'name' => array(
    'like' => 'John'
  ),
  'createdTime' => array(
    'lt' => '2017-01-01T00:00:00+03:00',// < value
    'gt' => '2016-01-01T00:00:00+03:00'// > value
    ),
  'updatedTime' => array(
    'gte' => '2016-09-01T00:00:00+03:00'// >= value
	),
  'order' => array(
    'updatedTime' => 'desc'
	)
);
$result = $teamgate->leads->get($leadParams);
Suggest Edits

Get a Lead Statuses

Returns a list of lead status values.

 
gethttps://api.teamgate.com/v4/leads/id/statuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;

$lead = $teamgate->leads->get($leadId);
$result = $lead->statuses->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "statuses" is used the same parameters as with resource "leadStatuses".
Suggest Edits

Get a Lead Sources

Returns a list of assigned lead sources.

 
gethttps://api.teamgate.com/v4/leads/id/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;

$lead = $teamgate->leads->get($leadId);
$result = $lead->sources->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "sources" is used the same parameters as with resource "Sources".
Suggest Edits

Get a Lead Industries

Returns a list of assigned lead industries.

 
gethttps://api.teamgate.com/v4/leads/id/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;

$lead = $teamgate->leads->get($leadId);
$result = $lead->industries->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "industries" is used the same parameters as with resource "industries".
Suggest Edits

Get a Lead Tags

Returns a list of assigned lead tags.

 
gethttps://api.teamgate.com/v4/leads/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;

$lead = $teamgate->leads->get($leadId);
$result = $lead->tags->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "tags" is used the same parameters as with resource "Tags".
Suggest Edits

Get a Lead Custom Data

Returns a set of lead custom field values.

 
gethttps://api.teamgate.com/v4/leads/id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;

$lead = $teamgate->leads->get($leadId);
$result = $lead->customFields->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Get a Lead Events

Returns a list of Tasks, Appointments or Custom Activity.

 
gethttps://api.teamgate.com/v4/leads/id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;
$leadEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$lead = $teamgate->leads->get($leadId);
$result = $lead->events->get($leadEventsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of lead "events" is used the same parameters as with resource "events".
Suggest Edits

Create a Lead

 
posthttps://api.teamgate.com/v4/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadData = array(
    'name' => 'John Smith',
    'companyName' => 'Example & Co Ltd', //
    //'companyId' => 33442, // only for existing company
  	'jobTitle' => 'CEO',
    'sourceId' => 6046,
    //'source' => 'www.google.com',
    //'sourceDescription' => 'Testing New Source from My List',
    'starred' => 'yes',
    'status' => 'new',
    'industryId' => 6047,
    //'industry' => 'Banking',
    //'industryescription' => 'Testing New Industry from My List',
  	'tags' => ['B2B', 'B2C'],
    'ownerId' => 6,
    'emails' => array(
        array(
            'value' => 'john@example.net',
            'type' => 'personal'),
        array(
            'value' => 'john.smith@example.net',
            'type' => 'work'
        )
    ),
    'phones' => array(
        array(
            'value' => '+1234567890',
            'type' => 'mobile'
        ),
        array(
            'value' => '+1234567891',
            'type' => 'fax'
        )
    ),
    'urls' => array(
        array(
            'value' => 'https://facebook.com/ExampleJohnCompany',
            'type' => 'facebook'
        ),
        array(
            'value' => 'https://twitter.com/ExampleJohnCompany',
            'type' => 'twitter'
        )
    ),
    'addresses' => array(
        array(
            'value' => array(
                'street' => ' Market St',
                'city' => 'SAN FRANCISCO',
                'zip' => '94103',
                'state' => 'California',
                'countryIso' => 'USA',
                'latitude' => '37.7816347',
                'longitude' => '-122.4126954',
            ),
            'type' => 'home'
        )
    )
);

$result = $teamgate->leads->create($leadData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data":{
      "id": 3,
      "name": "John Smith",
      "company": {
        "id": 2,
        "name": "Example Comapny Ltd",
        "jobTitle": "CEO",
      },
      "owner": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      },
      "status": {
      	"id": 583,
        "name": "New",
        "time": "2016-10-11T15:11:48+03:00"
      },
      "starred": "yes",
      "source": {
        "id": 33,
        "name": "www.google.com"
      },
      "industry": {
        "id": 43,
        "name": "Banking"
      },
      "tags": ["B2B, B2C"],
      "created": {
        "time": "2016-10-15T09:18:05+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "updated": {
        "time": "2016-10-15T09:23:45+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "isDeleted": "no",
      "emails": [
        {
          "id": 123,
          "value": "info@example.com",
          "type": "support"
        },
        {
          "id": 124,
          "value": "michael@example.com",
          "type": "work"
        }
      ],
      "phones": [
        {
          "id": 234,
          "value": "+44 1234 5678",
          "type": "mobile"
        },
        {
          "id": 235,
          "value": "+44 1234 5600",
          "type": "work"
        }
      ],
      "urls": [
        {
          "id": 345,
          "value": "http://mywebaxample.com",
          "type": "website"
        },
        {
          "id": 346,
          "value": "https://facebook.com/MyComapnyExample",
          "type": "facebook"
        }
      ],
      "addresses": [
        {
          "id": 345,
          "value": {
            "street": "11 Cundy Rd.",
            "city": "London",
            "zip": "E16 3DJ",
            "state": "Newham",
            "latitude": "51.5109393",
            "longitude": "0.030166",
            "country":{
              "iso": "GBR",
              "name": "United Kingdom"
            }
          },
          "type": "work"
        },
        {
          "id": 346,
          "value": {
            "street": "J. Jasinskio st. 16A",
            "city": "Vilnius",
            "zip": "03163",
            "state": "Vilnius region",
            "latitude": "54.6871235",
            "longitude": "25.2581209",
            "country":{
              "iso": "LTU",
              "name": "Lithuania"
            }
          },
          "type": "shipping"
        }
    	]
}
 

Parameters

Attribute Description
name
String
Required
Required only if a lead is an person and companyName and companyId is empty.
Example: "name": "John Smith"
companyName
String
Required
Required only if a lead is an comapny and name is empty. The field will be set only if companyId is empty.
Example: "companyName": "Example Comapny Ltd"
companyId
Integer
Required
Required only if a lead is an comapny and name is empty. The field will be set only if companyName is empty.
Example: "companyId": "1"
jobTitle
String
The field will be set only if is set compnayName or companyId.
Example: "jobTitle": "CEO"
statusId
Integer

Example: "statusId": "1"
status
String
If the stauts does not exist it will be created.
Example: "status": "1"
statusDescription
String
Will be set only if will be created new status.
Example: "statusDescription": "1"
starred
Boolean
Indicator the lead is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
emails
String
Example:
  • "email": "john@example.net"
  • "emails": "{'value':'john@example.net','type':'work'}"
  • "emails": "[{'value':'john@example.net','type':'work'},{'value':'john.brown@example.net','type':'home'}]"
phones
String
Example:
  • "phone": "+44 123 456 7890"
  • "phones": "{'value':'+44 123 456 7890','type':'mobile'}"
  • "phones": "[{'value':'+44 123 456 7890','type':'mobile'},{'value':'+44 123 456 7800','type':'fax'}]"
urls
String
Example:
  • "url": "http://example.com"
  • "urls": "{'value':'http://example.com','type':'website'}"
  • "urls": "[{'value':'http://example.com','type':'website'},{'value':'https://facebook.com/example','type':'facebook'}]"
addresses
String
Example:
  • "address": "{'city':'Chicago','countryIso':'USA'}"
  • "addresses": "[{'city':'Chicago','countryIso':'USA'},{'longitude':'51.5109393','latitude':'0.030166'}]"
Suggest Edits

Update a Lead

 
puthttps://api.teamgate.com/v4/leads/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 3;
$data = array(
    'name' => 'James Parker'
);

$result = $teamgate->leads->update($leadId, $data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "JOHN BROWN"
starred
Integer
Indicator the lead is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "2"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
statusId
Integer

Example: "statusId": "1"
status
String
If the stauts does not exist it will be created.
Example: "status": "1"
statusDescription
String
Will be set only if will be created new status.
Example: "statusDescription": "1"
sourceId
Integer
Example: "sourceId": "123"
source
Integer
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
Integer
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
Suggest Edits

Replace a Lead Tags

Rewrite lead tags

 
puthttps://api.teamgate.com/v4/leads/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$lead = $teamgate->leads->get($leadId);
$result = $lead->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Add Tags to a Lead

 
patchhttps://api.teamgate.com/v4/leads/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$lead = $teamgate->leads->get($leadId);
$result = $lead->tags->patch($data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Delete a Lead Tag

 
deletehttps://api.teamgate.com/v4/leads/id/tags/tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;
$tagId = 5;
$lead = $teamgate->leads->get($leadId);
$result = $lead->tags->delete($tagId);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Lead.

Example: ?id=1

Suggest Edits

Delete a Lead

Delete an existing lead

 
deletehttps://api.teamgate.com/v4/leads/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$leadId = 1;
$result = $teamgate->leads->delete($leadId);

echo "<pre>";
print_r($result);


Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Lead.

Example: ?id=1

Properties

Supported people properties:

Attribute Description
id
Integer
readonly
Unique key of the Person.
name
String
Name of the Person. Maximum length is 255 characters.
picture
String
The person's picture. For the person picture is using Picture object. Read more information about Picture object here.
customerStatus
Object
Customer status of the person. Read more information about customerStatus object here.
prospectStatus
Object
Prospect status of the person. Read more information about prospectStatus object here.
owner
Object
For the owner is using User object. Read more information about User object here.
starred
Boolean
Indicator of whether or not the person is important and marked by star.
source
Object
The person’s source. Source are assigned from a common sources list. Read more information about Source object here.
industry
Object
The person's industry. Industry are assigned from a common industry list. Read more information about Industry object here.
created
Object
readonly
User, date and time Person record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
converted
Object
readonly
Date and time Person was converted from lead. Information is read only, because automatically generated by the server. Read more information about Converted object here.
updated
Object
readonly
User, date and time Person record was updated. information is read only, because automatically generated by the server. Read more information about Updated object here.
isDeleted
Boolean
Indicator the person is deleted or not.
birthday
Date
The person's birthday. Format: YYYY-MM-DD.
personalIdNumber
String
Personal code of the person.
gender
String
The person's gender.
company
Object
The person primary company. For the person company is using Company object. Read more information about people Company object here.
emails
Array
An array of email objects for the person. Read more information about Email object here.
phones
Array
An array of phone objects for the person. Read more information about Phone object here.
urls
Array
An array of url objects for the person. Read more information about Url object here.
addresses
Array
An array of address objects for the person. Read more information about Address object here.
gethttps://api.teamgate.com/v4/people/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$result = $teamgate->people->get($personId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data":
  	{
      "id": 1,
      "name": "Michael Jonson",
      "picture": {
        "small": "https://ws-us1.teamgate.com/images/example/contacts_images/1/small.jpg",
        "medium": "https://ws-us1.teamgate.com/images/example/contacts_images/1/middle.jpg",
        "large":"https://ws-us1.teamgate.com/images/example/contacts_images/1/large.jpg"
      },
      "owner": {
        "id": 2,
        "name": "John",
        "surname": "Smith",
        "username": "john.smith@test.com"
      },
      "customerStatus": "Customer",
      "prospectStatus": "Non Prospect",
      "starred": "yes",
      "source": {
        "id": 33,
        "name": "www.google.com"
      },
      "industry": {
        "id": 43,
        "name": "Banking"
      },
      "created": {
        "time": "2016-10-15T09:18:05+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "updated": {
        "time": "2016-10-15T09:23:45+03:00",
        "user": {
          "id": 2,
          "name": "John",
          "surname": "Smith",
          "username": "john.smith@test.com"
        }
      },
      "birthday": "1970-01-01",
      "personalIdNumber": "37001011234",
      "gender": "male",
      "isDeleted": "no",
      "company": {
        "id": 2,
        "name": "Example Comapny Ltd",
        "jobTitle": "CEO",
        "phone":{
          "value": "+44 1234 5678",
          "type": "work"
        },
        "email":{
          "value": "info@example.com",
          "type": "work"
        },
        "url":{
          "value": "http://mywebaxample.com/michael",
          "type": "work"
        },
        "address":{
          "value":{
            "street": "11 Cundy Rd.",
            "city": "London",
            "zip": "E16 3DJ",
            "state": "Newham",
            "latitude": "51.5109393",
            "longitude": "0.030166",
            "country":{
              "iso": "GBR",
              "name": "United Kingdom"
            }
          },
          "type": "work"
        },
      },
      "emails": [
        {
          "id": 123,
          "value": "info@example.com",
          "type": "support"
        },
        {
          "id": 124,
          "value": "michael@example.com",
          "type": "work"
        }
      ],
      "phones": [
        {
          "id": 234,
          "value": "+44 1234 5678",
          "type": "mobile"
        },
        {
          "id": 235,
          "value": "+44 1234 5600",
          "type": "work"
        }
      ],
      "urls": [
        {
          "id": 345,
          "value": "http://mywebaxample.com",
          "type": "website"
        },
        {
          "id": 346,
          "value": "https://facebook.com/MyComapnyExample",
          "type": "facebook"
        }
      ],
      "addresses": [
        {
          "id": 345,
          "value": {
            "street": "11 Cundy Rd.",
            "city": "London",
            "zip": "E16 3DJ",
            "state": "Newham",
            "latitude": "51.5109393",
            "longitude": "0.030166",
            "country":{
              "iso": "GBR",
              "name": "United Kingdom"
            }
          },
          "type": "work"
        },
        {
          "id": 346,
          "value": {
            "street": "J. Jasinskio st. 16A",
            "city": "Vilnius",
            "zip": "03163",
            "state": "Vilnius region",
            "latitude": "54.6871235",
            "longitude": "25.2581209",
            "country":{
              "iso": "LTU",
              "name": "Lithuania"
            }
          },
          "type": "shipping"
        }
    	]
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Person.

Example: ?id=1

Suggest Edits

People List

 
gethttps://api.teamgate.com/v4/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->people->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Person. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=John%20Smith
And search by text fragment: ?name[like]=John
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the person.
Example: ?createdUserId=6
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
updatedUserId
Integer
Unique identifier of the user who updated the person.
Example: ?updatedUserId=6
convertedTime
DateTime
Date and time of the convertion from lead in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
ownerId
Integer
Unique identifier of the user who is person owner.
Example: ?ownerId=6
isDeleted
Boolean
Indicator the person is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the person is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
customerStatus
Integer
Customer status of the person.
Example: ?customerStatus=1
prosperctStatus
Integer
Prospect status of the person.
Example: ?prosperctStatus=2
source
String
Source of the person.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
industry
String
Industry of the person.
Example: ?industry=Banking
industryId
Integer
Unique identifier of the industry.
Example: ?industryId=234
phone
String
Phone number of the person. The minimum number of characters for the search is 3. The search is performed by the last characters.
Example: ?phone=556664
email
String
Email address of the person. The minimum number of characters for the search is 3.
Example: ?email=@gmail.com
birthday
Date
Person's date of birth in YYY-MM-DD format.
Example: ?birthday=1980-01-01
personalIdNumber
String
Unique personal identification code.
Example: ?personalIdNumber=38001010000
gender
String
The person's gender.

Possible values:
  • male
  • female

Example: ?gender=male
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • createdTime
  • updatedTime
  • convertedTime

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Person Customer Statuses

 
gethttps://api.teamgate.com/v4/people/id/customerStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->customerStatuses->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Person Prospect Statuses

 
gethttps://api.teamgate.com/v4/people/id/prospectStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->prospectStatuses->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Person Sources

 
gethttps://api.teamgate.com/v4/people/id/statuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->sources->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
With a sub-resource of person "sources" is used the same parameters as with resource "sources".
Suggest Edits

Person Industries

 
gethttps://api.teamgate.com/v4/people/id/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->industries->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of person "industries" is used the same parameters as with resource "industries".
Suggest Edits

Person Tags

 
gethttps://api.teamgate.com/v4/people/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->tags->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of person "tags" is used the same parameters as with resource "Tags".
Suggest Edits

People Custom Fields

 
gethttps://api.teamgate.com/v4/people/id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;

$person = $teamgate->people->get($personId);
$result = $person->customFields->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of person "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Person Events

 
gethttps://api.teamgate.com/v4/people/id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$personEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$person = $teamgate->people->get($personId);
$result = $person->events->get($personEventsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of person "events" is used the same parameters as with resource "events".
Suggest Edits

Person Deals

 
gethttps://api.teamgate.com/v4/people/id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$personDealsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$person = $teamgate->people->get($personId);
$result = $person->deals->get($personDealsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of person "deals" is used the same parameters as with resource "deals".
Suggest Edits

Person Create

 
posthttps://api.teamgate.com/v4/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personData = array(
    'name' => 'John Smith',
    'source' => 'www.google.com',
    'starred' => 'yes',
    'industry' => 'Banking',
  	'tags' => ['B2B', 'B2C'],
    'customerStatus' => 'Customer',
    'prospectStatus' => 'Prospect',
    'companyId' => 3456,
    'ownerId' => 6,
    'birthday' => '1970-01-01',
    'personalIdNumber' => '3456789012',
    'gender' => 'male',
    'emails' => array(
        array(
            'value' => 'john@example.net',
            'type' => 'personal'),
        array(
            'value' => 'john.smith@example.net',
            'type' => 'work'
        )
    ),
    'phones' => array(
        array(
            'value' => '+1234567890',
            'type' => 'mobile'
        ),
        array(
            'value' => '+1234567891',
            'type' => 'fax'
        )
    ),
    'urls' => array(
        array(
            'value' => 'https://facebook.com/ExampleJohnCompany',
            'type' => 'facebook'
        ),
        array(
            'value' => 'https://twitter.com/ExampleJohnCompany',
            'type' => 'twitter'
        )
    ),
    'addresses' => array( //wrong
        array(
            'value' => array(
                'street' => '1019 Market St',
                'city' => 'SAN FRANCISCO',
                'zip' => '94103',
                'state' => 'California',
                'country' => 'USA',
                'latitude' => '37.7816327',
                'longitude' => '-122.4126974',
            ),
            'type' => 'home'
        )
    )
);

$result = $teamgate->people->create($personData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Required
Required field.
Example: "name": "John Smith"
companyId
Integer
Required
Example: "companyId": "5"
jobTitle
String
The field will be set only if companyId is not empty.
Example: "jobTitle": "CEO"
customerStatus
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatus": "2"
prospectStatus
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatus": "0"
starred
Boolean
Indicator the person is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
emails
String
Example:
  • "email": "john@example.net"
  • "emails": "{'value':'john@example.net','type':'work'}"
  • "emails": "[{'value':'john@example.net','type':'work'},{'value':'john.brown@example.net','type':'home'}]"
phones
String
Example:
  • "phone": "+44 123 456 7890"
  • "phones": "{'value':'+44 123 456 7890','type':'mobile'}"
  • "phones": "[{'value':'+44 123 456 7890','type':'mobile'},{'value':'+44 123 456 7800','type':'fax'}]"
urls
String
Example:
  • "url": "http://example.com"
  • "urls": "{'value':'http://example.com','type':'website'}"
  • "urls": "[{'value':'http://example.com','type':'website'},{'value':'https://facebook.com/example','type':'facebook'}]"
addresses
String
Example:
  • "address": "{'city':'Chicago','countryIso':'USA'}"
  • "addresses": "[{'city':'Chicago','countryIso':'USA'},{'longitude':'51.5109393','latitude':'0.030166'}]"
birthday
Date
Person's date of birth in YYY-MM-DD format.
Example: "birthday": "1980-02-29"
personalIdNumber
String
Unique personal identification code.
Example: "personalIdNumber": "38002290000"
gender
String
The person's gender.

Possible values:
  • male
  • female

Example: "gender": "male"
Suggest Edits

Person Update

 
puthttps://api.teamgate.com/v4/people/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$data = array(
    'name' => 'James Parker'
);

$result = $teamgate->people->update($personId, $data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "JOHN Smith"
customerStatusId
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatusId": "2"
prospectStatusId
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatusId": "0"
starred
Integer
Indicator the person is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "2"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
Integer
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
Integer
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
birthday
Date
Person's date of birth in YYY-MM-DD format.
Example: "birthday": "1980-02-28"
personalIdNumber
String
Unique personal identification code.
Example: "personalIdNumber": "38002280000"
gender
String
The person's gender.

Possible values:
  • male
  • female

Example: "gender": "male"
Suggest Edits

Person Tags Rewrite

Rewrite person tags

 
puthttps://api.teamgate.com/v4/people/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$person = $teamgate->people->get($personId);
$result = $person->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Person Tags Update

Update person tags

 
patchhttps://api.teamgate.com/v4/people/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$person = $teamgate->people->get($personId);
$result = $person->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Person Tag Delete

 
deletehttps://api.teamgate.com/v4/people/id/tags/tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$tagId = 5;
$person = $teamgate->people->get($personId);
$result = $person->tags->delete($tagId);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Person.

Example: ?id=1

Suggest Edits

Person Delete

 
deletehttps://api.teamgate.com/v4/people/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$personId = 1;
$result = $teamgate->people->delete($personId);

echo "<pre>";
print_r($result);



Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required
Unique key of the Person. Example: ?id=1
Suggest Edits

COMPANIES

 

Properties

Supported companies properties:

Attribute Description
id
Integer
readonly
Unique key of the Company.
name
String
Name of the Company. Maximum length is 255 characters.
picture
String
The company's picture. For the comapny picture is using Picture object. Read more information about Picture object here.
customerStatus
Object
The deal's buyer. For the buyer deal is using Contact object. Read more information about Contact object here.
prospectStatus
Object
The deal’s stage. Read more information about deals Stage object here.
owner
Object
For the owner is using User object. Read more information about User object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
industry
Object
The company industry. Industry are assigned from a common industry list. Read more information about Industry object here.
created
Object
readonly
User, date and time Company record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Company record was updated. information is read only, because automatically generated by the server. Read more information about Updated object here.
isDeleted
Boolean
Indicator the company is deleted or not.
person
Object
The company primary person. For the company primary person is using Person object. Read more information about company Person object here.
emails
Array
An array of email objects for the company. Read more information about Email object here.
phones
Array
An array of phone objects for the company. Read more information about Phone object here.
urls
Array
An array of url objects for the company. Read more information about Url object here.
addresses
Array
An array of address objects for the company. Read more information about Address object here.
 
gethttps://api.teamgate.com/v4/companies/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$result = $teamgate->companies->get($companyId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Company.

Example: ?id=1

Suggest Edits

Companies List

 
gethttps://api.teamgate.com/v4/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->companies->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Company. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=Example%20Ltd
And search by text fragment: ?name[like]=Example
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
convertedTime
DateTime
Date and time of the convertion from lead in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the company.
Example: ?createdUserId=6
updatedUserId
Integer
Unique identifier of the user who updated the company.
Example: ?updatedUserId=6
ownerId
Integer
Unique identifier of the user who is company owner.
Example: ?ownerId=6
isDeleted
Boolean
Indicator the company is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
customerStatus
Integer
Customer status of the company.
Example: ?customerStatus=1
prosperctStatus
Integer
Prospect status of the company.
Example: ?prosperctStatus=2
source
String
Source of the company.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
industry
String
Industry of the company.
Example: ?industry=Banking
industryId
Integer
Unique identifier of the industry.
Example: ?industryId=234
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
phone
String
Phone number of the company. The minimum number of characters for the search is 3. The search is performed by the last characters.
Example: ?phone=556664
email
String
Email address of the company. The minimum number of characters for the search is 3.
Example: ?email=@gmail.com
code
String
Unique code of the Company.
Example: ?code=1234567890
vatCode
String
VAT identification number of the Company.
Example: ?vatCode=UK1234567890123
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • createdTime
  • updatedTime
  • convertedTime

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Company Customer Statuses

 
gethttps://api.teamgate.com/v4/companies/id/customerStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->customerStatuses->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Company Prospect Statuses

 
gethttps://api.teamgate.com/v4/companies/id/prospectStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->prospectStatuses->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Company Sources

 
gethttps://api.teamgate.com/v4/companies/id/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->sources->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "sources" is used the same parameters as with resource "sources".
Suggest Edits

Company Industries

 
gethttps://api.teamgate.com/v4/companies/id/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->industries->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "industries" is used the same parameters as with resource "industries".
Suggest Edits

Company Tags

 
gethttps://api.teamgate.com/v4/companies/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->tags->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "tags" is used the same parameters as with resource "Tags".
Suggest Edits

Companies Custom Fields

 
gethttps://api.teamgate.com/v4/companies/id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$compnyId = 1;

$company = $teamgate->companies->get($compnyId);
$result = $company->customFields->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Company Events

 
gethttps://api.teamgate.com/v4/companies/id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->events->get($companyEventsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "events" is used the same parameters as with resource "events".
Suggest Edits

Company People

 
gethttps://api.teamgate.com/v4/companies/id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->people->get($companyPeopleParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "deals" is used the same parameters as with resource "deals".
Suggest Edits

Company Deals

 
gethttps://api.teamgate.com/v4/companies/id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyDealsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->deals->get($companyDealsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of company "deals" is used the same parameters as with resource "deals".
Suggest Edits

Company Create

 
posthttps://api.teamgate.com/v4/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$data = array(
    'name' => 'First Company by API'
);

$result = $teamgate->companies->create($data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Required
Required field.
Example: "name": "Example Ltd"
personId
Integer
Example: "personId": "2"
jobTitle
String
The field will be set only if personId is not empty.
Example: "jobTitle": "CEO"
customerStatus
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatus": "2"
prospectStatus
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatus": "0"
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
emails
String
Example:
  • "email": "john@example.net"
  • "emails": "{'value':'john@example.net','type':'work'}"
  • "emails": "[{'value':'john@example.net','type':'work'},{'value':'john.brown@example.net','type':'home'}]"
phones
String
Example:
  • "phone": "+44 123 456 7890"
  • "phones": "{'value':'+44 123 456 7890','type':'mobile'}"
  • "phones": "[{'value':'+44 123 456 7890','type':'mobile'},{'value':'+44 123 456 7800','type':'fax'}]"
urls
String
Example:
  • "url": "http://example.com"
  • "urls": "{'value':'http://example.com','type':'website'}"
  • "urls": "[{'value':'http://example.com','type':'website'},{'value':'https://facebook.com/example','type':'facebook'}]"
addresses
String
Example:
  • "address": "{'city':'Chicago','countryIso':'USA'}"
  • "addresses": "[{'city':'Chicago','countryIso':'USA'},{'longitude':'51.5109393','latitude':'0.030166'}]"
code
String
Unique code of the Company.
Example: "code": "1234567890"
vatCode
String
VAT identification number of the Company.
Example: "vatCode": "UK1234567890123"
Suggest Edits

Company Update

 
puthttps://api.teamgate.com/v4/companies/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$data = array(
    'name' => 'Second Company by API'
);

$result = $teamgate->companies->update($companyId, $data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Example Ltd"
customerStatusId
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatusId": "2"
prospectStatusId
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatusId": "0"
starred
Integer
Indicator the person is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "2"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
Integer
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
Integer
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
code
String
Unique code of the Company.
Example: "code": "1234567890"
vatCode
String
VAT identification number of the Company.
Example: "vatCode": "UK1234567890123"
Suggest Edits

Company Tags Rewrite

Rewrite company tags

 
puthttps://api.teamgate.com/v4/companies/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$company = $teamgate->companies->get($companyId);
$result = $company->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Company Tags Update

Update company tags

 
patchhttps://api.teamgate.com/v4/companies/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$company = $teamgate->companies->get($companyId);
$result = $company->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Company Tag Delete

 
deletehttps://api.teamgate.com/v4/companies/id/tags/tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$tagId = 5;
$company = $teamgate->companies->get($companyId);
$result = $company->tags->delete($tagId);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Company.

Example: ?id=1

Suggest Edits

Company Delete

 
deletehttps://api.teamgate.com/v4/companies/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$result = $teamgate->companies->delete($companyId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required
Unique key of the Company.

Example: ?id=1

Properties

Supported deals properties:

Attribute Description
id
Integer
readonly
Unique key of the Deal.
name
String
Name of the Deal. Maximum length is 255 characters.
price
Object
The deal’s price. Read more information about deals Price object here.
buyer
Object
The deal's buyer. For the buyer deal is using Contact object. Read more information about Contact object here.
stage
Object
The deal’s stage. Read more information about deals Stage object here.
status
Object
The deal’s status. Read more information about deals Status object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
created
Object
readonly
User, date and time Deal record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
owner
Object
For the owner is using User object. Read more information about User object here.
isDeleted
Boolean
Indicator the deal is deleted or not.
estimatedClosureDate
DateTime
Date up to which is scheduled to close deal. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
gethttps://api.teamgate.com/v4/deals/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$result = $teamgate->deals->get($dealId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data": [
        {
            "id": 1,
            "title": "Test Deal #1",
            "price": {
                "price": 1234.50,
                "currency": "USD",
                "rate": 0.83968,
                "basePrice": 1036.59,
              	"baseCurrency": "EUR"
            },
            "buyer": {
                "id": 123,
                "name": "Comapny Name Ltd",
                "email": "title@name.net",
                "phone": "01234-567890"
            },
            "stage": {
                "id": 27,
                "name": "Qualification",
                "pipeline": "Account Management Sales"
            },
            "status": {
                "name": "won",
                "date": "1428440400",
                "changed": "1459358952"
            },
            "source": {
                "id": 33,
                "name": "google.com"
            },
          	"tags": ["1st tag", "2nd tag", 75, "4th tag"],
            "createdDate": "2016-10-15T09:18:05+03:00",
          	"estimatedClosureDate": "2016-10-30T09:18:05+03:00",
          	"closureDate": "2016-10-28T12:34:56+03:00",
            "favorite": 1,
            "isDeleted": 0,
            "creator": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
            "responsible": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            }
        }
    ]
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Deal.

Example: ?id=1

Suggest Edits

Deals List

 
gethttps://api.teamgate.com/v4/deals/
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->deals->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
    "success": true,
    "data": [
        {
            "id": 10,
            "title": "Test Deal #1",
            "price": {
                "price": 1234.50,
                "currency": "USD",
                "rate": 0.83968,
                "basePrice": 1036.59,
              	"baseCurrency": "EUR"
            },
            "buyer": {
                "id": 123,
                "name": "Comapny Name Ltd.",
                "email": "company@name.net",
                "phone": "01234-567890"
            },
            "stage": {
                "id": 27,
                "name": "Qualification",
                "pipeline": "Account Management Sales"
            },
            "status": {
                "name": "won",
                "date": "1428440400",
                "changed": "1459358952"
            },
            "source": {
                "id": 33,
                "name": "google.com"
            },
          	"tags": ["1st tag", "2nd tag", 75, "4th tag"],
            "createdDate": "2016-10-15T09:18:05+03:00",
          	"estimatedClosureDate": "2016-10-30T09:18:05+03:00",
          	"closureDate": "2016-10-28T12:34:56+03:00",
            "favorite": 1,
            "isDeleted": 0,
            "creator": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
            "responsible": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
              	{
                  "id": 14,
                  "name": "James Parker",
                  "username": "james.parker@company.net"
            		}
            ]
        }
    ]
}
 

Parameters

Attribute Description
name
String
Name of the Deal. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=Deal%20No:%205
And search by text fragment: ?name[like]=Deal
estimatedClosureDate
DateTime
Planning date and time of the deal closure in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the company.
Example: ?createdUserId=6
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
updatedUserId
Integer
Unique identifier of the user who updated the company.
Example: ?updatedUserId=6
ownerId
Integer
Unique identifier of the user who is company owner.
Example: ?ownerId=6
status
Integer
...
Example: ?status=won
statusDate
DateTime
...
Example: ?statusDate=2016-10-01T10:00:00+03:00
statusChangedTime
DateTime
...
Example: ?statusChangedTime=2016-10-01T10:00:00+03:00
stageId
Integer
...
Example: ?stageId=3
priceValue
Number
...
Example: ?priceValue=1500
priceCurrency
String
...
Example: ?EUR=1500
priceBaseValue
Number
...
Example: ?priceBaseValue=1500
isDeleted
Boolean
Indicator the company is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
source
String
Source of the company.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • id
  • name
  • createdTime
  • updatedTime
  • estimatedClosureDate

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0

How I can get list of all my active deals?

Jeigu norite gauti didelį duomenų masyvą, rekomenduojame nauduoti parametrus offset ir limit, šie parametrau padės ištaukti pilną sąrašą iš duomenų bazės mažomis porcijomis neapkraunant serverio. Paramentras offset nurodo nuo kurio įrašo ištraukinėti duomenis, o parametras limit nurodo kiek įrašu ištaukinėti. Pagal nutilėjimą offset = 0, o limit = 25.

<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
  'apiKey' => '_YOUR_ACCOUNT_API_KEY_',
  'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_'
]);

$result = array();
$response = array();
$data = array(
        'offset' => 0,
        'limit' => 100,
        'isDeleted' => 0
    );
do {
    $response = $teamgate->deals->get($data);
    $result = array_merge($result, $response->data);
    $data['offset'] += $data['limit'];
} while (!empty($response->data));

echo "<pre>";
print_r($result);
Suggest Edits

Deals Custom Fields

 
gethttps://api.teamgate.com/v4/deals/id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->customFields->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Deal Stages

 
gethttps://api.teamgate.com/v4/deals/id/stages
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$dealStages = $deal->stages->get();

echo "<pre>";
print_r($dealStages);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suggest Edits

Deal Sources

 
gethttps://api.teamgate.com/v4/deals/id/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->sources->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "sources" is used the same parameters as with resource "sources".
Suggest Edits

Deal Tags

 
gethttps://api.teamgate.com/v4/deals/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "tags" is used the same parameters as with resource "Tags".
Suggest Edits

Deal Events

 
gethttps://api.teamgate.com/v4/deals/id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->events->get($dealEventsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "events" is used the same parameters as with resource "events".
Suggest Edits

Deal People

 
gethttps://api.teamgate.com/v4/deals/id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'asc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->people->get($dealPeopleParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "people" is used the same parameters as with resource "people".
Suggest Edits

Deal Companies

 
gethttps://api.teamgate.com/v4/deals/id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealComapniesParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'asc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->companies->get($dealComapniesParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

With a sub-resource of deal "companies" is used the same parameters as with resource "companies".
Suggest Edits

Deal Create

 
posthttps://api.teamgate.com/v4/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$data = array(
    'name' => 'My 1st Deal by API',
    'priceValue' => '2275.50',
    'priceCurrency' => 'USD',
    'favorite' => 1,
    'respossibleId' => 12,
    'stageId' => 27,
    'buyerId' => 36,
    'statusName' => 'active',
    'sourceId' => 200,
  	'tags' => ['B2B', 'B2C']
);

$result = $teamgate->deals->create($data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "1st My Deal"
buyerId
Integer
Required
Example: "buyerId": "5"
stageId
Integer
Example: "stageId": "5"
status
String
Possible values:
  • active - the deal is open
  • won - the deal is won
  • lost - the deal is lost
  • postponed - the deal is postponed


Example: "status": "lost"
priceValue
Float
Example: "priceValue": "1725.50"
priceCurrency
String
Example: "priceCurrency": "USD"
starred
String
Indicator the deal is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
estimatedClosureDate
Date
Example: "estimatedClosureDate": "2017-03-05T11:45:59+02:00"
Suggest Edits

Deal Update

 
puthttps://api.teamgate.com/v4/deals/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$data = array(
    'name' => 'My 2nd Deal by API'
);

$result = $teamgate->deals->update($dealId, $data);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "2nd My Deal"
buyerId
Integer
Required
Example: "buyerId": "5"
stageId
Integer
Example: "stageId": "5"
status
String
Possible values:
  • active - the deal is open
  • won - the deal is won
  • lost - the deal is lost
  • postponed - the deal is postponed


Example: "status": "postponed"
priceValue
Float
Example: "priceValue": "1725.50"
priceCurrency
String
Example: "priceCurrency": "USD"
starred
String
Indicator the deal is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
estimatedClosureDate
Date
Example: "estimatedClosureDate": "2017-03-05T11:45:59+02:00"
Suggest Edits

Deal Tags Rewrite

Rewrite deal tags

 
puthttps://api.teamgate.com/v4/deals/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Deal Tags Update

Update deal tags

 
patchhttps://api.teamgate.com/v4/deals/id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->update($tags);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Deal Tag Delete

 
deletehttps://api.teamgate.com/v4/deals/id/tags/tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$tagId = 5;
$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->delete($tagId);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Deal.

Example: ?id=1

Suggest Edits

Deal Delete

 
deletehttps://api.teamgate.com/v4/deals/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$result = $teamgate->deals->delete($dealId);

echo "<pre>";
print_r($result);

Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Deal.

Example: ?id=1

Suggest Edits

PIPELINES

 

Properties

Supported deal pipelines properties:

Attribute Description
id
Integer
readonly
Unique key of the Pipeline.
name
String
Name of the Pipeline.
stages
Array
An array of stages objects for the pipeline. Read more information about Stage object here.
 
gethttps://api.teamgate.com/v4/pipelines/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$pipelineId = 1;
$pipeline = $teamgate->pipelines->get($pipelineId);

echo "<pre>";
print_r($pipeline);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Pipeline.

Example: ?id=1

Suggest Edits

Pipelines List

 
gethttps://api.teamgate.com/v4/pipelines
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$pipelines = $teamgate->pipelines->get();

echo "<pre>";
print_r($pipelines);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String

Name of the Pipeline.

Example: ?name=middle

order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • id
  • name
  • Example: ?order=name:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0

Properties

Supported events properties:

Attribute Description
id
Integer
readonly
Unique key of the Event.
name
String
Name of the Event. Maximum length is 255 characters.
owner
Object
For the owner is using User object. Read more information about User object here.
type
String
Type of the Event. This field must have one of the following values:
  • appointment
  • note
  • call
  • task
description
Text
The event’s description.
start
DateTime
The event start date. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
end
DateTime
The event end date. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
allDay
Boolean
The indicator or event lasts all day.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
place
String
The event’s place.
isSecret
Boolean
Indicator the event is private or not.
completed
Object
readonly
Date and time Event record was completed. Information is read only, because automatically generated by the server. Read more information about Completed object here.
created
Object
readonly
User, date and time Event record was created. Information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Event record was updated. Information is read only, because automatically generated by the server. Read more information about Updated object here.
gethttps://api.teamgate.com/v4/events/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsList = $teamgate->events->get($eventId);

echo "<pre>";
print_r($eventsList);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Event.

Example: ?id=1

Suggest Edits

Events List

 
gethttps://api.teamgate.com/v4/events/
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventsList = $teamgate->events->get();

echo "<pre>";
print_r($eventsList);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Event. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=First%20call
And search by text fragment: ?name[like]=First
type
String
Types of events.

Possible values:
  • appointment
  • call
  • todo
  • note
  • email
  • sms

Example: ?type=call
status
Integer
This attribute is used only for the calls and tasks. Appointments and notes do not have this attribute.

Possible values for calls:
  • incomplete - active call
  • successful - successfully completed call
  • unsuccessful - unsuccessfully completed call

Possible values for tasks:
  • incomplete - active task
  • completed - completed task


Example: ?status=completed
place
String
Place of the event.Example: ?place=London
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • type
  • status
  • ownerId
  • createdTime
  • completedTime
  • start
  • end

Example: ?order=createdTime:desc
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
completedTime
DateTime
Completing date and time of the event in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the event.
Example: ?createdUserId=6
ownerId
Integer
Unique identifier of the user who is company owner.
Example: ?ownerId=6
isSecret
Boolean
Indicator the event is private or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
start
DateTime
Date and time of the planing event start in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
end
DateTime
Date and time of the planing event end in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Event Attendees

 
gethttps://api.teamgate.com/v4/events/id/attendees
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsAttendeesParams = array(
	'isSecret' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->attendees->get($eventsAttendeesParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Event Leads

 
gethttps://api.teamgate.com/v4/events/id/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsLeadsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->leads->get($eventsLeadsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Event People

 
gethttps://api.teamgate.com/v4/events/id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->people->get($eventsPeopleParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Event Companies

 
gethttps://api.teamgate.com/v4/events/id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsCompaniesParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->companies->get($eventsCompaniesParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Event Deals

 
gethttps://api.teamgate.com/v4/events/id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsDealsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->deals->get($eventsDealsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 
Suggest Edits

Event Comments

 
gethttps://api.teamgate.com/v4/events/id/comments
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsCommentsParams = array(
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->comments->get($eventsCommentsParams);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String
Value of the Comment. You can search by full value or by fragment of value.
Example for strict search: ?name=My%20first%20comment
And search by text fragment: ?name[like]=first
createdUserId
Integer
Unique identifier of the user who created the comment.
Example: ?createdUserId=3
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • value
  • createdUserId
  • createdTime

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=3
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Event Create

 
posthttps://api.teamgate.com/v4/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventData = array(
    'name' => 'My 1st Deal by API',
    'type' => 'appointment',
    'time' => '2016-11-07T10:30:00+01:00',
    'end' => '2016-11-07T12:00:00+01:00',
  	'place' => 'London',
  	'description' => 'Very important meeting with partner'
);

$result = $teamgate->events->create($eventData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Meeting in London"
type
String
Default type value is task.

Possible values:
  • task - event as task
  • call - event as call
  • appointment - event as appointment
  • note - event as note
  • custom type name or Id - event custom type


Example: "type": "appointment"
status
String
This attribute is used only for the calls and tasks. Appointments and notes do not have this attribute.

Possible values for calls:
  • incomplete - active call
  • successful - successfully completed call
  • unsuccessful - unsuccessfully completed call

Possible values for tasks:
  • incomplete - active task
  • completed - completed task


Example: "status": "incomplete"
place
String
This attribute is used only for the appointments.

Example: "place": "London"
isSecret
Boolean
This attribute is used only for the appointments. Indicator the appointment is private or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "isSecret": "no"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.net"
resources
String
Examples:
  • "resources": "1"
  • "resources": "['1','2']"
description
String
This attribute is used only for the appointments.

Example: "description": "Very important appointment with partner"
value
String
This attribute is used only for the notes.

Example: "value": "Very important appointment with partner"
start
Date
Example: "start": "2017-03-05T11:45:59+02:00"
end
Date
Example: "end": "2017-03-05T11:45:59+02:00"
allDay
Boolean
Indicate whether the event lasts all day. This attribute is used only for the appointments.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "allDay": "no"
Suggest Edits

Event Comment Create

 
posthttps://api.teamgate.com/v4/events/id/comments
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventData = array(
    'value' => 'My 1st comment for Event'
);

$result = $teamgate->events->comments->create($eventData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String
Example: "value": "My first comment"
Suggest Edits

Event Resources Update

 
patchhttps://api.teamgate.com/v4/events/id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$eventData = array(
    'resources' => '1'
);

$event = $teamgate->events->get($eventId);
$result = $event->resources->patch($eventData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Update

 
puthttps://api.teamgate.com/v4/events/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$data = array(
    'start' => '2016-12-01T10:00:00+01:00',
  	'end' => '2016-12-01T11:30:00+01:00'
);

$result = $teamgate->events->update($eventId, $data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Meeting in New York"
status
String
This attribute is used only for the calls and tasks. Appointments and notes do not have this attribute.

Possible values for calls:
  • incomplete - active call
  • successful - successfully completed call
  • unsuccessful - unsuccessfully completed call

Possible values for tasks:
  • incomplete - active task
  • completed - completed task


Example: "status": "incomplete"
place
String
This attribute is used only for the appointments.

Example: "place": "New York"
isSecret
Boolean
This attribute is used only for the appointments. Indicator the appointment is private or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "isSecret": "no"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.net"
resources
String
Examples:
  • "resources": "1"
  • "resources": "['1','2']"
description
String
This attribute is used only for the appointments and notes.

Example: "description": "Very important appointment with partner"
start
Date
Example: "start": "2017-03-05T11:45:59+02:00"
end
Date
Example: "end": "2017-03-05T11:45:59+02:00"
allDay
Boolean
Indicate whether the event lasts all day.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "allDay": "no"
Suggest Edits

Event Resources Rewrite

 
puthttps://api.teamgate.com/v4/events/id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$eventData = array(
    'resources' => '1'
);

$event = $teamgate->events->get($eventId);
$result = $event->resources->put($eventData);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Resources List Unassign

 
deletehttps://api.teamgate.com/v4/events/id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->resources->delete();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Resource Unassign

 
deletehttps://api.teamgate.com/v4/events/id/resources/rId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$resourceId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->resources->delete($resourceId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Delete

 
deletehttps://api.teamgate.com/v4/events/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$result = $teamgate->events->delete($eventId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Event.

Example: ?id=1

Suggest Edits

RESOURCES

 
Suggest Edits

Resources List

 
gethttps://api.teamgate.com/v4/resources/
curl --request GET \
  --url https://example.com/v4/resources/
var request = require("request");

var options = { method: 'GET', url: 'https://example.com/v4/resources/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://example.com/v4/resources/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://example.com/v4/resources/",
  "method": "GET",
  "headers": {},
  "processData": false
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
import requests

url = "https://example.com/v4/resources/"

response = requests.request("GET", url)

print(response.text)
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$resourcesList = $teamgate->resources->get();

echo "<pre>";
print_r($resourcesList);
 
Attribute Description
id
Integer

Unique key of the Resource.

Example: ?id=1

name
String

Name of the Sources.

Example: ?name=MeetingRoom

Suggest Edits

CUSTOM FIELDS

 

Properties

Supported custom fields properties:

Attribute Description
id
Integer
readonly
Unique key of the Custom Field.
name
String
Name of the Custom Field.
module
String
Assigned module for Custom Field. This field must have one of the following values:
  • leads
  • people
  • companies
  • deals
isActive
Boolean
Indicator the field is active or not.
isFilter
Boolean
Indicator the field is marked as filtered or not.
isList
Boolean
Indicator the field is shown in the list or not.
type
String
Value type assigned for field.
items
Array
...
value
Mixed
...
Suggest Edits

Custom Field

Retrieve a Single User

 
gethttps://api.teamgate.com/v4/customFields/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$customFieldId = 2;
$result = $teamgate->customFields->get($customFieldId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Custom Field.

Example: ?id=2

Suggest Edits

Custom Fields List

Retrieve All Custom Fields

 
gethttps://api.teamgate.com/v4/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->customFields->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
	"success": true,
	"data":[
    {
      "id": 2,
      "name": "Michael",
      "surname": "Jonson",
      "username": "michael.jonson@example.net",
      "picture":{
      	"small": "https://ws-us1.teamgate.com/images/example/users_photos/2/small.jpg",
       	"medium": "https://ws-us1.teamgate.com/images/example/users_photos/2/middle.jpg",
       	"large": "https://ws-us1.teamgate.com/images/example/users_photos/2/big.jpg"
        },
      "email": "michael.jonson@example.net",
      "position": "Administrator",
      "language": {
        "code": "en",
        "name":	"english"
      },
      "locale": "en_gb",
      "timeZone": "Europe/Helsinki",
      "created": {
        "time": "2015-10-28T09:00:00+03:00"
      },
      "role": "Admin",
      "isActive": "yes",
      "lastLogin": {
      	"time": "2016-10-10T08:23:45+03:00"
      }
		},
			{
          "id": 3,
          "name": "John",
          "surname": "Brown",
          "username": "john.brown@example.net",
          "picture":{
            "small": "https://ws-us1.teamgate.com/images/example/users_photos/3/small.jpg",
            "medium": "https://ws-us1.teamgate.com/images/example/users_photos/3/middle.jpg",
            "large": "https://ws-us1.teamgate.com/images/example/users_photos/3/big.jpg"
            },
          "email": "john.brown@example.net",
          "position": "CEO",
          "language": {
            "code": "en",
            "name":	"english"
          },
          "locale": "en_gb",
          "timeZone": "Europe/Helsinki",
          "created": {
            "time": "2015-10-28T11:30:00+03:00"
          },
          "role": "Admin",
          "isActive": "yes",
          "lastLogin": {
            "time": "2016-10-10T08:45:59+03:00"
          }
      ]
}
 

Parameters

Attribute Description
name
String
Name of the Custom Field. You can search by full name or by fragment of name.
Example for strict search: ?name=Bussness%20Type
And search by text fragment: ?name[like]=Bussness
isActive
Boolean
Indicator the Custom Field is active or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isActive=yes
isFilter
Boolean
Indicator the Custom Field is active or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isFilter=true
type
Boolean
Type of the Custom Field.

Possible values:
  • text - Field that you can enter yourself.
  • single_option - One option to select a value.
  • multi_option - More then one option to select a value.
  • number - Number that you can enter yourself.
  • monetary - Field that you can enter some value in currency.
  • date - Appearing data picker to set important dates.
  • long_text - Long text type field is for records of up to 6000 symbols.
  • url - URL link.

Example: ?type=multi_option
 
Attribute Description
id
Integer
readonly
Unique key of the Comment.
value
String
Value of the Comment.
created
Object
readonly
User, date and time Commnet was created. Information is read only, because automatically generated by the server. Read more information about Created object here.
Suggest Edits

Comment

Retrieve a Single Comment

 
gethttps://api.teamgate.com/v4/comments/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 2;
$result = $teamgate->comments->get($commentId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Comment.

Example: ?id=2

Suggest Edits

Comment Update

 
puthttps://api.teamgate.com/v4/comments/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 1;
$data = array(
    'value' => '2nd my comment'
);

$result = $teamgate->comments->update($commentId, $data);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
value
String
Example: "value": "2nd My Comment"
Suggest Edits

Comment Delete

 
deletehttps://api.teamgate.com/v4/comments/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 1;
$result = $teamgate->comments->delete($commentId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Comment.

Example: ?id=1

Suggest Edits

INDUSTRIES

 

Properties

Supported industries properties

Attribute Description
id
Integer
readonly
Unique key of the Industry.
name
String
Name of the Industry.
description
String
Description of the Industry.
Suggest Edits

Industry

Retrieve a Single Industry

 
gethttps://api.teamgate.com/v4/industries/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$industryId = 2;
$result = $teamgate->industries->get($industryId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Source.

Example: ?id=2

Suggest Edits

Industries List

Retrieve All Industries

 
gethttps://api.teamgate.com/v4/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->industries->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Industry. You can search by full name or by fragment of name.
Example for strict search: ?name=Software
And search by text fragment: ?name[like]=soft
description
String
Description of the Industry. You can search by full description or by fragment of surame.
Example for strict search: ?description=ITtools
And search by text fragment: ?name[like]=tools
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • description

Example: ?order=name:desc
limit
Integer
Response items count. Example: ?limit=3
offset
Integer
Returned result first value number. Example: ?offset=0
 

Properties

Supported sources properties:

Attribute Description
id
Integer
readonly
Unique key of the Source.
name
String
Name of the Source.
description
String
Description of the Source.
Suggest Edits

Source

Retrieve a Single Source

 
gethttps://api.teamgate.com/v4/sources/id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$sourceId = 2;
$result = $teamgate->sources->get($sourceId);

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Source.

Example: ?id=2

Suggest Edits

Sources List

Retrieve All Sources

 
gethttps://api.teamgate.com/v4/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->sources->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Source. You can search by full name or by fragment of name.
Example for strict search: ?name=google.com
And search by text fragment: ?name[like]=google
description
String
Description of the Source. You can search by full description or by fragment of surame.
Example for strict search: ?description=Search
And search by text fragment: ?name[like]=Search
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • description

Example: ?order=name:desc
limit
Integer
Response items count. Example: ?limit=3
offset
Integer
Returned result first value number. Example: ?offset=0

Properties

Supported tags properties:

Attribute Description
id
Integer
readonly
Unique key of the Tag.
name
String
Name of the Tag.
description
String
Description of the Tag.
Suggest Edits

Tags List

Retrieve All Tags

 
gethttps://api.teamgate.com/v4/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->tags->get();

echo "<pre>";
print_r($result);
Status: {{ results.statusCode[0] }}
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Tag. You can search by full name or by fragment of name.
Example for strict search: ?name=green
And search by text fragment: ?name[like]=green
description
String
Description of the Tag. You can search by full description or by fragment of name.
Example for strict search: ?description=Search
And search by text fragment: ?