Public Dismiss Employee
curl --request PATCH \
--url https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"dismissal_date": "2023-12-25",
"send_email": true,
"send_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss"
payload = {
"dismissal_date": "2023-12-25",
"send_email": True,
"send_date": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dismissal_date: '2023-12-25',
send_email: true,
send_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dismissal_date' => '2023-12-25',
'send_email' => true,
'send_date' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss"
payload := strings.NewReader("{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"sucess": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Employees
Dismiss Employee
PATCH
/
v0
/
employee
/
{employee_id}
/
dismiss
Public Dismiss Employee
curl --request PATCH \
--url https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"dismissal_date": "2023-12-25",
"send_email": true,
"send_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss"
payload = {
"dismissal_date": "2023-12-25",
"send_email": True,
"send_date": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dismissal_date: '2023-12-25',
send_email: true,
send_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dismissal_date' => '2023-12-25',
'send_email' => true,
'send_date' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss"
payload := strings.NewReader("{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/employee/{employee_id}/dismiss")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dismissal_date\": \"2023-12-25\",\n \"send_email\": true,\n \"send_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"sucess": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Marks an employee as dismissed (terminated), recording the dismissal date.
dismissal_dateis required. The dismissal will be recorded on this date.send_email(optional): whentrue, the dismissal notice will be sent on the date provided insend_date. Ifsend_dateis not provided, the current date will be used to send the notice.- The dismissal process inactivates the employee in the database and creates a dismissal medical exam for them.
- Field:
dismissal_date - Accepted format: ISO 8601
- Valid examples:
YYYY-MM-DD— e.g.,2025-01-31(date only)YYYY-MM-DD HH:MM:SS— e.g.,2025-01-31 00:00:00(with time in UTC)
- If you use
send_date, adopt the same format.
Overview
- Method:
PATCH - Path:
/v0/employee/{employee_id}/dismiss - OperationId:
public_dismiss_employee_v0_employee__employee_id__dismiss_patch - Authentication: header
x-api-key
Example request
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE/dismiss" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: $SALU_PUBLIC_API_KEY" \
--data '{
"dismissal_date": "2023-12-25",
"send_email": false,
"send_date": null
}'
Example: email notification enabled
curl -X PATCH "https://public-api.salu.com.vc/dev/routes/v0/employee/EMPLOYEE_ID_HERE/dismiss" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: $SALU_PUBLIC_API_KEY" \
--data '{
"dismissal_date": "2023-12-25",
"send_email": true,
"send_date": "2023-11-07 05:31:56"
}'