{"openapi":"3.1.0","info":{"title":"LATAM & Iberia Salary Planning API","description":"Gross-to-net and net-to-gross salary planning for 20 LATAM and Iberia countries. Severance and termination estimates for Brazil, Mexico, Chile, Colombia, Argentina, Peru and Ecuador. Includes employee deductions and employer total cost estimates for HR tech, fintech, EOR platforms and remote-work apps. For payroll compliance processing, verify results with a local accountant.","contact":{"name":"RoviDev","url":"https://rovidev.com/","email":"contacto@rovidev.com"},"license":{"name":"MIT"},"version":"2.2.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/countries":{"get":{"summary":"List Countries","operationId":"list_countries_v1_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CountryInfo"},"type":"array","title":"Response List Countries V1 Countries Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/payroll/batch":{"post":{"summary":"Calculate Payroll Batch","operationId":"calculate_payroll_batch_v1_payroll_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchPayrollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchPayrollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/payroll/{country}":{"post":{"summary":"Calculate Payroll","operationId":"calculate_payroll_v1_payroll__country__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payroll/{country}/reverse":{"post":{"summary":"Calculate Net To Gross Endpoint","operationId":"calculate_net_to_gross_endpoint_v1_payroll__country__reverse_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetToGrossRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/termination/countries":{"get":{"summary":"List Termination Countries","operationId":"list_termination_countries_v1_termination_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TerminationCountryInfo"},"type":"array","title":"Response List Termination Countries V1 Termination Countries Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/termination/batch":{"post":{"summary":"Calculate Termination Batch","operationId":"calculate_termination_batch_v1_termination_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTerminationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTerminationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/termination/{country}":{"post":{"summary":"Calculate Termination Endpoint","operationId":"calculate_termination_endpoint_v1_termination__country__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchPayrollItem":{"properties":{"country":{"type":"string","title":"Country","description":"ISO-style country code, e.g. mx, br, co"},"gross_monthly":{"type":"number","exclusiveMinimum":0.0,"title":"Gross Monthly"},"include_bonuses":{"type":"boolean","title":"Include Bonuses","default":true},"dependents":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Dependents","default":0}},"type":"object","required":["country","gross_monthly"],"title":"BatchPayrollItem"},"BatchPayrollRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchPayrollItem"},"type":"array","maxItems":50,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"BatchPayrollRequest"},"BatchPayrollResponse":{"properties":{"total":{"type":"integer","title":"Total"},"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/BatchPayrollResult"},"type":"array","title":"Results"}},"type":"object","required":["total","succeeded","failed","results"],"title":"BatchPayrollResponse"},"BatchPayrollResult":{"properties":{"index":{"type":"integer","title":"Index"},"status":{"type":"string","enum":["ok","error"],"title":"Status"},"result":{"anyOf":[{"$ref":"#/components/schemas/PayrollResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["index","status"],"title":"BatchPayrollResult"},"BatchTerminationItem":{"properties":{"country":{"type":"string","title":"Country"},"gross_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Monthly"},"net_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Monthly"},"daily_salary":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Salary"},"years_of_service":{"type":"number","title":"Years Of Service","default":0},"months_worked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months Worked"},"days_worked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Worked"},"vacation_days_pending":{"type":"number","title":"Vacation Days Pending","default":0},"fgts_balance":{"type":"number","title":"Fgts Balance","default":0},"termination_type":{"type":"string","enum":["without_cause","with_cause","resignation","mutual","end_contract"],"title":"Termination Type","default":"without_cause"},"include_severance_indemnity":{"type":"boolean","title":"Include Severance Indemnity","default":true}},"type":"object","required":["country"],"title":"BatchTerminationItem"},"BatchTerminationRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BatchTerminationItem"},"type":"array","maxItems":50,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"BatchTerminationRequest"},"BatchTerminationResponse":{"properties":{"total":{"type":"integer","title":"Total"},"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/BatchTerminationResult"},"type":"array","title":"Results"}},"type":"object","required":["total","succeeded","failed","results"],"title":"BatchTerminationResponse"},"BatchTerminationResult":{"properties":{"index":{"type":"integer","title":"Index"},"status":{"type":"string","enum":["ok","error"],"title":"Status"},"result":{"anyOf":[{"$ref":"#/components/schemas/TerminationResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["index","status"],"title":"BatchTerminationResult"},"CountryInfo":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"currency":{"type":"string","title":"Currency"},"endpoint":{"type":"string","title":"Endpoint"},"reverse_endpoint":{"type":"string","title":"Reverse Endpoint"},"supports_net_to_gross":{"type":"boolean","title":"Supports Net To Gross","default":true}},"type":"object","required":["code","name","currency","endpoint","reverse_endpoint"],"title":"CountryInfo"},"DeductionLine":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["code","label","amount"],"title":"DeductionLine"},"EmployerContributionLine":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["code","label","amount"],"title":"EmployerContributionLine"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NetToGrossRequest":{"properties":{"net_monthly":{"type":"number","exclusiveMinimum":0.0,"title":"Net Monthly","description":"Target net monthly take-home pay"},"include_bonuses":{"type":"boolean","title":"Include Bonuses","description":"Mexico: include aguinaldo/vacation factor","default":true},"dependents":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Dependents","description":"Tax dependents","default":0}},"type":"object","required":["net_monthly"],"title":"NetToGrossRequest"},"PayrollRequest":{"properties":{"gross_monthly":{"type":"number","exclusiveMinimum":0.0,"title":"Gross Monthly","description":"Monthly gross salary in local currency"},"include_bonuses":{"type":"boolean","title":"Include Bonuses","description":"Include aguinaldo/vacation factor in taxable base (Mexico)","default":true},"dependents":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Dependents","description":"Tax dependents (Brazil IRRF, Portugal IRS)","default":0}},"type":"object","required":["gross_monthly"],"title":"PayrollRequest"},"PayrollResponse":{"properties":{"country":{"type":"string","title":"Country"},"country_name":{"type":"string","title":"Country Name"},"currency":{"type":"string","title":"Currency"},"gross_monthly":{"type":"number","title":"Gross Monthly"},"net_monthly":{"type":"number","title":"Net Monthly"},"total_deductions":{"type":"number","title":"Total Deductions"},"effective_rate_pct":{"type":"number","title":"Effective Rate Pct"},"deductions":{"items":{"$ref":"#/components/schemas/DeductionLine"},"type":"array","title":"Deductions"},"employer_contributions":{"items":{"$ref":"#/components/schemas/EmployerContributionLine"},"type":"array","title":"Employer Contributions"},"employer_contributions_total":{"type":"number","title":"Employer Contributions Total","default":0.0},"employer_total_cost":{"type":"number","title":"Employer Total Cost","description":"Total monthly cost to employer (gross + employer contributions)","default":0.0},"calculation_mode":{"type":"string","enum":["gross_to_net","net_to_gross"],"title":"Calculation Mode","default":"gross_to_net"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Salary planning estimate for HR/fintech use — not legal, tax or payroll compliance advice. Rules change by jurisdiction; verify with a local accountant before payroll processing."},"year":{"type":"integer","title":"Year","default":2026}},"type":"object","required":["country","country_name","currency","gross_monthly","net_monthly","total_deductions","effective_rate_pct","deductions"],"title":"PayrollResponse"},"TerminationComponentLine":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["code","label","amount"],"title":"TerminationComponentLine"},"TerminationCountryInfo":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"currency":{"type":"string","title":"Currency"},"endpoint":{"type":"string","title":"Endpoint"},"termination_types":{"items":{"type":"string","enum":["without_cause","with_cause","resignation","mutual","end_contract"]},"type":"array","title":"Termination Types"}},"type":"object","required":["code","name","currency","endpoint","termination_types"],"title":"TerminationCountryInfo"},"TerminationRequest":{"properties":{"gross_monthly":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Gross Monthly","description":"Monthly gross salary (BR, MX, CO). Chile may use net_monthly instead."},"net_monthly":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Net Monthly","description":"Monthly net salary (CL). If omitted, estimated from gross_monthly."},"daily_salary":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Daily Salary","description":"Daily salary override (MX). Default: gross_monthly / 30."},"years_of_service":{"type":"number","maximum":50.0,"minimum":0.0,"title":"Years Of Service","description":"Years of service (MX, CL, CO)","default":0},"months_worked":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":0.0},{"type":"null"}],"title":"Months Worked","description":"Months in current employment period (BR informational)"},"days_worked":{"anyOf":[{"type":"integer","maximum":366.0,"minimum":0.0},{"type":"null"}],"title":"Days Worked","description":"Days worked in current period (MX aguinaldo, CO prima)"},"vacation_days_pending":{"type":"number","maximum":90.0,"minimum":0.0,"title":"Vacation Days Pending","description":"Pending vacation days","default":0},"fgts_balance":{"type":"number","minimum":0.0,"title":"Fgts Balance","description":"Accumulated FGTS balance in BRL (BR)","default":0},"termination_type":{"type":"string","enum":["without_cause","with_cause","resignation","mutual","end_contract"],"title":"Termination Type","description":"Termination scenario affecting indemnity components","default":"without_cause"},"include_severance_indemnity":{"type":"boolean","title":"Include Severance Indemnity","description":"MX: include LFT indemnities for unjustified dismissal","default":true}},"type":"object","title":"TerminationRequest"},"TerminationResponse":{"properties":{"country":{"type":"string","title":"Country"},"country_name":{"type":"string","title":"Country Name"},"currency":{"type":"string","title":"Currency"},"termination_type":{"type":"string","enum":["without_cause","with_cause","resignation","mutual","end_contract"],"title":"Termination Type"},"total_severance":{"type":"number","title":"Total Severance"},"components":{"items":{"$ref":"#/components/schemas/TerminationComponentLine"},"type":"array","title":"Components"},"inputs_used":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Inputs Used"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Severance and termination estimate for HR/fintech use — not legal, labor or payroll compliance advice. Rules vary by contract, collective agreements and jurisdiction; verify with a local labor lawyer before processing a real termination."},"year":{"type":"integer","title":"Year","default":2026}},"type":"object","required":["country","country_name","currency","termination_type","total_severance","components"],"title":"TerminationResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key"}}}}