Send a company certificate (Certific@2)
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/employment/certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"end_date": "2023-12-25",
"unused_vacation_days": 1
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employment/certificates"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"end_date": "2023-12-25",
"unused_vacation_days": 1
}
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({
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
end_date: '2023-12-25',
unused_vacation_days: 1
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/employment/certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"receipt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
},
"rejection_reason": "<string>",
"deadline": "2023-12-25"
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}Employment notifications
Send a company certificate (Certific@2)
Asks Melso to send the certificado de empresa to the SEPE through Certific@2 when an employment ends, so the employee can claim unemployment benefit.
POST
/
companies
/
{company_id}
/
employment
/
certificates
Send a company certificate (Certific@2)
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/employment/certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"end_date": "2023-12-25",
"unused_vacation_days": 1
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employment/certificates"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"end_date": "2023-12-25",
"unused_vacation_days": 1
}
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({
employee_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
end_date: '2023-12-25',
unused_vacation_days: 1
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/employment/certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"reference": "<string>",
"receipt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
},
"rejection_reason": "<string>",
"deadline": "2023-12-25"
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"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.
Headers
A unique key, such as a UUID, that makes a retried create safe. Reusing a key with a different body is refused.
Maximum string length:
255Path Parameters
The company's ID. Every company-scoped call works in exactly this company.
Body
application/json
Response
The notification, pending until the SEPE registers it.
Available options:
contract, extension, conversion, company_certificate Available options:
pending, submitted, registered, rejected The SEPE's reference.
Show child attributes
Show child attributes