Data from a RFC of a Persona Física (PF)
Intro
With this API, you can retrieve the data of a PF's (Persona Física) RFC (Registro Federal de Contribuyentes).
Important points
To make the request it is only necessary to provide the RFC for a PF.
field | type | required | length | Description |
---|---|---|---|---|
rfc | Alphanumeric | Yes | 13 | Provide a valid RFC. It can be an RFC of a PF with a length of 13 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 Name | Description |
---|---|
curp | It will indicate the CURP recovered from the person. |
It will indicate the email recovered from the person | |
status | Indicates a response status for the query made, the possible values are FOUND, NOT_FOUND, INVALID. |
nombreCompleto | It will indicate the complete name recovered from the person |
message | A message will be displayed describing the problem why the SSN could not be retrieved |
{
"id": "65281b3e00e2e3f2aecec92a",
"createdAt": "2023-10-12T10:13:50.218355-06:00",
"finishedAt": "2023-10-12T10:13:56.830514-06:00",
"duration": 6612,
"status": "SUCCESS",
"request": {
"rfc": "KIBA900810BPA"
},
"response": {
"curp": "XXXXXXXXXXXXXXXXXX",
"email": "[email protected]",
"estatus": "FOUND",
"nombreCompleto": "Bob Dole"
}
}
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": "KIBA801010CLO"
},
"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:
Num | Id | Name | Description |
---|---|---|---|
1 | 663567bb713cf2110a1106d3 | No encontrado | Indicates that no information was found for the data provided |
2 | 663567bb713cf2110a1106d2 | Respuesta exitosa | Indicates 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 NOT FOUND 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"
}
]
Length error
RFC length provided is not correct, the service will return the following error 400 bad request
[
{
"code": "LENGTH_ERROR",
"message": "should be == 13",
"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.