Get an employee's withholding certificate
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}Employees
Get an employee's withholding certificate
The year’s certificate of income and IRPF withholdings (certificado de retenciones) the company must give the employee, built from the payroll runs and consistent with the company’s modelo 190.
GET
/
companies
/
{company_id}
/
employees
/
{employee_id}
/
withholding-certificates
/
{year}
Get an employee's withholding certificate
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/employees/{employee_id}/withholding-certificates/{year}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}Preview. A contract we are building with design partners. It is not callable yet, and fields can still change. See Availability.
Authorizations
Your partner secret key, mk_live_… for real companies or mk_test_…
for test companies. Keep it on your servers. See
Authentication.
Path Parameters
The company's ID. Every company-scoped call works in exactly this company.
Required range:
2000 <= x <= 2100Response
The certificate as a PDF.
The response is of type file.