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 |
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 | |
Members can follow companies to receive updates for company activities such as new job postings, employment changes and new products | |
The Company add comment API provides the ability to add comment for a particular company page | |
Use the Company Search API to find companies using keywords, industry, or location. It returns a collection of matching companies | |
checkShare | Check the member has admin privileges or not. |
getAdditionalProfileInfo | The Company Statistics API provides the ability to retrieve profile details for a particular company page |
getcommentsForSpecificUpdate | The Company Statistics API provides the ability to retrieve comments for a particular company page |
getCompanyProfile | The Company Profile API Retrieves and displays one or more company profiles |
getCompanySpecificUpdate | The Company Statistics API provides the ability to retrieve specific updates for a particular company page |
getCompanyUpdate | The Company Statistics API provides the ability to retrieve updates for a particular company page |
getfollowers | The Company Statistics API provides the ability to retrieve no of followers for a particular company page |
getHistoricalFollowers | The Company Statistics API provides the ability to retrieve historical followers for a particular company page |
gethistoricalStatusUpdate | The Company Statistics API provides the ability to retrieve historical followers update for a particular company page |
getLikesForCompanyUpdate | The Company Statistics API provides the ability to retrieve likes for status update a particular company page |
listCompanyByMember | The Company Profile API Retrieves and displays members of company profiles |
searchCompanyPage | The 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.
<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.
1 = considered parameter 0 = not considered parameter
Sample request
Following is a sample REST request that can be handled by the companyLookup
operation.
{ "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.
<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.
{ "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.
<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.
{ "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.
<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.
{ "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
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".
<?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>