Obtaining Personal Data from a PM RFC

Data from a RFC of a Persona Moral (PM)

Intro

With this API, you can retrieve the data of a PM's (Persona Moral) RFC (Registro Federal de Contribuyentes).

Important points

Request

To make the request it is only necessary to provide the RFC for a PM.

fieldtyperequiredlengthDescription
rfcAlphanumericYes12Provide a valid RFC.
It can be an RFC of a PM with a length of 12 characters.

If you want to validate the RFC (Registro Federal de Contribuyentes) of the PF (Persona Física) or PM (Persona Moral), you can use this service to ensure that the RFC provided is correct.

If you are not sure how to obtain this field and you have your client's personal data, we suggest you visit our RFC generate RFC service to generate the RFC.

Successful response

Inside the response object you will only get the next fields.

field NameDescription
curpRepresentanteLegalIt will indicate the CURP of the legal representative of the company.
emailIt will indicate the email of the legal representative of the company.
statusIndicates a response status for the query made, the possible values are FOUND, NOT_FOUND, INVALID.
razonSocialIt will indicate the name of the company.
messageA message will be displayed describing the problem why the SSN could not be retrieved
{
    "id": "65281a530a3186c567f6b948",
    "createdAt": "2023-10-12T10:09:55.150693-06:00",
    "finishedAt": "2023-10-12T10:10:13.72024-06:00",
    "duration": 18569,
    "status": "SUCCESS",
    "request": {
        "rfc": "NKO080220554"
    },
    "response": {
        "curpRepresentanteLegal": " AISC830531MDFRSY07",
        "email": "[email protected]",
        "estatus": "FOUND",
        "razonSocial": "NKONECT SA DE CV",
        "rfcRepresentanteLegal": "AISC830531I14"
    }
}

Not found

📘

Status NOT FOUND

If the response indicates a NOT_FOUND status, it means that the data could not be recovered, even though the response has an HTTP code 200. This occurs because we accessed the SAT system to validate the RFC provided .

For more details we suggest you see the Possible Not Found Responses section.

You will receive this response with an HTTP code 200 when we were able to successfully query the RFC provided to the SAT. However, no data was found registered under that RFC with the SAT.

{
    "id": "65281b5300e2e3f2aecec92b",
    "createdAt": "2023-10-12T10:14:11.626772-06:00",
    "finishedAt": "2023-10-12T10:14:16.158018-06:00",
    "duration": 4531,
    "status": "SUCCESS",
    "request": {
        "rfc": "KIB801010CLO"
    },
    "response": {
        "estatus": "NOT_FOUND",
        "mensaje": "No encontramos datos registrados ante el SAT"
    }
}

Test the service (test cases)

We have included a query parameter in Sandbox to enable you to query the test cases that we created for running tests. To get a response, fill the testCaseId parameter with any of the following cases:

NumIdNameDescription
1663567bb713cf2110a1106d5No encontradoIndicates that no information was found for the data provided
2663567bb713cf2110a1106d4Respuesta exitosaIndicates one successful response

📘

Test your own test case

In case you want to test your own test case created in link, you can send in the testCaseId parameter the identifier of the test case you want to use.

For more information visit our knowledge center to know more about test cases

Listing the possible error responses

Required fields

You will get a 400 bad request error when the RFC is not provided in the request body.

[
    {
        "code": "EMPTY_ERROR",
        "message": "can't be empty",
        "field": "rfc"
    }
]

Invalid format

You will get a 400 bad request error when the RFC does not conform the specific format.

[
    {
        "code": "FORMAT_ERROR",
        "message": "should be in rfc format",
        "field": "rfc"
    }
]

Test case not found

If a test case parameter is not sent or a value other than those mentioned above is sent, the service will return the following error 400 bad request

[
    {
        "code": "EMPTY_ERROR",
        "message": "test case not found",
        "field": "testCase"
    },
    {
        "code": "EMPTY_ERROR",
        "message": "test case not found with given id",
        "field": "testCaseId"
    }
]

NOT FOUND

You will get a 200 http code response when we could not find data on the SAT platform associated with the RFC provided

{
    "id": "65281b5300e2e3f2aecec92b",
    "createdAt": "2023-10-12T10:14:11.626772-06:00",
    "finishedAt": "2023-10-12T10:14:16.158018-06:00",
    "duration": 4531,
    "status": "SUCCESS",
    "request": {
        "rfc": "KIB801010CLO"
    },
    "response": {
        "estatus": "NOT_FOUND",
        "mensaje": "No encontramos datos registrados ante el SAT"
    }
}

Length error

RFC length provided is not correct, the service will return the following error 400 bad request

[
    {
        "code": "LENGTH_ERROR",
        "message": "should be == 12",
        "field": "rfc"
    }
]

Unauthorized

It means that the provided API is incorrect and that you are not authorized to access it. You will not receive a body, only a 401 HTTP code.

Language
Authorization
Header
Click Try It! to start a request and see the response here!