Close a job
AvailableThis request closes a specific job.
HTTP Request [DELETE]
https://parceiros.empregos.com.br/api/job/{externalJobPostingId}
- cURL
- C#
- JavaScript
- Python
curl -X 'DELETE' \
'https://parceiros.empregos.com.br/api/job/{externalJobPostingId}' \
-H 'accept: */*' \
-H 'Authorization: bearer any'
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
private const string ApiUrlBase = "https://parceiros.empregos.com.br/api/job/";
private const string ExternalJobPostingId = "YOUR_EXTERNAL_JOB_POSTING_ID";
static async Task Main(string[] args)
{
await DeleteJob();
}
static async Task DeleteJob()
{
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 apiUrl = ApiUrlBase + ExternalJobPostingId;
var response = await httpClient.DeleteAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
Console.WriteLine($"Job with ID {ExternalJobPostingId} deleted successfully.");
}
else
{
Console.WriteLine($"Failed to delete job with ID {ExternalJobPostingId}. Status Code: {response.StatusCode}");
}
}
}
}
const externalJobPostingId: "string";
const apiUrl = `https://parceiros.empregos.com.br/api/job/${externalJobPostingId}`;
fetch(apiUrl, {
method: "DELETE",
headers: {
Accept: "_/_",
Authorization: "bearer any",
},
});
import requests
externalJobPostingId = "string"
url = 'https://parceiros.empregos.com.br/api/job/{externalJobPostingId}'
headers = {
'accept': '*/*',
'Authorization': 'bearer any',
}
response = requests.delete(url, headers=headers)
Parameters [Request]
| Field | Description | Type | Required |
|---|---|---|---|
| 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 |
Responses
-
200 OK: job closed.
{
"success": true,
"message": "Removido com sucesso!"
} -
400 Bad Request: the job was not found for your partner account, could not be closed, or an unexpected error occurred. The text of
messageis in Portuguese.{
"success": false,
"errorMessages": [
{
"propertyName": "",
"message": "Não foi possivel localizar a vaga vaga-teste-01."
}
]
} -
401 Unauthorized: missing or invalid bearer token. See Security.
| Response field | Description | Type |
|---|---|---|
| success | true when the job was closed. | Boolean |
| message | Result message (text in Portuguese). Only on success. | String |
| errorMessages | List of errors. Only on failure. | Array |
| errorMessages.propertyName | Name of the field that failed. Empty for general errors. | String |
| errorMessages.message | Description of the error (text in Portuguese). | String |