Post Questions
FutureThis section provides API specification for the optional Questions to be attached to an existing job listing, sometimes known as screening or pre-screening questions — a short series of questions presented to your applicants during the application process.
HTTP Request [POST]
https://parceiros.empregos.com.br/api/questions/{externalJobPostingId}
- 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 '{
"id": "string",
"type": 0,
"question": "string",
"required": true
}'
using System;
using System.Net.Http;
using System.Text;
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
{
id = "string",
type = 0,
question = "string",
required = true
};
var jsonData = JsonConvert.SerializeObject(jobData);
var content = new StringContent(jsonData, 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 externalJobPostingId = "string";
const apiUrl = `https://parceiros.empregos.com.br/api/questions/${externalJobPostingId}`;
const data = {
id: "string",
type: 0,
question: "string",
required: true,
};
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 = {
"id": "string",
"type": 0,
"question": "string",
"required": true
}
response = requests.post(url, headers=headers, data=json.dumps(data))
Parameters [Request]
Field | Description | Type | Required |
---|---|---|---|
id | A unique identifier for this question. This can just be the ordinal number of the question (i.e. 1, 2, 3...) if you don’t already have an identifier for your questions. | String | Yes |
type | The question type, which determines the appearance of the question to your applicants, as well what other fields are required and optional for the question here. The following types are valid: text, date, select, multiselect and upload. | Enum | Yes |
question | The question text shown to applicants. Simple HTML formatting, like paragraphs and emphasis, is permitted. | String | No |
required | Boolean, Optional. If present and true, this question cannot be skipped by applicants, and is required in order for the application to be considered complete and delivered to you. | Boolean | No |