Notify a contract (Contrat@)
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/employment/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signed_on": "2023-12-25",
"start_date": "2023-12-25",
"signed_contract_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"end_date": "2023-12-25",
"weekly_hours": "<string>"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employment/contracts"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signed_on": "2023-12-25",
"start_date": "2023-12-25",
"signed_contract_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"end_date": "2023-12-25",
"weekly_hours": "<string>"
}
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',
signed_on: '2023-12-25',
start_date: '2023-12-25',
signed_contract_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kind: 'contract',
end_date: '2023-12-25',
weekly_hours: '<string>'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/employment/contracts', 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
Notify a contract (Contrat@)
Asks Melso to communicate the content of an employment contract, or its extension, to the SEPE through Contrat@.
POST
/
companies
/
{company_id}
/
employment
/
contracts
Notify a contract (Contrat@)
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/employment/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signed_on": "2023-12-25",
"start_date": "2023-12-25",
"signed_contract_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"end_date": "2023-12-25",
"weekly_hours": "<string>"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/employment/contracts"
payload = {
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signed_on": "2023-12-25",
"start_date": "2023-12-25",
"signed_contract_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "contract",
"end_date": "2023-12-25",
"weekly_hours": "<string>"
}
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',
signed_on: '2023-12-25',
start_date: '2023-12-25',
signed_contract_document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
kind: 'contract',
end_date: '2023-12-25',
weekly_hours: '<string>'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/employment/contracts', 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
The signed contract, uploaded through Documents.
Available options:
contract, extension, conversion For a temporary contract.
A decimal number as a string, such as "21" or "0.5".
Pattern:
^-?[0-9]{1,10}(\.[0-9]{1,6})?$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