curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/social-security/settlements/{settlement_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/social-security/settlements/{settlement_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}/social-security/settlements/{settlement_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"contribution_account": "<string>",
"status": "requested",
"due_date": "2023-12-25",
"employer_contribution": "121.00",
"employee_contribution": "121.00",
"total": "121.00",
"workers": 123,
"payroll_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discrepancies": [
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field": "<string>",
"payroll_value": "121.00",
"tgss_value": "121.00"
}
],
"documents": {
"rnt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
},
"rlc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
}
}
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Get a contribution settlement
Returns one month’s settlement: the TGSS’s calculation, how it compares with the payroll run, its state and its documents, the RNT (relación nominal de trabajadores) and the RLC (recibo de liquidación de cotizaciones).
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/social-security/settlements/{settlement_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/social-security/settlements/{settlement_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}/social-security/settlements/{settlement_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": "<string>",
"contribution_account": "<string>",
"status": "requested",
"due_date": "2023-12-25",
"employer_contribution": "121.00",
"employee_contribution": "121.00",
"total": "121.00",
"workers": 123,
"payroll_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discrepancies": [
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field": "<string>",
"payroll_value": "121.00",
"tgss_value": "121.00"
}
],
"documents": {
"rnt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
},
"rlc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
}
}
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}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 settlement.
The month
The CCC.
calculated: the TGSS calculated the draft. discrepancy: it does
not match the payroll run; discrepancies says where. confirmed:
Melso confirmed it and the direct debit is set. paid: charged.
requested, calculated, discrepancy, confirmed, paid, overdue The last day of the month after period.
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
An amount in euros as a decimal string with two decimals, such as "121.00".
^-?[0-9]+\.[0-9]{2}$"121.00"
Show child attributes
Show child attributes
Show child attributes
Show child attributes