This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »



Overview

The following operations allow you to work with Companies. Click an operation name to see details on how to use it.

For a sample proxy service the illustrates how to work with companies, see Sample configuration. 

Operation

Description

companyLookup

The Company Profile API retrieves and displays one or more company profiles based on the company ID or universal name. Also, it returns basic company profile data such as name, Web site, and industry, and handles additional company content such as RSS stream and Twitter feed

followCompanyPage

Members can follow companies to receive updates for company activities such as new job postings, employment changes and new products

addComment

The Company add comment API provides the ability to add comment for a particular company page

searchCompanyPage

Use the Company Search API to find companies using keywords, industry, or location. It returns a collection of matching companies

checkShareCheck the member has admin privileges or not.
getAdditionalProfileInfoThe Company Statistics API provides the ability to retrieve profile details for a particular company page
getcommentsForSpecificUpdateThe Company Statistics API provides the ability to retrieve comments for a particular company page
getCompanyProfileThe Company Profile API Retrieves and displays one or more company profiles
getCompanySpecificUpdateThe Company Statistics API provides the ability to retrieve specific updates for a particular company page
getCompanyUpdateThe Company Statistics API provides the ability to retrieve updates for a particular company page
getfollowersThe Company Statistics API provides the ability to retrieve no of followers for a particular company page
getHistoricalFollowersThe Company Statistics API provides the ability to retrieve historical followers for a particular company page
gethistoricalStatusUpdateThe Company Statistics API provides the ability to retrieve historical status update for a particular company page
getLikesForCompanyUpdateThe Company Statistics API provides the ability to retrieve likes for status update a particular company page
listCompanyByMemberThe Company Profile API Retrieves and displays members of company profiles
searchCompanyPageThe Company Search API enables search across company pages

Operation details

This section provides details on each of the operations.

Company lookup API and fields

The Company Profile API retrieves and displays one or more company profiles based on the company ID or universal name. Also, it returns basic company profile data such as name, Web site, and industry, and handles additional company content such as RSS stream and Twitter feed.

companyLookUp
<linkedin.companyLookup>
	<companyId>{$ctx:companyId}</companyId>
    <universalName>{$ctx:universalName}</universalName>
    <emailDomains>{$ctx:emailDomains}</emailDomains>
    <companyAdmin>{$ctx:companyAdmin}</companyAdmin>
    <fieldSelectors>{$ctx:fieldSelectors}</fieldSelectors>
</linkedin.companyLookup>

Properties

  • companyId: The unique internal numeric company identifier.
  • universalName: Required - The unique string identifier for a company.  
  • emailDomains: Company email domains.
  • companyAdmin: Lists all the companies that the authenticated user is an administrator of.
  • fieldSelectors: Field selectors are specified after the resource identifiers and path components of a resource, prefixed by a colon, contained within parentheses, and separated by commas. Fields will be returned in the order specified. When URL-encoding your resource URLs, ensure that the parentheses used in selectors remain un-escaped. Remember, each field you select adds computation time to your API request. It's best to be very specific as to what fields you want returned in each API call you make.
Note: Based on the parameters getting passed, the end URL must get changed. The below table describes how the end point changes with the parameter combination changes.

1 = considered parameter    0 = not considered parameter

Sample request

Following is a sample REST request that can be handled by the companyLookup operation.

Sample request for companyLookup
{
"accessToken":"AQUTf-7ouUMipARXfNVowT6ikytQsmVdf3VIo648_iksSI4uBeAv5aqlmpoL0_m4nZ3bG8nyK7wqZRyJKqLTsOAHLDnGpqGf0tFb8F4pSy_dtbJoaFGuIdoD8PjipKpyIorZXgR1wjpyynowzEJ9YX9Poj6AXbRWTRsnKpRNZzwEQB4YAv8",
"apiUrl":"https://api.linkedin.com",
"companyId":"162479",
"universalName":"linkedin",
"emailDomains":"apple.com",
"companyAdmin":"true",
"fieldSelectors":"id"
}

Related LinkedIn documentation

http://developer.linkedin.com/documents/company-lookup-api-and-fields

Company follow and suggestions

Members can follow companies to receive updates for company activities such as new job postings, employment changes, and new products. You can use the API to access companies the current member is following and to enable that member to start or stop following a company.

followCompanyPage
<linkedin.followCompanyPage>
	<companyId>{$ctx:companyId}</companyId>
	<executeFunction>{$ctx:executeFunction}</executeFunction>
	<fieldSelectors>{$ctx:fieldSelectors}</fieldSelectors>
</linkedin.followCompanyPage>

Properties

  • companyId: The unique ID for the suggested company.
  • executeFunction: start - Start following a company.
                                    stop - Stop following a company.
                                    defaut - You can retrieve a collection of suggested companies for the current user.
  • fieldSelectors: Field selectors are specified after the resource identifiers and path components of a resource, prefixed by a colon, contained within parentheses, and separated by commas. Fields will be returned in the order specified. When URL-encoding your resource URLs, ensure that the parentheses used in selectors remain unescaped. Remember, each field you select adds computation time to your API request. It's best to be very specific as to what fields you want returned in each API call you make.
Sample request

Following is a sample REST request that can be handled by the followCompanyPage operation.

Sample request for followCompanyPage
{
"accessToken":"AQWgmas8lbtPme5CbjSxCY-rTmqU6tv63bH2D78dcxHKHcWMW6NTmCUeaIbebuMj1aw7sByjpDFL6Z_3c0WPvpxM00JGUIx5d8_RpE80sYWD0Qz5haqcY6Z7HjjLU2-zJs7pbX3H4FFsUWIJARap6MnxMYwpKWNJs_7K00xRMBnt2r45Tzs",
"apiUrl":"https://api.linkedin.com",
"companyId":"66028",
"executeFunction":"start",
"fieldSelectors":"id"
}
Related LinkedIn documentation

http://developer.linkedin.com/documents/company-follow-and-suggestions

Company search

Use the Company Search API to find companies using keywords, industry, or location. It returns a collection of matching companies. Each entry can contain much of the information available on the company page.

searchCompanyPage
<linkedin.searchCompanyPage>
	<refineResults>{$ctx:refineResults}</refineResults>
    <keywords>{$ctx:keywords}</keywords>
    <isHqOnly>{$ctx:isHqOnly}</isHqOnly>
    <facet>{$ctx:facet}</facet>
    <facets>{$ctx:facets}</facets>
    <start>{$ctx:start}</start>
    <count>{$ctx:count}</count>
    <sort>{$ctx:sort}</sort>
</linkedin.searchCompanyPage>

Properties

  • refineResults: Comma separated values refine the results that need to be retrieved from the API. For example, the above method would return the facets, ID and Web site URL of the company.
  • keywords: Companies that have all the keywords anywhere in their listing. Multiple words should be separated by a space. (Don't forget to URL encode this data.)
  • isHqOnly: Matching companies by the location of the headquarters. When this is set to "true" and a location facet is used, this restricts returned companies to only those whose headquarters resides in the specified location.
  • facet: Facet values to search over.
  • facets: Facet buckets to return.
  • start: Start location within the result set for paginated returns. This is the zero-based ordinal number of the search return, not the number of the page. To see the second page of 10 results per page, specify 10, not 1. Ranges are specified with a starting index and a number of results (count) to return. The default value is 0.
  • count: The number of jobs to return. Values can range between 0 and 110. The default value is 10. The total number of results available to any user depends on the user's account level.
  • sort: Controls the search result order. Options would be relevance or relationship.

 

Sample request

Following is a sample REST request that can be handled by the searchCompanyPage operation.

Sample request for searchCompanyPage
{
"accessToken":"AQXpiC74J2e67w7RPX2sgVL3W5F5R1d3TVOwzpII13XHJNlDWjrvbCW0lpiWBR2_H8PYqlN2oQQ0ZkziU_E0HtYjKRFGLleagMKZVwJEx5sFIal_kYakEbd7IFGhm979SxCtvFaP6S3CVXRjqlRIVcTWwz1ePo5nhyeR7S1R2tuyEp76q5I",
"apiUrl":"https://api.linkedin.com",
"refineResults":"facets,companies:(id,website-url)",
"keywords":"mobile",
"isHqOnly":"true",
"facet":"location,us:0,fr:0",
"facets":"network",
"start":"5",
"count":"15",
"sort":"followers"
}

Related LinkedIn documentation

http://developer.linkedin.com/documents/company-search

Company checkShare

The Company Statistics API provides the ability to retrieve statistics for a particular company page. These stats can give you insights on both company share and follower metrics. Currently, the numbers provided are not real-time numbers. The analytical breakdown for a company page is provided on a daily basis.

checkShare
 <linkedin.checkShare>
  <companyId>{$ctx:companyId}</companyId>
</linkedin.checkShare>

Properties: 

  • companyId: Required - The unique ID for the suggested company.
Sample request

Following is a sample REST request that can be handled by the checkShare operation.

Sample request for checkShare
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#sharing_enabled

Retrieve profile information

The Company Statistics API provides the ability to retrieve statistics for a particular company page.This call will return profile information about the company specified by the id value in the request.

getAdditionalProfileInfo
 <linkedin.getAdditionalProfileInfo>
    <companyId>{$ctx:companyId}</companyId>
    <properties>{$ctx:properties}</properties>
</linkedin.getAdditionalProfileInfo>

Properties

  • companyId: Required - The unique ID for the suggested company.

  • properties: specify the needed fields(id,name,description).

Sample request

Following is a sample REST request that can be handled by the getAdditionalProfileInfo operation.

Sample request for getAdditionalProfileInfo
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"properties":"name"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#company_profile

Retrieve comments for specific updates

The Company Statistics API provides the ability to retrieve statistics for a particular company page.This call will return all of the comments for the company update identified by update key for the company identified by the {id} value in the request. 

getcommentsForSpecificUpdate
 <linkedin.getcommentsForSpecificUpdate>
    <companyId>{$ctx:companyId}</companyId>
    <updateKey>{$ctx:updateKey}</updateKey>
</linkedin.getcommentsForSpecificUpdate>

Properties

  • companyId: Required - The unique ID for the suggested company.

  • updateKey: The unique identifier for company update.

Sample request

Following is a sample REST request that can be handled by the getAdditionalProfileInfo operation.

Sample request for getAdditionalProfileInfo
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"updateKey":"PDATE-c2414183-60290167965427008"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#get_update_comments

Update the company profile.

The Company Statistics API provides the ability to retrieve statistics for a particular company page.This call will return a single specific company update record for the company identified by the {id} value and the update identified by the {update-key} value in the request.

getCompanyUpdate
 <linkedin.getCompanyUpdate>
    <companyId>{$ctx:companyId}</companyId>
    <eventType>{$ctx:eventType}</eventType>
    <start>{$ctx:start}</start>
    <count>{$ctx:count}</count>
</linkedin.getCompanyUpdate>

Properties

  • companyId: Required - The unique ID for the suggested company.

  • count: Maximum number of updates to return.

  • start: The offset value for paginating update results.

Sample request

Following is a sample REST request that can be handled by the getCompanySpecificUpdate operation.

Sample request for getCompanyUpdate
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"count":"2",
"start":"1"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#company_updates

update the profile with specific fields

The Company Statistics API provides the ability to retrieve statistics for a particular company page.This call will return a single specific company update record for the company identified by the {id} value and the update identified by the {update-key} value in the request.

getcommentsForSpecificUpdate
 <linkedin.getCompanySpecificUpdate>
    <companyId>{$ctx:companyId}</companyId>
    <updateKey>{$ctx:updateKey}</updateKey>
</linkedin.getCompanySpecificUpdate>

Properties

  • companyId: Required - The unique ID for the suggested company.

  • updateKey: The unique identifier for company update.

Sample request

Following is a sample REST request that can be handled by the getCompanySpecificUpdate operation.

Sample request for getCompanySpecificUpdate
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"updateKey":"PDATE-c2414183-60290167965427008"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#get_update

 

  Retrieve company's followers information

The Company Statistics API provides the ability to retrieve statistics for a particular company page.This request allows you to get a follower-count for a specific segment to ensure you are at or over the minimum requirement for the target segment for the company specified by the {id} value in the request.

getfollowers
 <linkedin.getfollowers>
    <companyId>{$ctx:companyId}</companyId>
    <geos>{$ctx:eventType}</geos>
    <jobFunc>{$ctx:jobFunc}</jobFunc>
    <industries>{$ctx:industries}</industries>
    <seniorities>{$ctx:seniorities}</seniorities>
    <companySizes>{$ctx:companySizes}</companySizes>
</linkedin.getfollowers>

Properties: 

  • companyId: Required - The unique ID for the suggested company.

  • geos : Segment by a particular geographic area.

  • jobFunc : Segment by a particular company size targeting code.

  • industries : Segment by member industry.

  • seniorities: Segment by member seniority level targeting code.

  • companySizes : Segment by a particular geographic area.

Sample request

Following is a sample REST request that can be handled by the getfollowers operation.

Sample request for getfollowers
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"geos":"af"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#get_followers

 Retrieve historical followers information

This call retrieves statistics about followers for a particular company page identified by the {id} value in the request.

getHistoricalFollowers
 <linkedin.getHistoricalFollowers>
    <companyId>{$ctx:companyId}</companyId>
    <timeGranularity>{$ctx:timeGranularity}</timeGranularity>
    <startTimestamp>{$ctx:startTimestamp}</startTimestamp>
    <endTimestamp>{$ctx:endTimestamp}</endTimestamp>
</linkedin.getHistoricalFollowers>

Properties: 

  • companyId: Required - The unique ID for the suggested company.

  • timeGranularity: Granularity of statistics eg values:day,month.

  • startTimestamp: Starting timestamp of when the stats search should begin (milliseconds since epoch).

  • endTimestamp: Ending timestamp of when the stats search should end (milliseconds since epoch).

Sample request

Following is a sample REST request that can be handled by the getHistoricalFollowers operation.

Sample request for getHistoricalFollowers
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"timeGranularity": "day",
"startTimestamp": "421797310000"
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#historical_followers

 Retrieve historical status update details.

The Historical Status Update Statistics API provides impression and engagement data on company shares for a given company page.

getLikesForCompanyUpdate
 <linkedin.gethistoricalStatusUpdate>
    <companyId>{$ctx:companyId}</companyId>
    <updateKey>{$ctx:updateKey}</updateKey>
    <timeGranularity>{$ctx:timeGranularity}</timeGranularity>
    <startTimestamp>{$ctx:startTimestamp}</startTimestamp>
    <endTimestamp>{$ctx:endTimestamp}</endTimestamp>
</linkedin.gethistoricalStatusUpdate>

Properties: 

  • companyId: Required - The unique ID for the suggested company.

  • udateKey: The unique identifier for company update.

  • companyId: Required - The unique ID for the suggested company.

  • timeGranularity: Granularity of statistics eg: values:day,month.

  • startTimestamp: Starting timestamp of when the stats search should begin (milliseconds since epoch).

  • endTimestamp: Ending timestamp of when the stats search should end (milliseconds since epoch).

Following is a sample REST request that can be handled by the gethistoricalStatusUpdate operation.

Sample request for gethistoricalStatusUpdate
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"updateKey":"UPDATE-c2414183-6029016867488677888" 
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#historical_updates

Retrieve likes for company upadates.

The Historical Status Update Statistics API provides impression and engagement data on company shares for a given company page.

getLikesForCompanyUpdate
 <linkedin.getLikesForCompanyUpdate>
    <companyId>{$ctx:companyId}</companyId>
    <updateKey>{$ctx:updateKey}</updateKey>
</linkedin.getLikesForCompanyUpdate>

Properties: 

  • companyId: Required - The unique ID for the suggested company.

  • udateKey: The unique identifier for company update.

Following is a sample REST request that can be handled by the getLikesForCompanyUpdate operation.

Sample request for getLikesForCompanyUpdate
{
"apiUrl":"https://api.linkedin.com",
"accessToken":"AQUDwVyNpxmDdVgdBB0V3yOrdyeEpbaPoZveoYH5jH5p-dIVBRyGZoeU2l0JaHv4LhLa0sOjZgBkS2TCN8V5ilZ3h3pKb_2Nkym2gvSXEWyvg-wqbExzXuLS1s9oMRB_jzmVHSFGDbQCLczvqpi_IwbPSfnKjw4ySISwI5T_W44Q1cWQ2eY",
"companyId":"32873",
"updateKey":"UPDATE-c2414183-6029016867488677888" 
}
Related LinkedIn documentation

https://developer.linkedin.com/docs/company-pages#get_update_likes

Sample configuration

Following is a sample proxy service that illustrates how to connect to LinkedIn with the init operation and use the companyLookup operation to list the changes the user made. The sample request for this proxy can be found in companyLookup sample request.You can use this sample as a template for using other operations in this category.

As a best practice, create a separate sequence for handling the response payload for errors. In the following sample, this sequence is "faultHandlerSeq".

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="linkedinCompanyLookup"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="accessToken" expression="json-eval($.accessToken)"/>
         <property name="universalName" expression="json-eval($.universalName)"/>
         <property name="companyId" expression="json-eval($.companyId)"/>
         <property name="emailDomains" expression="json-eval($.emailDomains)"/>
         <property name="companyAdmin" expression="json-eval($.companyAdmin)"/>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="fieldSelectors" expression="json-eval($.fieldSelectors)"/>
         <linkedin.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </linkedin.init>
         <linkedin.companyLookup>
            <companyId>{$ctx:companyId}</companyId>
            <universalName>{$ctx:universalName}</universalName>
            <emailDomains>{$ctx:emailDomains}</emailDomains>
            <companyAdmin>{$ctx:companyAdmin}</companyAdmin>
            <fieldSelectors>{$ctx:fieldSelectors}</fieldSelectors>
         </linkedin.companyLookup>
		 <property name="messageType" value="application/json" scope="axis2" />
         <filter source="$axis2:HTTP_SC" regex="^[^2][0-9][0-9]">
            <then>
               <property name="ERROR_CODE" expression="$axis2:HTTP_SC"/>
               <switch source="$axis2:HTTP_SC">
                  <case regex="401">
                     <property name="ERROR_MESSAGE" value="Unauthorized"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
                  <case regex="403">
                     <property name="ERROR_MESSAGE" value="Forbidden"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
                  <case regex="404">
                     <property name="ERROR_MESSAGE" value="Not Found"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
                  <case regex="400">
                     <property name="ERROR_MESSAGE" value="Bad Request"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
               </switch>
               <sequence key="faultHandlerSeq"/>
            </then>
         </filter>
         <respond/>
      </inSequence>
      <outSequence>
        <send/>
      </outSequence>
   </target>
   <description/>
</proxy>
                                
  • No labels