curl --request POST \
--url https://api.example.com/v1/payroll/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"simulation": {
"scenarios": [
{
"label": "<string>",
"daily_salary": 800,
"overrides": {}
}
]
},
"options": {
"include_audit_trail": true,
"include_diagram": false,
"precision": 2
}
}
'import requests
url = "https://api.example.com/v1/payroll/simulate"
payload = {
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"simulation": { "scenarios": [
{
"label": "<string>",
"daily_salary": 800,
"overrides": {}
}
] },
"options": {
"include_audit_trail": True,
"include_diagram": False,
"precision": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
scheme: '<string>',
year: 2025,
period: {start_date: '2023-12-25', end_date: '2023-12-25', days: 16},
employee: {
id: '<string>',
daily_salary: 800,
monthly_salary: 1,
factor_integracion: 1.0493,
risk_class_rate: 0.00543,
overtime_amount: '0',
sunday_bonus_days: 0,
grocery_voucher_amount: '0',
infonavit_credit_amount: '0',
num_dependentes_irrf: 0,
vale_transporte_amount: '0',
pensao_alimenticia_amount: '0',
decimo_terceiro_amount: '0',
ferias_amount: '0',
rat_fap_rate: '0.02',
cantidad_hijos: 0,
cantidad_hijos_incapacitados: 0,
cuota_sindical_rate: '0',
overrides: {}
},
employer: {id: '<string>', rfc: 'ABC123456XY0'},
simulation: {scenarios: [{label: '<string>', daily_salary: 800, overrides: {}}]},
options: {include_audit_trail: true, include_diagram: false, precision: 2}
})
};
fetch('https://api.example.com/v1/payroll/simulate', 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://api.example.com/v1/payroll/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => '<string>',
'scheme' => '<string>',
'year' => 2025,
'period' => [
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'days' => 16
],
'employee' => [
'id' => '<string>',
'daily_salary' => 800,
'monthly_salary' => 1,
'factor_integracion' => 1.0493,
'risk_class_rate' => 0.00543,
'overtime_amount' => '0',
'sunday_bonus_days' => 0,
'grocery_voucher_amount' => '0',
'infonavit_credit_amount' => '0',
'num_dependentes_irrf' => 0,
'vale_transporte_amount' => '0',
'pensao_alimenticia_amount' => '0',
'decimo_terceiro_amount' => '0',
'ferias_amount' => '0',
'rat_fap_rate' => '0.02',
'cantidad_hijos' => 0,
'cantidad_hijos_incapacitados' => 0,
'cuota_sindical_rate' => '0',
'overrides' => [
]
],
'employer' => [
'id' => '<string>',
'rfc' => 'ABC123456XY0'
],
'simulation' => [
'scenarios' => [
[
'label' => '<string>',
'daily_salary' => 800,
'overrides' => [
]
]
]
],
'options' => [
'include_audit_trail' => true,
'include_diagram' => false,
'precision' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/v1/payroll/simulate"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/v1/payroll/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payroll/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country": "<string>",
"scheme": "<string>",
"year": 123,
"results": [
{
"label": "<string>",
"daily_salary": "<string>",
"summary": {
"gross_salary": "<string>",
"total_perceptions": "<string>",
"total_deductions": "<string>",
"net_salary": "<string>",
"employer_contributions_total": "<string>",
"employer_total_cost": "<string>"
},
"perceptions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"taxable": true,
"imss_base": true,
"tags": [
"<string>"
]
}
],
"deductions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"tags": [
"<string>"
],
"bracket_applied": {}
}
],
"employer_contributions": [
{
"table_id": "<string>",
"label": "<string>",
"total": "<string>",
"components": [
{
"id": "<string>",
"label": "<string>",
"base": "<string>",
"rate": "<string>",
"amount": "<string>"
}
]
}
]
}
],
"dsl_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z",
"status": "success",
"is_simulation": true
}Simulate multiple salary scenarios (not persisted)
Run payroll calculations for multiple salary scenarios without persisting results.
Intended for quote/preview UIs, HR tools, and compensation planning:
- “What will my total employer cost be if I hire at X salary?”
- “Show me the ISR impact of a 20% raise vs. a 40% raise.”
Important: simulation results are NOT payroll records. They are never
stored and do not appear in any reports or audit logs. The response includes
is_simulation: true as an explicit flag.
Supports 1–20 scenarios per request. Each scenario can vary salary and enable/disable optional perceptions independently.
curl --request POST \
--url https://api.example.com/v1/payroll/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"simulation": {
"scenarios": [
{
"label": "<string>",
"daily_salary": 800,
"overrides": {}
}
]
},
"options": {
"include_audit_trail": true,
"include_diagram": false,
"precision": 2
}
}
'import requests
url = "https://api.example.com/v1/payroll/simulate"
payload = {
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"simulation": { "scenarios": [
{
"label": "<string>",
"daily_salary": 800,
"overrides": {}
}
] },
"options": {
"include_audit_trail": True,
"include_diagram": False,
"precision": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
scheme: '<string>',
year: 2025,
period: {start_date: '2023-12-25', end_date: '2023-12-25', days: 16},
employee: {
id: '<string>',
daily_salary: 800,
monthly_salary: 1,
factor_integracion: 1.0493,
risk_class_rate: 0.00543,
overtime_amount: '0',
sunday_bonus_days: 0,
grocery_voucher_amount: '0',
infonavit_credit_amount: '0',
num_dependentes_irrf: 0,
vale_transporte_amount: '0',
pensao_alimenticia_amount: '0',
decimo_terceiro_amount: '0',
ferias_amount: '0',
rat_fap_rate: '0.02',
cantidad_hijos: 0,
cantidad_hijos_incapacitados: 0,
cuota_sindical_rate: '0',
overrides: {}
},
employer: {id: '<string>', rfc: 'ABC123456XY0'},
simulation: {scenarios: [{label: '<string>', daily_salary: 800, overrides: {}}]},
options: {include_audit_trail: true, include_diagram: false, precision: 2}
})
};
fetch('https://api.example.com/v1/payroll/simulate', 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://api.example.com/v1/payroll/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => '<string>',
'scheme' => '<string>',
'year' => 2025,
'period' => [
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'days' => 16
],
'employee' => [
'id' => '<string>',
'daily_salary' => 800,
'monthly_salary' => 1,
'factor_integracion' => 1.0493,
'risk_class_rate' => 0.00543,
'overtime_amount' => '0',
'sunday_bonus_days' => 0,
'grocery_voucher_amount' => '0',
'infonavit_credit_amount' => '0',
'num_dependentes_irrf' => 0,
'vale_transporte_amount' => '0',
'pensao_alimenticia_amount' => '0',
'decimo_terceiro_amount' => '0',
'ferias_amount' => '0',
'rat_fap_rate' => '0.02',
'cantidad_hijos' => 0,
'cantidad_hijos_incapacitados' => 0,
'cuota_sindical_rate' => '0',
'overrides' => [
]
],
'employer' => [
'id' => '<string>',
'rfc' => 'ABC123456XY0'
],
'simulation' => [
'scenarios' => [
[
'label' => '<string>',
'daily_salary' => 800,
'overrides' => [
]
]
]
],
'options' => [
'include_audit_trail' => true,
'include_diagram' => false,
'precision' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/v1/payroll/simulate"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/v1/payroll/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payroll/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"simulation\": {\n \"scenarios\": [\n {\n \"label\": \"<string>\",\n \"daily_salary\": 800,\n \"overrides\": {}\n }\n ]\n },\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country": "<string>",
"scheme": "<string>",
"year": 123,
"results": [
{
"label": "<string>",
"daily_salary": "<string>",
"summary": {
"gross_salary": "<string>",
"total_perceptions": "<string>",
"total_deductions": "<string>",
"net_salary": "<string>",
"employer_contributions_total": "<string>",
"employer_total_cost": "<string>"
},
"perceptions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"taxable": true,
"imss_base": true,
"tags": [
"<string>"
]
}
],
"deductions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"tags": [
"<string>"
],
"bracket_applied": {}
}
],
"employer_contributions": [
{
"table_id": "<string>",
"label": "<string>",
"total": "<string>",
"components": [
{
"id": "<string>",
"label": "<string>",
"base": "<string>",
"rate": "<string>",
"amount": "<string>"
}
]
}
]
}
],
"dsl_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z",
"status": "success",
"is_simulation": true
}Authorizations
API key authentication. Send your API key as: Authorization: Bearer <your_api_key>
Body
Request body for POST /v1/payroll/simulate.
Identical computation to /calculate but:
- Results are NEVER persisted
- Supports multiple scenarios in a single request
- Intended for quote/preview UIs — "what would my cost be at X salary?"
The simulation flag is enforced at the route handler level, not here.
^[A-Z]{2}$"MX"
"ordinario"
2020 <= x <= 20302024
Payroll period definition.
Show child attributes
Show child attributes
Employee-side inputs for a payroll calculation.
Show child attributes
Show child attributes
Employer-side inputs for a payroll calculation.
Show child attributes
Show child attributes
Simulation configuration: one or more salary scenarios.
Show child attributes
Show child attributes
Options that affect what the engine returns (not the calculation itself).
Show child attributes
Show child attributes
Response
Simulation results for all scenarios.
Multi-scenario simulation response. Results are never persisted.
Simulation ID (ULID). Not persisted — for correlation only.
Show child attributes
Show child attributes
"success"