Employer data

Employer data is the employer information of an issuer, used only on payroll CFDIs (CFDI: Mexico's electronic invoice; payroll CFDI: the CFDI issued for each salary payment, type N). Each issuer has a single employer data record, so create the issuer first and then its employer data.

Employer data is a subresource of people (person: any individual or legal entity registered in your tenant), at the path /api/v4/people/<personId>/employer. For the tenant owner (tenant: the space in Fiscalapi that holds your issuers, recipients, credits, and data; owner: the person who created the tenant), only the owner can create, update, or delete the employer data. If another person tries, the endpoint returns 403.

Employer data model

Properties that start with sat take their values from the SAT catalogs (SAT: Mexico's tax authority, Servicio de Administración Tributaria). Look up their keys in CFDI 4.0 catalogs or through the SAT catalogs API.

Properties

  • Name
    id
    Type
    string?
    Description

    The ID assigned by Fiscalapi.

  • Name
    personId
    Type
    string
    required
    Description

    The ID of the person the employer data belongs to.

  • Name
    employerRegistration
    Type
    string
    required
    Description

    The employing person's employer registration number (registro patronal, assigned by IMSS, Mexico's Social Security Institute).

  • Name
    originEmployerTin
    Type
    string?
    Description

    The RFC (Mexico's taxpayer ID, Registro Federal de Contribuyentes) of the original employer, when the employer outsources the payroll payment.

  • Name
    satFundSourceId
    Type
    string?
    expandable
    Description

    The source of the employer's funds. SAT catalog c_OrigenRecurso. It applies only to employers that belong to the Sistema Nacional de Coordinación Fiscal (SNCF, the system that coordinates federal and state taxes in Mexico; a member government entity adds EntidadSNCF to its payroll CFDIs).

    Type
    enum:
    Values
    "IP""IF""IM"
  • Name
    ownResourceAmount
    Type
    number?
    conditional required
    Description

    The amount of the employer's own funds. It applies only to employers that belong to the SNCF. If you send it, satFundSourceId is required. It must be between 0 and 999,999,999,999.999999; if you send null, it isn't validated.


GET/api/v4/people/<personId>/employer

Get employer data

This endpoint returns a person's employer data by the person's ID.

Request

GET
/api/v4/people/<personId>/employer
curl --location 'https://test.fiscalapi.com/api/v4/people/<personId>/employer' \
--header 'X-TENANT-KEY: <tenant_key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'X-API-KEY: <api_key>'

Response

    {
    "data": {
        "personId": "bef56254-0892-4558-95c3-f9c8729e4b0e",
        "employerRegistration": "A1230768108",
        "originEmployerTin": "ARE180429TM6",
        "satFundSource": {
            "id": "IP",
            "description": "Ingresos propios.",
            "createdAt": "2024-08-10T15:46:30.373",
            "updatedAt": null
        },
        "ownResourceAmount": 1500,
        "id": "23f0b555-68bc-48fd-bb90-deb36ed25ef6",
        "createdAt": "2025-09-18T20:17:44.175",
        "updatedAt": "2025-09-18T20:17:48.489"
    },
    "succeeded": true,
    "message": "",
    "details": "",
    "httpStatusCode": 200
}

POST/api/v4/people/<personId>/employer

Create employer data

This endpoint creates a person's employer data. Each person has a single employer data record; if the person already has one, use Update employer data.

Request body

  • Name
    personId
    Type
    string
    required
    Description

    The ID of the person the employer data belongs to.

  • Name
    employerRegistration
    Type
    string
    required
    Description

    The employing person's employer registration number.

  • Name
    originEmployerTin
    Type
    string?
    Description

    The RFC of the original employer, when the employer outsources the payroll payment.

  • Name
    satFundSourceId
    Type
    string?
    expandable
    Description

    The source of the employer's funds. SAT catalog c_OrigenRecurso. It applies only to employers that belong to the SNCF.

    Type
    enum:
    Values
    "IP""IF""IM"
  • Name
    ownResourceAmount
    Type
    number?
    conditional required
    Description

    The amount of the employer's own funds. It applies only to employers that belong to the SNCF. If you send it, satFundSourceId is required. It must be between 0 and 999,999,999,999.999999; if you send null, it isn't validated.

Errors

Every case arrives as a validation failure on the field shown.

StatusWhen it happensMessage
400The person already has employer data. It fails on PersonId.La persona ya tiene datos de empleador: modifícalos con PUT /api/v4/people/{personId}/employer.
400You send ownResourceAmount without satFundSourceId. It fails on SatFundSourceId.OrigenRecurso es requerido cuando se especifica MontoRecursoPropio.
400ownResourceAmount is less than 0. It fails on OwnResourceAmount.MontoRecursoPropio debe ser mayor o igual a 0.
400ownResourceAmount is greater than 999,999,999,999.999999. It fails on OwnResourceAmount.MontoRecursoPropio no puede ser mayor a 999999999999.999999.

Request

POST
/api/v4/people
curl --location 'https://test.fiscalapi.com/api/v4/people/bef56254-0892-4558-95c3-f9c8729e4b0e/employer' \
--header 'X-TENANT-KEY: <tenant-key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
  "personId": "bef56254-0892-4558-95c3-f9c8729e4b0e",
  "employerRegistration": "B5510768108",
  "originEmployerTin": "URE180429TM6",
  "satFundSourceId": null,
  "ownResourceAmount": null
}'

Response

{
    "data": {
        "personId": "bef56254-0892-4558-95c3-f9c8729e4b0e",
        "employerRegistration": "B5510768108",
        "originEmployerTin": "URE180429TM6",
        "satFundSource": null,
        "ownResourceAmount": null,
        "id": "23f0b555-68bc-48fd-bb90-deb36ed25ef6",
        "createdAt": "2025-09-18T20:17:44.175",
        "updatedAt": "2025-09-18T20:17:44.175"
    },
    "succeeded": true,
    "message": "",
    "details": "",
    "httpStatusCode": 200
}

PUT/api/v4/people/<personId>/employer

Update employer data

This endpoint updates a person's employer data by the person's ID.

Request body

  • Name
    personId
    Type
    string
    required
    Description

    The ID of the person the employer data belongs to.

  • Name
    employerRegistration
    Type
    string
    required
    Description

    The employing person's employer registration number.

  • Name
    originEmployerTin
    Type
    string?
    Description

    The RFC of the original employer, when the employer outsources the payroll payment.

  • Name
    satFundSourceId
    Type
    string?
    expandable
    Description

    The source of the employer's funds. SAT catalog c_OrigenRecurso. It applies only to employers that belong to the SNCF.

    Type
    enum:
    Values
    "IP""IF""IM"
  • Name
    ownResourceAmount
    Type
    number?
    conditional required
    Description

    The amount of the employer's own funds. It applies only to employers that belong to the SNCF. If you send it, satFundSourceId is required. It must be between 0 and 999,999,999,999.999999; if you send null, it isn't validated.

Errors

Every case arrives as a validation failure on the field shown.

StatusWhen it happensMessage
400You send ownResourceAmount without satFundSourceId. It fails on SatFundSourceId.OrigenRecurso es requerido cuando se especifica MontoRecursoPropio.
400ownResourceAmount is less than 0. It fails on OwnResourceAmount.MontoRecursoPropio debe ser mayor o igual a 0.
400ownResourceAmount is greater than 999,999,999,999.999999. It fails on OwnResourceAmount.MontoRecursoPropio no puede ser mayor a 999999999999.999999.

Request

PUT
/api/v4/people/<personId>/employer
curl --location --request PUT 'https://test.fiscalapi.com/api/v4/people/bef56254-0892-4558-95c3-f9c8729e4b0e/employer' \
--header 'X-TENANT-KEY: <tenant-key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
  "personId": "bef56254-0892-4558-95c3-f9c8729e4b0e",
  "employerRegistration": "A1230768108",
  "originEmployerTin": "ARE180429TM6",
  "satFundSourceId": null,
  "ownResourceAmount": null
}'

Response

    {
    "data": {
        "personId": "bef56254-0892-4558-95c3-f9c8729e4b0e",
        "employerRegistration": "A1230768108",
        "originEmployerTin": "ARE180429TM6",
        "satFundSource": null,
        "ownResourceAmount": null,
        "id": "23f0b555-68bc-48fd-bb90-deb36ed25ef6",
        "createdAt": "2025-09-18T20:17:44.175",
        "updatedAt": "2025-09-18T20:19:20.569"
    },
    "succeeded": true,
    "message": "",
    "details": "",
    "httpStatusCode": 200
}

DELETE/api/v4/people/<personId>/employer

Delete employer data

This endpoint deletes a person's employer data by the person's ID.

Request

DELETE
/api/v4/people/<personId>/employer
curl --location --request DELETE 'https://test.fiscalapi.com/api/v4/people/bef56254-0892-4558-95c3-f9c8729e4b0e/employer' \
--header 'X-TENANT-KEY: <tenant-key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'X-API-KEY: <api-key>' \
--data ''

Response

{
    "data": true,
    "succeeded": true,
    "message": "",
    "details": "",
    "httpStatusCode": 200
}

Was this page helpful?