> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.sesametime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml GET /third-party-context/v1/all-mx-employee-data/{employeeId}
openapi: 3.0.0
info:
  description: ''
  version: 3.0.0
  title: Sesame Public API
servers:
  - url: https://api-{region}.sesametime.com
    variables:
      region:
        default: eu1
security: []
tags: []
paths:
  /third-party-context/v1/all-mx-employee-data/{employeeId}:
    get:
      tags:
        - MX Payroll
      summary: Get the master payroll data of one Mexican employee
      description: >-
        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.
      operationId: GetMxEmployeeData
      parameters:
        - name: employeeId
          in: path
          description: The employee ID
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            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.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: >-
                      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.
                    properties:
                      id:
                        type: string
                        format: uuid
                      updatedAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: >-
                          Most recent change across the 7 sources of this
                          employee (employee, profile, contract, salary,
                          contract work time, country fields, custom fields).
                          Use this value as the updatedSince of your next
                          incremental call.
                      personalData:
                        type: object
                        description: Employee personal data (HU-3)
                        properties:
                          firstName:
                            type: string
                            nullable: true
                          lastName:
                            type: string
                            nullable: true
                          secondLastName:
                            type: string
                            nullable: true
                          birthDate:
                            type: string
                            format: date
                            nullable: true
                            example: '1985-04-12'
                          gender:
                            type: string
                            nullable: true
                            description: >-
                              Translated to the company language. Not a code:
                              the literal shown to the user.
                            example: Masculino
                          maritalStatus:
                            type: string
                            nullable: true
                          nationality:
                            type: string
                            nullable: true
                            description: >-
                              Free text as stored in Sesame. Not guaranteed to
                              be an ISO country code.
                          curp:
                            type: string
                            nullable: true
                            description: >-
                              Only present when the employee identity number
                              type is CURP.
                          rfc:
                            type: string
                            nullable: true
                            description: >-
                              Only present when the employee secondary identity
                              number type is RFC.
                          socialSecurityNumber:
                            type: string
                            nullable: true
                            description: >-
                              IMSS number, read from the current contract. Null
                              when the employee has no current contract.
                          phone:
                            type: string
                            nullable: true
                          corporateEmail:
                            type: string
                            nullable: true
                      address:
                        type: object
                        description: Employee address (HU-4)
                        properties:
                          street:
                            type: string
                            nullable: true
                          colonia:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          federalState:
                            type: string
                            nullable: true
                            description: >-
                              Resolved state name. Null when the stored ISO code
                              does not resolve.
                            example: Veracruz
                          postalCode:
                            type: string
                            nullable: true
                          country:
                            type: string
                            nullable: true
                      employmentData:
                        type: object
                        description: >-
                          Employment and contractual data (HU-5). Every field
                          that depends on the current contract is null when the
                          employee has none.
                        properties:
                          employeeCode:
                            type: string
                            nullable: true
                          payrollGroup:
                            type: string
                            nullable: true
                            description: >-
                              Contribution group of the employee's current
                              salary, translated. May differ from
                              contributionGroup; see that field.
                          contractTypeCode:
                            type: string
                            nullable: true
                            description: >-
                              SAT contract type code. The only regulatory code
                              Sesame stores.
                          contractTypeName:
                            type: string
                            nullable: true
                            description: Translated to the company language.
                          contractCode:
                            type: string
                            nullable: true
                          workdayTypeName:
                            type: string
                            nullable: true
                            description: >-
                              Translated. No SAT code is emitted: Sesame does
                              not store one.
                          weeklyHours:
                            type: number
                            format: float
                            nullable: true
                          jobPosition:
                            type: string
                            nullable: true
                            description: Translated.
                          professionalCategory:
                            type: string
                            nullable: true
                          department:
                            type: string
                            nullable: true
                            description: >-
                              ONE department: the oldest assignment among
                              non-deleted departments. Adding a second
                              department does not change this value.
                          office:
                            type: string
                            nullable: true
                            description: >-
                              Name of the employee's main office. Useful to
                              reconcile imssEmployerRegistration and
                              federalStateIsn, which are work-centre data.
                          hireDate:
                            type: string
                            format: date
                            nullable: true
                          contractEndDate:
                            type: string
                            format: date
                            nullable: true
                          leaveReason:
                            type: string
                            nullable: true
                            description: >-
                              Translated. Null when the employee has no current
                              contract, including terminated employees.
                          shift:
                            type: string
                            nullable: true
                          imssEmployerRegistration:
                            type: string
                            nullable: true
                          federalStateIsn:
                            type: string
                            nullable: true
                            description: >-
                              Resolved state name for the state payroll tax
                              (ISN).
                          workerTypeName:
                            type: string
                            nullable: true
                            description: >-
                              Translated. No IMSS code is emitted: Sesame stores
                              a translation key, not a code.
                          unionMember:
                            type: boolean
                            description: >-
                              Absent country field is reported as false, never
                              null.
                          economicZone:
                            type: integer
                            enum:
                              - 1
                              - 2
                            description: >-
                              1 = general, 2 = border. Never null: an absent
                              country field is reported as 1.
                          expatriate:
                            type: boolean
                            description: >-
                              Absent country field is reported as false, never
                              null.
                          remoteWork:
                            type: boolean
                            nullable: true
                            description: >-
                              Null means the employee has no current contract,
                              unlike the country-field booleans, which report
                              false when absent.
                          dependentChildrenCount:
                            type: integer
                            nullable: true
                          disabilityPercentage:
                            type: integer
                            nullable: true
                          benefitPlan:
                            type: string
                            nullable: true
                          contributionGroup:
                            type: string
                            nullable: true
                            description: >-
                              Contribution group of the employee profile,
                              translated. Independent from payrollGroup: they
                              usually match, but they are two different columns
                              and may differ.
                          seniorityDate:
                            type: string
                            format: date
                            nullable: true
                          workDays:
                            type: array
                            description: >-
                              Working days of the contract work time in force
                              today. Rest days are the days absent from this
                              list or present with hours 0; they are not a
                              separate field. Empty array when there is no
                              current contract.
                            items:
                              type: object
                              description: >-
                                One working day of the contract work time in
                                force today
                              properties:
                                day:
                                  type: string
                                  example: monday
                                hours:
                                  type: number
                                  format: float
                                  example: 8
                      salaryData:
                        type: object
                        description: >-
                          Salary and payroll data (HU-6). Every field that
                          depends on the current salary is null when the
                          employee has none. The boolean flags come from Mexican
                          country fields and are reported as false when absent,
                          never null.
                        properties:
                          grossDailySalary:
                            type: number
                            format: float
                            nullable: true
                            description: >-
                              Gross salary normalised to a daily amount by
                              dividing the yearly figure by 365. This is not the
                              IMSS integrated daily wage.
                          grossAnnualSalary:
                            type: number
                            format: float
                            nullable: true
                          salaryTypeName:
                            type: string
                            nullable: true
                            description: Translated. No IMSS code is emitted.
                          payPeriod:
                            type: string
                            nullable: true
                            description: >-
                              How often the employee is paid. Independent from
                              the unit grossDailySalary is expressed in.
                            example: weekly
                          primaKey:
                            type: string
                            nullable: true
                          currency:
                            type: string
                            nullable: true
                            example: MXN
                          salaryStartDate:
                            type: string
                            format: date
                            nullable: true
                          paymentsPerYear:
                            type: integer
                            nullable: true
                          imssDisabilityAndLife:
                            type: boolean
                          imssIllnessAndDeath:
                            type: boolean
                          savingsFund:
                            type: boolean
                          savingsAccount:
                            type: boolean
                          groceryVouchers:
                            type: boolean
                          foodVouchers:
                            type: boolean
                          voucherCard:
                            type: string
                            nullable: true
                          voucherAccount:
                            type: string
                            nullable: true
                          profitSharing:
                            type: boolean
                          aguinaldo:
                            type: boolean
                          vacationBonus:
                            type: boolean
                          annualDeclaration:
                            type: boolean
                          incomeTaxWithholding:
                            type: boolean
                          retroactivePay:
                            type: boolean
                      bankData:
                        type: object
                        description: Bank data (HU-7)
                        properties:
                          bankName:
                            type: string
                            nullable: true
                            description: >-
                              Bank name as stored in Sesame. No BANXICO code is
                              emitted: Sesame does not store one.
                            example: BBVA BANCOMER
                          accountType:
                            type: string
                            nullable: true
                          accountNumber:
                            type: string
                            nullable: true
                          beneficiaryName:
                            type: string
                            nullable: true
                          paymentMethod:
                            type: string
                            nullable: true
                            description: >-
                              Often null: Sesame does not model this as a
                              first-class field, only companies that filled the
                              country field will have it.
                      customFields:
                        type: object
                        description: >-
                          Map of company custom field slug to value. Has no
                          fixed schema: keys exist only for the custom fields
                          the company created and filled. Employee integrator id
                          (DNEMPL) and cost centre (CECO) travel here.
                        additionalProperties:
                          type: string
                          nullable: true
                    required:
                      - id
                      - updatedAt
                      - personalData
                      - address
                      - employmentData
                      - salaryData
                      - bankData
                      - customFields
                required:
                  - data
        '401':
          description: Unauthorized - Invalid or missing API Key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating authentication failure
                    example: Invalid or missing API Key
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: UNAUTHORIZED
              example:
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '403':
          description: >-
            Forbidden - The company of the token is not Mexican, or has neither
            the payroll module nor the payroll addon installed. Both gates are
            evaluated BEFORE looking up any employee, so this response never
            reveals whether an employee id exists.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
                    example: forbidden_access_permission
                  message:
                    type: string
                    example: forbidden_access_permission
        '422':
          description: >-
            Unprocessable entity - The employeeId of the path failed validation,
            for one of two reasons.


            validator.invalid_uuid - the employeeId is not a well-formed UUID.
            The format is checked before existence, so a malformed id never
            reaches the lookup.


            validator.employee_not_found - the id is a valid UUID but does not
            resolve to a live employee of the company of the token. Returned
            identically when the id does not exist, belongs to another company,
            or points to a deleted employee: the three cases are deliberately
            indistinguishable so the endpoint cannot be used to probe which ids
            exist in other companies. Note this is a 422 and not a 404, by
            internal convention.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
                    enum:
                      - validator.invalid_uuid
                      - validator.employee_not_found
                  message:
                    type: string
                    example: validator.employee_not_found
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating rate limit exceeded
                    example: Rate limit exceeded. Please try again later.
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: RATE_LIMIT_EXCEEDED
                  retryAfter:
                    type: integer
                    description: Number of seconds to wait before retrying
                    example: 60
              example:
                message: Rate limit exceeded. Please try again later.
                code: RATE_LIMIT_EXCEEDED
                retryAfter: 60
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````