Correct a strike
curl --request PUT \
--url https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strike": {
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500
}
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id}"
payload = { "strike": {
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({strike: {start: '2023-12-25', end: '2023-12-25', worked: 500}})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"kind": "total",
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee_name": "<string>"
}Leaves and strikes
Correct a strike
Replaces a recorded strike whole, such as to add its end once it is over.
PUT
/
companies
/
{company_id}
/
payroll
/
strikes
/
{strike_id}
Correct a strike
curl --request PUT \
--url https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strike": {
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500
}
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id}"
payload = { "strike": {
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({strike: {start: '2023-12-25', end: '2023-12-25', worked: 500}})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/payroll/strikes/{strike_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"kind": "total",
"start": "2023-12-25",
"end": "2023-12-25",
"worked": 500,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"employee_name": "<string>"
}Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
Authorizations
companyApiKeypartnerApiKey
A company API key, mk_live_…, that the company's owner creates in the
Melso app under Settings, Connect your AI, API keys. It works in that
one company with the owner's authority. Test keys (mk_test_…) are not
issued. Keep the key on your servers. See
Authentication.
Path Parameters
Response
The strike.