Recommendation Request API

Note

Usage of this API is restricted to approved partners, subject to limitations via API agreement. All API requests are represented in protocol 2.0.0. Therefore, all API requests require the header X-Restli-Protocol-Version: 2.0.0

With the Recommendation Requests API, you can replicate the full LinkedIn experience around recommendation requests of LinkedIn members.

Create Recommendation Requests

Create a recommendation by issuing a POST that specifies the requestee and notification. You can only send recommendation requests on behalf of the authenticated user.

POST https://api.linkedin.com/v2/recommendationRequest

Request Body Fields

Field Name Format Description
notification   Notification of this recommendation request.
notification.message String Message that requester sends to requestee.
notification.subject String Subject of the message that requester sends to requestee.
previousRecommendation optional Urn If this recommendation replaces an old recommendation, this field should be the urn of the old recommendation.
requestee Urn The requestee represented in personUrn.
requesteeEntity optional Urn The requestee's entity. For example: urn:li:position:(urn:li:person:, )
requesterEntity optional Urn The requester's entity. For example: urn:li:position:(urn:li:person:, )
relationship optional String Relationship between recommender and recommendee. Can be the following enum values:
  • RECOMMENDER_MANAGED_RECOMMENDEE - Relation where the recommender managed the recipient.
  • RECOMMENDER_REPORTED_TO_RECOMMENDEE - Relation where the recommendee is more senior that the recipient.
  • RECOMMENDER_SENIOR_THAN_RECOMMENDEE - Relation where the recipient is more senior that the recommendee.
  • RECOMMENDEE_SENIOR_THAN_RECOMMENDER - Relation where the recommendee is more senior that the recipient.
  • WORKED_IN_SAME_GROUP - Relation where both recipient and recommendee worked in the same company.
  • WORKED_IN_DIFFERENT_GROUPS - Relation where both recipient and recommendee worked in different groups.
  • WORKED_IN_DIFFERENT_COMPANIES - Relation where both recipient and recommendee worked in different companies.
  • RECOMMENDEE_IS_CLIENT_OF_RECOMMENDER - Relation where recommendee is a client of the recipient.
  • RECOMMENDER_IS_CLIENT_OF_RECOMMENDEE - Relation where the recipient is a client of the recommendee.
  • RECOMMENDER_TAUGHT_RECOMMENDEE - Relation where the recipient taught the recommendee.
  • RECOMMENDER_ADVISED_RECOMMENDEE - Relation where the recipient advised the recommendee.
  • RECOMMENDER_STUDIED_WITH_RECOMMENDEE - Relation where the recipient studied with the recommendee.

sample request body

{
    "notification": {
        "message": "Can you write me a recommendation? Thanks!",
        "subject": "Recommendation request!!"
    },
    "requestee": "urn:li:person:444FFF"
}

sample response header

X-RestLi-Id: urn:li:recommendationRequest:(urn:li:person:123ABC,123456)

Retrieve Recommendation Requests

Once a recommendation request has been created, you can retrieve that recommendation request.

GET https://api.linkedin.com/v2/recommendationRequest/urn:li:recommendationRequest:(urn:li:person:123ABC,123456)

Above is the API request represented in pretty print. With X-Restli-Protocol-Version: 2.0.0, you will need to do the following:

GET https://api.linkedin.com/v2/recommendationRequest/urn%3Ali%3ArecommendationRequest%3A%28urn%3Ali%3Aperson%3A123ABC%2C123456%29

sample request body

{
    "created": 1490373303379,
    "id": 267254,
    "lastModified": 1490383550104,
    "numRequests": 1,
    "relationship": "RECOMMENDER_REPORTED_TO_RECOMMENDEE",
    "requestee": "urn:li:person:444FFF",
    "requesteeEntity": "urn:li:position:(urn:li:person:444FFF,40855915)",
    "requester": "urn:li:person:123ABC",
    "requesterEntity": "urn:li:position:(urn:li:person:123ABC,40170411)",
    "status": "PENDING"
}

For more information, refer to the Recommendation Request schema.

Alternatively, you can lookup multiple recommendation requests by doing the following:

GET https://api.linkedin.com/v2/recommendationRequest?ids=List(urn:li:recommendationRequest:(urn:li:person:123ABC,123456),urn:li:recommendationRequest:(urn:li:person:123ABC,456789))

Above is the API request represented in pretty print. With X-Restli-Protocol-Version: 2.0.0, you will need to do the following:

GET https://api.linkedin.com/v2/recommendationRequest?ids=List(urn%3Ali%3ArecommendationRequest%3A%28urn%3Ali%3Aperson%3A123ABC%2C123456%29,urn%3Ali%3ArecommendationRequest%3A%28urn%3Ali%3Aperson%3A123ABC%2C456789%29)

Retrieve Recommendation Request by Recipient

You can look up the recommendation requests the authenticated member has received by requesting the following API:

GET https://api.linkedin.com/v2/recommendationRequest?q=recipient&statusFilters=List(ACCEPTED,PENDING)

Query Parameters

Field Description Required Format
statusFilters Status of the recommendation request. Can be the following enum values:
  • PENDING
  • DECLINED
  • FULFILLED
  • WITHDRAWN
  • POSITION_DELETED
Yes List of string

sample response

{
    "elements": [
        {
            "created": 1490383269808,
            "id": 269405,
            "lastModified": 1490383269809,
            "numRequests": 1,
            "requestee": "urn:li:person:123ABC",
            "requester": "urn:li:person:999AAA",
            "status": "PENDING"
        },
        {
            "created": 1490373303379,
            "id": 267254,
            "lastModified": 1490383550104,
            "numRequests": 1,
            "relationship": "RECOMMENDER_REPORTED_TO_RECOMMENDEE",
            "requestee": "urn:li:person:123ABC",
            "requesteeEntity": "urn:li:position:(urn:li:person:123ABC,40855915)",
            "requester": "urn:li:person:444FFF",
            "requesterEntity": "urn:li:position:(urn:li:person:444FFF,40170411)",
            "status": "PENDING"
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0,
        "total": 2
    }
}

Retrieve Recommendation Requests by Requester

You can look up the recommendation requests the authenticated member has requested with the following API:

GET https://api.linkedin.com/v2/recommendationRequest?q=requester&statusFilters=List(ACCEPTED,PENDING)

Query Parameters

Field Description Required Format
statusFilters Status of the recommendation. Can be the following enum values:
  • PENDING
  • VISIBLE
  • HIDDEN
  • WITHDRAWN
  • REPLACED
  • CLOSED
Yes List of string
entityFilters List of position or education Urns. Defaults to empty if not present. No. List of Urn

sample response

{
    "elements": [
        {
            "created": 1490383269808,
            "id": 269405,
            "lastModified": 1490383269809,
            "numRequests": 1,
            "requestee": "urn:li:person:999AAA",
            "requester": "urn:li:person:123ABC",
            "status": "PENDING"
        },
        {
            "created": 1490373303379,
            "id": 267254,
            "lastModified": 1490383550104,
            "numRequests": 1,
            "relationship": "RECOMMENDER_REPORTED_TO_RECOMMENDEE",
            "requestee": "urn:li:person:444FFF",
            "requesteeEntity": "urn:li:position:(urn:li:person:444FFF,40855915)",
            "requester": "urn:li:person:123ABC",
            "requesterEntity": "urn:li:position:(urn:li:person:123ABC,40170411)",
            "status": "PENDING"
        }
    ],
    "paging": {
        "count": 10,
        "links": [],
        "start": 0,
        "total": 2
    }
}

Update Recommendation Requests

You can update an recommendation request status, requesteeEntity, relationship, notification or previousRecommendation of one you have given or received by doing the following:

POST https://api.linkedin.com/v2/recommendationRequest/urn:li:recommendationRequest:(urn:li:person:123ABC,123456)

You can construct the recommendationUrn by taking the requester personUrn and th recommendationRequestID.

Example: urn:li:recommendationRequest:({**requester personUrn**},{**recommendationRequestID**})

Above is the API request represented in pretty print. With X-Restli-Protocol-Version: 2.0.0, you will need to do the following:

POST https://api.linkedin.com/v2/recommendationRequest/urn%3Ali%3ArecommendationRequest%3A%28urn%3Ali%3Aperson%3A123ABC%2C123456%29

sample response

{
    "patch": {
        "$set": {
            "status": "DECLINED"
        }
    }
}