Post and Update a job
AvailableThe job is a json-encoded object in the content. The job model is described below.
HTTP Request [POST]
https://parceiros.empregos.com.br/api/job
- cURL
- C#
- JavaScript
- Python
curl -X 'POST' \
'https://parceiros.empregos.com.br/api/job' \
-H 'accept: */*' \
-H 'Authorization: bearer any' \
-H 'Content-Type: application/json' \
-d '{
"company": {
"applyUrl": "string",
"name": "string",
"logoUrl": "string",
"description": "string",
"industries": "Alimentos",
"companyId": "string",
"recruiterId": "string",
"nationalRegister": "string",
"recruiterName": "string",
"recruiterEmail": "string"
},
"externalJobPostingId": "string",
"jobPostingOperationType": "CREATE",
"title": "string",
"description": "string",
"location": {
"address": "Praça da República, São Paulo, SP",
"postalCode": "01045-000",
"geolocation": "-23.5440722,-46.6450811"
},
"salary": {
"min": 0,
"max": 0
},
"workplaceTypes": "On-site",
"employmentStatus": "string",
"experienceLevel": "string",
"trackingPixelUrl": "string",
"expireAt": "2023-12-26T14:10:50.530Z"
}'
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
class Program
{
private const string ApiUrl = "https://parceiros.empregos.com.br/api/job";
static async Task Main(string[] args)
{
await CreateJob();
}
static async Task CreateJob()
{
using (HttpClient httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Accept.Clear();
httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("*/*"));
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", "any");
var jobData = new
{
company = new
{
applyUrl = "string",
name = "string",
logoUrl = "string",
description = "string",
industries = "Alimentos",
companyId = "string",
recruiterId = "string",
nationalRegister = "string",
recruiterName = "string",
recruiterEmail = "string"
},
externalJobPostingId = "string",
jobPostingOperationType = "CREATE",
title = "string",
description = "string",
location = new
{
address = "Praça da República, São Paulo, SP",
postalCode = "01045-000",
geolocation = "-23.5440722,-46.6450811"
},
salary = new
{
min = 0,
max = 0
},
workplaceTypes = "On-site",
employmentStatus = "string",
experienceLevel = "string",
trackingPixelUrl = "string",
expireAt = "2023-12-26T14:10:50.530Z"
};
var jsonData = JsonConvert.SerializeObject(jobData);
var content = new StringContent(jsonData, System.Text.Encoding.UTF8, "application/json");
var response = await httpClient.PostAsync(ApiUrl, content);
if (response.IsSuccessStatusCode)
{
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Job created successfully: {result}");
}
else
{
Console.WriteLine($"Failed to create job. Status Code: {response.StatusCode}");
}
}
}
}
const apiUrl = "https://parceiros.empregos.com.br/api/job";
const data = {
company: {
applyUrl: "string",
name: "string",
logoUrl: "string",
description: "string",
industries: "Alimentos",
companyId: "string",
recruiterId: "string",
nationalRegister: "string",
recruiterName: "string",
recruiterEmail: "string",
},
externalJobPostingId: "string",
jobPostingOperationType: "CREATE",
title: "string",
description: "string",
location: {
address: "Praça da República, São Paulo, SP",
postalCode: "01045-000",
geolocation: "-23.5440722,-46.6450811",
},
salary: {
min: 0,
max: 0,
},
workplaceTypes: "On-site",
employmentStatus: "string",
experienceLevel: "string",
trackingPixelUrl: "string",
expireAt: "2023-12-26T14:10:50.530Z",
};
fetch(apiUrl, {
method: "POST",
headers: {
Accept: "_/_",
Authorization: "bearer any",
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
import requests
import json
url = 'https://parceiros.empregos.com.br/api/job'
headers = {
'accept': '*/*',
'Authorization': 'bearer any',
'Content-Type': 'application/json'
}
data = {
"company": {
"applyUrl": "string",
"name": "string",
"logoUrl": "string",
"description": "string",
"industries": "Alimentos",
"companyId": "string",
"recruiterId": "string",
"nationalRegister": "string",
"recruiterName": "string",
"recruiterEmail": "string"
},
"externalJobPostingId": "string",
"jobPostingOperationType": "CREATE",
"title": "string",
"description": "string",
"location": {
"address": "Praça da República, São Paulo, SP",
"postalCode": "01045-000",
"geolocation": "-23.5440722,-46.6450811"
},
"salary": {
"min": 0,
"max": 0
},
"workplaceTypes": "On-site",
"employmentStatus": "string",
"experienceLevel": "string",
"trackingPixelUrl": "string",
"expireAt": "2023-12-26T14:10:50.530Z"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
Parameters [Request]
| Field | Description | Type | Required |
|---|---|---|---|
| company | Represents the company that posted the job. | Object | Yes |
| company.applyUrl | URL to which candidates are directed to apply (typically the URL of the job on the client's website or ATS system) | String | No |
| company.name | The company name for which this job posting is created for. | String | Yes |
| company.logoUrl | The company logo url. | String | No |
| company.description | Description of the company's activities. | String | Yes |
| company.industries | Represents industries of this job or company. EG: "Alimentos". | String | No |
| company.companyId | Represents unique company id within the partner system. Do not send an empty or null string for this field. The maximum allowed length is 50 characters. | String | No |
| company.recruiterId | Represents unique recruiter id within the partner system. Do not send an empty or null string for this field. The maximum allowed length is 50 characters. | String | No |
| company.recruiterName | Represents the name of the recruiter who posted the job. Do not send an empty or null string for this field. The maximum allowed length is 200 characters. | String | Yes |
| company.recruiterEmail | Represents the email of the recruiter who posted the job. Do not send an empty or null string for this field. The maximum allowed length is 200 characters. | String | Yes |
| company.nationalRegister | National Register of Legal Entity ID. EG: The Brazilian CNPJ. Do not send an empty or null string for this field. The maximum allowed length is 200 characters. | String | Yes |
| externalJobPostingId | Represents unique job id within the partner system. Do not send an empty or null string for this field. The maximum allowed length is 200 characters. | String | Yes |
| jobPostingOperationType | Represents the operation on the job posting. Available operation options are: CREATE, UPDATE (case-insensitive). To close a job use Close a job. RENEW is not implemented yet and is rejected with "Tipo da operação não implementado.". | String | Yes |
| title | Represents the title of the job posting that will be published. Character limit: 200 | String | Yes |
| description | Represents the job description including the job basic information, responsibility and so on. Character limit: 100 ~ 25,000. Limited set of HTML tags accepted: b, strong, u, i, br, p, ul, li, em. | String | Yes |
| location | Represents the geographic location of the job position to hire. | Object | Yes |
| location.address | Represents the address of the job position to hire. EG: "Praça da República, São Paulo, SP". Note: Set “Brazil” for undetermined locals. The maximum allowed length is 100 characters. | String | Yes |
| location.postalCode | Represents the Postal Code of the job position to hire. EG: "01045-000" | String | No |
| location.geolocation | Represents the latitude and longitude of the job position to hire. EG: "-23.5440722,-46.6450811" | String | No |
| workplaceTypes | Represents the workplace nature of the job. Available options are: On-site, Hybrid or Remote (case-insensitive; the hyphen is optional). There is no default value: omitting it or sending another value is rejected. | String | Yes |
| employmentStatus | Represents employment status of the job position. Available options are: FULL_TIME, PART_TIME, CONTRACT, INTERNSHIP, TEMPORARY, VOLUNTEER. | String | No |
| experienceLevel | Represents experience level of the job position to hire. Available options are: ENTRY_LEVEL, MID_SENIOR_LEVEL, DIRECTOR, EXECUTIVE, INTERNSHIP, ASSOCIATE, NOT_APPLICABLE. | String | No |
| trackingPixelUrl | URL for the tracking pixel to be embedded on the job description | String | No |
| salary | Salary range offered for the job. | Object | No |
| salary.min | Minimum salary. | Int | No |
| salary.max | Maximum salary. | Int | No |
| expireAt | The date when a job should expire and no longer be available to users. This date should be greater than the current date. If this field is not provided, the default expiration is 90 days. | DateTime | No |
Responses
-
200 OK: job created or updated.
{
"success": true,
"message": "Gravado com sucesso!",
"url": "https://www.empregos.com.br/vaga/123456"
}urlis the public address of the job on Empregos, in the formathttps://www.empregos.com.br/vaga/{jobId}. It is returned on every successful create and update. It isnullonly if the job id is not available. -
400 Bad Request: validation failed, the job already exists (CREATE with an existing
externalJobPostingId), or an unexpected error occurred. Each entry oferrorMessagesnames the offending field inpropertyName(empty for general errors).{
"success": false,
"errorMessages": [
{
"propertyName": "WorkplaceTypes",
"message": "Ambiente de trabalho é requirido."
}
]
} -
401 Unauthorized: missing or invalid bearer token. See Security.
| Response field | Description | Type |
|---|---|---|
| success | true when the job was saved. | Boolean |
| message | Result message (text in Portuguese). On failure, see errorMessages instead. | String |
| url | Public URL of the job on Empregos (https://www.empregos.com.br/vaga/{jobId}). Present on success. | String |
| errorMessages | List of errors (only on failure). | Array |
| errorMessages.propertyName | Name of the field that failed validation. Empty for general errors. | String |
| errorMessages.message | Description of the error (text in Portuguese). | String |