Skip to main content

Retrieve Employment - GET

To get the Employment information corresponding to a user's account, you need to make a GET request to the endpoint

GET https://api.palenca.com/v1/accounts/:account_id/employment
const axios = require('axios')

const config = {
method: 'get',
url: 'https://api.palenca.com/v1/accounts/:account_id/employment',
headers: {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
}
};

(async () => {
try {
const {data} = await axios(config)
console.info(JSON.stringify(response.data))
} catch (error) {
console.error(error)
}
})()

Returns a JSON structured like this:

{
"success": true,
"error": null,
"data": {
"account_id": "472f02e8-6b24-43a7-b529-3f71d6ecc81c",
"employment_info": {
"id_type": "curp",
"federal_entity": "CIUDAD DE MEXICO",
"quoted_days": null,
"quoted_weeks": 1,
"status": "active",
},
"employment_history": [
{
"employer": "RECENT COMPANY",
"start_date": "2022-03-24",
"end_date": null,
"base_salary": 336.93,
"monthly_salary": 94212.0,
"payment_frequency": "monthly",
"payment_days": 30,
"job_title": "Software Engineer",
"designation": null,
"modality": null,
},
{
"employer": "SECURITY COMPANY SA",
"start_date": "2022-03-09",
"end_date": "2022-03-23",
"base_salary": 550.86,
"monthly_salary": 16757.16,
"payment_frequency": "monthly",
"payment_days": 30,
"job_title": "Software Engineer",
"designation": null,
"modality": null,
},
{
"employer": "OLD COMPANY INDUSTRIES",
"start_date": "2022-02-21",
"end_date": "2022-03-12",
"base_salary": 232.45,
"monthly_salary": 7071.13,
"payment_frequency": "monthly",
"payment_days": 30,
"job_title": "Software Engineer",
"designation": null,
"modality": null,
}
],
"employment_events": [
{
"event_type": "salary_modification",
"event_date": "2022-08-01",
"event_end_date": null,
"base_salary": 1997.71
},
{
"event_type": "salary_modification",
"event_date": "2022-03-16",
"event_end_date": null,
"base_salary": 1549.0
},
{
"event_type": "reentry",
"event_date": "2022-01-01",
"event_end_date": null,
"base_salary": 1202.7
},
{
"event_type": "discharge",
"event_date": "2021-11-30",
"event_end_date": null,
"base_salary": 889.19
},
{
"event_type": "salary_modification",
"event_date": "2021-09-01",
"event_end_date": null,
"base_salary": 889.19
},
]
}
}

Note: employment_events are only captured for workers with an IMSS account.