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

# List Mexican employees with their master payroll data

> Returns a paginated list of the employees of the company of the token, with the master payroll data a Mexican payroll software needs: personal, address, employment, salary, bank and custom fields.

Requires the company country to be Mexico and the payroll module (or payroll addon) installed. Both gates return 403.

Use `updatedSince` for incremental synchronisation: pass the highest `updatedAt` you received in your previous call and you get only the employees changed since, across all 7 sources of the employee data. If nothing changed you get an empty list with 200, not a 404.

Ordering is fixed by the endpoint (most recently changed first, tie-broken by employee id) and is not configurable: a client-chosen order would make pagination unstable between pages.



## OpenAPI

````yaml GET /third-party-context/v1/all-mx-employee-data
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:
    get:
      tags:
        - MX Payroll
      summary: List Mexican employees with their master payroll data
      description: >-
        Returns a paginated list of the employees of the company of the token,
        with the master payroll data a Mexican payroll software needs: personal,
        address, employment, salary, bank and custom fields.


        Requires the company country to be Mexico and the payroll module (or
        payroll addon) installed. Both gates return 403.


        Use `updatedSince` for incremental synchronisation: pass the highest
        `updatedAt` you received in your previous call and you get only the
        employees changed since, across all 7 sources of the employee data. If
        nothing changed you get an empty list with 200, not a 404.


        Ordering is fixed by the endpoint (most recently changed first,
        tie-broken by employee id) and is not configurable: a client-chosen
        order would make pagination unstable between pages.
      operationId: ListAllMxEmployeeData
      parameters:
        - name: page
          in: query
          description: Page to return. Defaults to 1.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          description: >-
            Page size. Defaults to 150, which is also the maximum. A value above
            150 returns 422 instead of being capped.
          schema:
            type: integer
            minimum: 1
            maximum: 150
            default: 150
        - name: updatedSince
          in: query
          required: false
          description: >-
            Optional. If omitted or sent empty, returns the full download. When
            present, returns only employees changed on or after this instant, in
            any of the 7 sources of their data. Send an ISO-8601 value including
            the offset: without one it is interpreted in the server timezone.
            The comparison is inclusive, so replaying your previous cursor
            returns the boundary employee again.
          schema:
            type: string
            format: date-time
            nullable: true
            example: '2026-08-01T00:00:00+00:00'
        - name: status
          in: query
          description: >-
            Absent or empty returns every employee, active and inactive. Deleted
            employees are never returned, with or without this filter.
          schema:
            type: string
            enum:
              - active
              - inactive
      responses:
        '200':
          description: >-
            Successful response - Paginated list of Mexican employees with their
            master payroll data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      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
                  meta:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 1
                      lastPage:
                        type: integer
                        example: 1
                      total:
                        type: integer
                        example: 1
                      perPage:
                        type: integer
                        example: 1
                required:
                  - data
                  - meta
        '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 - A query parameter has an invalid value. A
            limit above the maximum is rejected rather than capped.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
                    enum:
                      - validator.invalid_employee_status
                      - validator.invalid_date
                      - invalid_items_per_page_limit_exceeded
                      - invalid_items_per_page
                      - invalid_page
                  message:
                    type: string
                    example: validator.invalid_employee_status
        '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

````