convenia-sdk
v1.0.17
Published
convenia api
Downloads
6
Readme
How to use
- you should import convenia to your application and after that create the object passing the convenia token
import Convenia from './index';
const convenia = new Convenia(token);
- you can see how to get the token in this link below
- https://ajuda.convenia.com.br/knowledge/como-integrar-o-convenia-com-outras-plataformas
Convenia data
getConveniaEthnicity
- All ethnic groups available at Convenia are returned.
convenia.getConveniaEthnicity().then((data) => {
//console.log(data)
});
getConveniaNationalities
- All nationalities available at Convenia are returned.
convenia.getConveniaNationalities().then((data) => {
//console.log(data);
});
getConveniaStates
- All states available in Convenia are returned.
convenia.getConveniaStates().then((data) => {
//console.log(data);
});
getConveniaCities
- All cities available in Convenia are returned.
convenia.getConveniaCities().then((data) => {
//console.log(data);
});
Contributors
getAllContributors
- All active contributors on the platform are returned.
convenia.getAllContributors().then((contributors) => {
//console.log(contributors);
});
getAllContributorsDismissed
- A list of all collaborators disconnected from the platform is returned.
convenia.getAllContributorsDismissed().then((contributors) => {
//console.log(contributors);
});
getContributor
- This endpoint returns the detail of a platform-specific contributor through its unique identifier.
convenia
.getContributor(contributor_id)
.then((contributor) => {
//console.log(contributor)
});
getContributorSalaryHistory
- Entries of salary changes of an employee through their unique identifier.
convenia
.getContributorSalaryHistory(contributor_id)
.then((salaryHistory) => {
//console.log(salaryHistory);
});
getContributorDependents
- Listing details of dependents related to a contributor through their unique identifier.
convenia
.getContributorDependents(contributor_id)
.then((dependents) => {
//console.log(dependents);
});
postContributor
- This endpoint is responsible for creating the contributor on the platform and starting a new admission for him.
convenia
.postContributor({
name: 'Nome',
last_name: ' Sobrenome',
employee_fill_form: true,
personal_email: email do colaborador,
})
.then((contributor) => {
// console.log(contributor);
});
Absences
getAllAbsencesMotives
- This endpoint returns the available reasons for Absences and Leaves.
convenia.getAllAbsencesMotives().then((absencesMotives) => {
//console.log(absencesMotives);
});
getAllContributorAbsences
- This endpoint returns the available types of Absences and Leaves
convenia
.getAllContributorAbsences(contributor_id)
.then((absences) => {
//console.log(absences);
});
getContributorAbsence
- This endpoint returns an object with the absences and absences of an employee
convenia
.getContributorAbsence(
contributor_id,
absence_id
)
.then((absence) => {
//console.log(absence);
});
postContributorAbsence
- Endpoint responsible for creating an absence / absence for an employee.
convenia
.postContributorAbsence(contributor_id, {
date_to: '2021-12-02',
date_from: '2021-12-01',
absence_motive_id: 6,
absence_type_id: 1,
})
.then((contributor) => {
//console.log(contributor);
});
putContributorAbsence
- Endpoint responsible for updating an employee's specific absence/removal.
convenia.putContributorAbsence(contributor_id, absence_id, {
date_to: Data '2021-12-02',
date_from: '2021-12-01',
absence_motive_id: 6,
absence_type_id: 1,
})
.then((contributor) => {
//console.log(contributor);
});
deleteContributorAbsence
- Endpoint responsible for deleting a specific absence/leave of an employee..
convenia.deleteContributorAbsence(contributor_id, absence_id).then((contributor) => {
console.log(contributor);
});
Company
getCompanyCostCenter
- All platform cost centers are returned.
convenia.getCompanyCostCenter().then((costCenter) => {
//console.log(costCenter);
});
getCompanyDepartments
- All departments on the platform are returned.
convenia.getCompanyDepartments().then((departments) => {
//console.log(departments);
});
getCompanyJobs
- All positions on the platform are returned.
convenia.getCompanyJobs().then((jobs) => {
//console.log(jobs);
});
getCompanyCustomFields
- This endpoint returns all platform custom fields.
convenia.getCompanyCustomFields().then((customFields) => {
//console.log(customFields);
});
You can see the documentation of convenia in this link right below
https://docs-api.convenia.com.br/#introducao