Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /webresources/api/v3/sites/current/companies

Alternatively, use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.

Response

An array of the first 10 companies; each object has the following properties:

id - the id of the company (integer)

siteId - the id of the site (integer)

externalId - the external ID (integer)

ownBy - the ID of the company's owner (integer)

ownDate - the date the owner was added (integer)

company - the company's name (string)

abn - the company's "Registration"(string)

companyTypeId - (integer)

customerTypeId - (integer)

leadSourceTypeId - (integer)

industryTypeId - (integer)

ratingTypeId - (integer)

The response is paginated, you can skip and limit the number if items retrieved. Also take a look at the API V3: sorting and filtering for additional switches you can use.

You can output additional fields to those listed above as default, see the API v3 Discovery APP for additional details.

Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /webresources/api/v3/sites/current/companies/[company_ID]

Alternatively, use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.

Response

The details for the specified company ID in JSON format.

id - the id of the company (integer)

siteId - the id of the site (integer)

externalId - the external ID (integer)

ownBy - the ID of the company's owner (integer)

ownDate - the date the owner was added (integer)

company - the company's name (string)

abn - the company's "Registration"(string)

companyTypeId - (integer)

customerTypeId - (integer)

leadSourceTypeId - (integer)

industryTypeId - (integer)

ratingTypeId - (integer)

The response is paginated, you can return only a few of the company's fields. Take a look at the API V3: sorting and filtering for additional switches you can use.

Create a company record

Request

Method: POST

Version: v3

Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /webresources/api/v3/sites/current/companies/

Alternatively, use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.

Edit a company's details

Request

Method: PUT

Version: v3

Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /webresources/api/v3/sites/current/companies/[company_ID]

Alternatively, use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.

Delete a company record

Request

Method: DELETE

Version: v3

Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /webresources/api/v3/sites/current/companies/[company_ID]

Alternatively, use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.