Get a payroll run
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/payroll-runs/{payroll_run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/payroll-runs/{payroll_run_id}"
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}/payroll-runs/{payroll_run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"kind": "ordinary",
"status": "received",
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"totals": {
"employees": 123,
"gross_pay": "121.00",
"irpf_withheld": "121.00",
"employee_contributions": "121.00"
},
"issues": [
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"message": "<string>",
"blocking": true
}
],
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_return_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Payroll runs
Get a payroll run
Returns the run with its totals, the issues found per payslip and the settlement and returns it feeds.
GET
/
companies
/
{company_id}
/
payroll-runs
/
{payroll_run_id}
Get a payroll run
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/payroll-runs/{payroll_run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/payroll-runs/{payroll_run_id}"
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}/payroll-runs/{payroll_run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"kind": "ordinary",
"status": "received",
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"totals": {
"employees": 123,
"gross_pay": "121.00",
"irpf_withheld": "121.00",
"employee_contributions": "121.00"
},
"issues": [
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"message": "<string>",
"blocking": true
}
],
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_return_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"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.
Response
The run.
Available options:
ordinary, extra, supplementary validated: usable for the settlement and the returns. rejected: see issues. settled: the month's contribution settlement is confirmed.
Available options:
received, validated, rejected, settled Show child attributes
Show child attributes
Show child attributes
Show child attributes
The 111 (and, in January, the 190) this run feeds.