curl --request GET \
--url https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"personalData": {
"firstName": "<string>",
"lastName": "<string>",
"secondLastName": "<string>",
"birthDate": "1985-04-12",
"gender": "Masculino",
"maritalStatus": "<string>",
"nationality": "<string>",
"curp": "<string>",
"rfc": "<string>",
"socialSecurityNumber": "<string>",
"phone": "<string>",
"corporateEmail": "<string>"
},
"address": {
"street": "<string>",
"colonia": "<string>",
"municipality": "<string>",
"city": "<string>",
"federalState": "Veracruz",
"postalCode": "<string>",
"country": "<string>"
},
"employmentData": {
"employeeCode": "<string>",
"payrollGroup": "<string>",
"contractTypeCode": "<string>",
"contractTypeName": "<string>",
"contractCode": "<string>",
"workdayTypeName": "<string>",
"weeklyHours": 123,
"jobPosition": "<string>",
"professionalCategory": "<string>",
"department": "<string>",
"office": "<string>",
"hireDate": "2023-12-25",
"contractEndDate": "2023-12-25",
"leaveReason": "<string>",
"shift": "<string>",
"imssEmployerRegistration": "<string>",
"federalStateIsn": "<string>",
"workerTypeName": "<string>",
"unionMember": true,
"economicZone": 1,
"expatriate": true,
"remoteWork": true,
"dependentChildrenCount": 123,
"disabilityPercentage": 123,
"benefitPlan": "<string>",
"contributionGroup": "<string>",
"seniorityDate": "2023-12-25",
"workDays": [
{
"day": "monday",
"hours": 8
}
]
},
"salaryData": {
"grossDailySalary": 123,
"grossAnnualSalary": 123,
"salaryTypeName": "<string>",
"payPeriod": "weekly",
"primaKey": "<string>",
"currency": "MXN",
"salaryStartDate": "2023-12-25",
"paymentsPerYear": 123,
"imssDisabilityAndLife": true,
"imssIllnessAndDeath": true,
"savingsFund": true,
"savingsAccount": true,
"groceryVouchers": true,
"foodVouchers": true,
"voucherCard": "<string>",
"voucherAccount": "<string>",
"profitSharing": true,
"aguinaldo": true,
"vacationBonus": true,
"annualDeclaration": true,
"incomeTaxWithholding": true,
"retroactivePay": true
},
"bankData": {
"bankName": "BBVA BANCOMER",
"accountType": "<string>",
"accountNumber": "<string>",
"beneficiaryName": "<string>",
"paymentMethod": "<string>"
},
"customFields": {}
}
}{
"message": "Invalid or missing API Key",
"code": "UNAUTHORIZED"
}{
"errors": "forbidden_access_permission",
"message": "forbidden_access_permission"
}{
"errors": "validator.invalid_uuid",
"message": "validator.employee_not_found"
}{
"message": "Rate limit exceeded. Please try again later.",
"code": "RATE_LIMIT_EXCEEDED",
"retryAfter": 60
}Get the master payroll data of one Mexican employee
Returns one employee of the company of the token, with exactly the same blocks and fields as that employee has in the list endpoint, as a single object rather than a list of one.
The employeeId of the path is validated before the query runs, so an id that does not resolve to a live employee of the company of the token is rejected with a 422. The same country and module gates as the list apply.
A non-existent id, an id belonging to another company and an id pointing to a deleted employee all return the same 422 with the same code, so the response does not reveal whether the id exists. An id that is not a well-formed UUID is a different 422 (validator.invalid_uuid): the format is checked before existence, so a malformed id is reported as malformed rather than as not found.
curl --request GET \
--url https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-{region}.sesametime.com/third-party-context/v1/all-mx-employee-data/{employeeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"personalData": {
"firstName": "<string>",
"lastName": "<string>",
"secondLastName": "<string>",
"birthDate": "1985-04-12",
"gender": "Masculino",
"maritalStatus": "<string>",
"nationality": "<string>",
"curp": "<string>",
"rfc": "<string>",
"socialSecurityNumber": "<string>",
"phone": "<string>",
"corporateEmail": "<string>"
},
"address": {
"street": "<string>",
"colonia": "<string>",
"municipality": "<string>",
"city": "<string>",
"federalState": "Veracruz",
"postalCode": "<string>",
"country": "<string>"
},
"employmentData": {
"employeeCode": "<string>",
"payrollGroup": "<string>",
"contractTypeCode": "<string>",
"contractTypeName": "<string>",
"contractCode": "<string>",
"workdayTypeName": "<string>",
"weeklyHours": 123,
"jobPosition": "<string>",
"professionalCategory": "<string>",
"department": "<string>",
"office": "<string>",
"hireDate": "2023-12-25",
"contractEndDate": "2023-12-25",
"leaveReason": "<string>",
"shift": "<string>",
"imssEmployerRegistration": "<string>",
"federalStateIsn": "<string>",
"workerTypeName": "<string>",
"unionMember": true,
"economicZone": 1,
"expatriate": true,
"remoteWork": true,
"dependentChildrenCount": 123,
"disabilityPercentage": 123,
"benefitPlan": "<string>",
"contributionGroup": "<string>",
"seniorityDate": "2023-12-25",
"workDays": [
{
"day": "monday",
"hours": 8
}
]
},
"salaryData": {
"grossDailySalary": 123,
"grossAnnualSalary": 123,
"salaryTypeName": "<string>",
"payPeriod": "weekly",
"primaKey": "<string>",
"currency": "MXN",
"salaryStartDate": "2023-12-25",
"paymentsPerYear": 123,
"imssDisabilityAndLife": true,
"imssIllnessAndDeath": true,
"savingsFund": true,
"savingsAccount": true,
"groceryVouchers": true,
"foodVouchers": true,
"voucherCard": "<string>",
"voucherAccount": "<string>",
"profitSharing": true,
"aguinaldo": true,
"vacationBonus": true,
"annualDeclaration": true,
"incomeTaxWithholding": true,
"retroactivePay": true
},
"bankData": {
"bankName": "BBVA BANCOMER",
"accountType": "<string>",
"accountNumber": "<string>",
"beneficiaryName": "<string>",
"paymentMethod": "<string>"
},
"customFields": {}
}
}{
"message": "Invalid or missing API Key",
"code": "UNAUTHORIZED"
}{
"errors": "forbidden_access_permission",
"message": "forbidden_access_permission"
}{
"errors": "validator.invalid_uuid",
"message": "validator.employee_not_found"
}{
"message": "Rate limit exceeded. Please try again later.",
"code": "RATE_LIMIT_EXCEEDED",
"retryAfter": 60
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The employee ID
Response
Successful response - One Mexican employee. Same blocks and fields as each element of the list, returned as a single object and not as a list of one.
Master payroll data of one Mexican employee. All six blocks are always present; a field with no data is emitted as null (its key never disappears), except customFields, whose keys depend on what the company created.
Show child attributes
Show child attributes
Was this page helpful?