Partager via


Update and Renew Jobs

Set the value for for jobPostingOperationType to UPDATE or RENEW to perform the respective job operation.

API Overview

Use the /simpleJobPosting API to create, update, renew and close jobs on LinkedIn. This wiki describes how to update and renew jobs. To know more about this API, refer to API Overview.

API Endpoint

Use the following endpoint to submit a task to create, close, update, or renew one or more jobs asynchronously:

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

API Authorization

All requests below require access tokens obtained via the OAuth2.0 Client Credentials flow.

Important

We strongly recommend to use same access token for all concurrent and consecutive calls. An access token has a lifespan of 30 mins. Only on expiry of the existing token, new token should be generated.

Sample Request for Update Jobs

In order to update a simple job posting, you can just re-post the job with any changed information and jobPostingOperationType field value set as UPDATE. To know the API Endpoint, Authorization and Throttling refer to Post Jobs on LinkedIn

Refer to Check the Job Operation Task Status for finding the status of update call.

Note

For basic jobs synced for Recruiter System Connect, if you need to update the availability from PUBLIC to PRIVATE_TO_ATS_INTEGRATION for a job, please close the existing job and re-open with the desired availability.

API Header

Authorization: Bearer {access token}
X-restli-method: batch_create

Sample Request Body

{
   "elements":[
      {
         "externalJobPostingId":"PremiumJobPostingSMM01",
         "title":"Social Media Management",
         "description":"<b>Objective of the Position</b><br/> <ul> <li>To develop digital content plan, manage and monitor different content executions for social and online platforms to maximize the communication effectiveness and impact</li> <li>To manage, monitor and keep optimizing the performance of social platforms of MB and AMG</li> <li>To monitor and manage internet word of mouth to keep the health of brand and product image</li></ul>",
         "contract":"urn:li:contract:{contract_id}",
         "integrationContext":"urn:li:company:{company_id}",
         "companyApplyUrl": "http://linkedin.com/jobpostingSMM01",
         "listingType":"PREMIUM",
         "jobPostingOperationType":"UPDATE",
         "location":"San Francisco, CA",
         "posterEmail":"recruiter_email@yourcompany.com"
      }
   ]
}

Error Codes

Given below is a list possible error codes that can display while updating a job.
One of the following responses is returned, that contains a JSON object with a status and a message about the error for Post on /simpleJobPostings.

HTTP CODE RESPONSE STATUS ERROR MESSAGE DESCRIPTION RESOLUTION
200 422 ERROR :: /{mandatory key} :: field is required but not found and has no default value Required field is missing in the request body Refer to the schema documentation and make sure all the required fields are present in the request body
200 422 ERROR :: /{attribute_name} :: {value} cannot be coerced to Long\n, (Why is \n coming in error message) When value of the attribute does not match the datatype it accepts,for example, title accepts String but we have provided numerical value Ensure that the value provided for attribute should match the datatype it accepts. Please refer to schema documentation for data types of the attributes
200 422 ERROR :: /{attribute_name} :: {value} cannot be coerced to Long\n,(Why is \n coming in error message) When value of the attribute does not match the datatype it accepts, for example, title accepts String but we have provided numerical value Enure the value provided for attribute should match the datatype it accepts. Please refer to schema documentation for data types of the attributes
200 422 ERROR :: /jobPostingOperationType :: "UPDATED" is not an enum symbol\n Wrong value provided for the field jobPostingOperationType The value should either be one of CREATE, UPDATE or CLOSE
400 400 Invalid company apply url for job with externalPartnerId <>, taskUrn <> The URL specified for the job posting is in an invalid format Ensure the url specified is in a valid url
401 401 Invalid access token Access token is tampered Regenerate a new access token
401 401 The token used in the request has expired The access token used in Authorization header is a valid token but it has expired Regenerate a new access token
403 403 Not enough permissions to access: POST /simpleJobPostings The application does not have enough permissions to use /simpleJobPostings API Access to /simpleJobPosting is limited and granted only to apps that have a product-relevant use case. Please reach out to LinkedIn via https://linkedin.zendesk.com/ to request access
403 403 Caller is not authorized to access the jobs for contract: urn:li:contract:{contract_id} The application used for posting premium job does not belong to the Job posting contract 1. Ensure that you are using the correct contract details provided in the Premium Job Posting onboarding email.
2. Ensure that you are using the correct application credentials
409 409 Cannot close job which is already closed or does not exist The request payload is trying to close a job which either does not exist or is already closed Ensure that the jobPostingOperationType value is CREATE while creating new job postings
422 422 ERROR :: /employmentStatus :: {value} is not an enum symbol Wrong value provided for the field employmentStatus The value should either be one of FULL_TIME, PART_TIME, CONTRACT, INTERNSHIP, TEMPORARY, VOLUNTEER or OTHER
422 422 ERROR :: /experienceLevel :: {value} is not an enum symbol Wrong value provided for the field experienceLevel The value should either be one of ENTRY_LEVEL, MID_SENIOR_LEVEL, DIRECTOR, EXECUTIVE, INTERNSHIP, ASSOCIATE or NOT_APPLICABLE
422 422 ERROR :: /state :: {value} is not an enum symbol Wrong value provided for the field state The value should either be one of LISTED or CLOSED
422 422 ERROR :: /{field} :: enum type is not backed by a String Field expects an enum value in the form of String but the value passed is not a string. For example state : 123
500 500 Internal Server Error When incorrect attribute type is given for example, Integer instead of String Please check if externalJobPostingId datatype is string in request body

Renew Jobs

To renew a job, re-post it with jobPostingOperationType field as RENEW and no other changes. The renewal operation extends the expiration of job posts by 30 days.

To know the API Endpoint, Authorization and Throttling refer to Post Jobs on LinkedIn

There are two alternate ways to renew job postings:

  1. Close previous jobs, and re-post jobs without any changes
  2. Publish new jobs with different externalJobPostingId