---
updatedAt: 2026-05-18T22:01:31.000Z
agentTools:
  projectIndex: https://docs.kiban.com/llms.txt
---

# Validation for RFCs with data

API to validate multiple RFCs with data

## Intro

This API is meant to validate a list of RFCs for *Persona Física* and for *Persona Moral* with the full tax information in the SAT system, checking for every RFC if the postal code and name of the person is correct.

## Important points

### Mandatory Fields

The request contains a list called *rfcs*, it is mandatory to send at least one element.\
The fields *rfc*, *cp* and *nombre* are mandatory for every RFC sent.\
The field "nombre" can contain a name of a Persona Física or the razón social of a Persona Moral.

<Table align={["left","left","left","left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        field
      </th>

      <th style={{ textAlign: "left" }}>
        subfield
      </th>

      <th style={{ textAlign: "left" }}>
        type
      </th>

      <th style={{ textAlign: "left" }}>
        required
      </th>

      <th style={{ textAlign: "left" }}>
        length
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        skipNormalizeName
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        Boolean
      </td>

      <td style={{ textAlign: "left" }}>
        No
      </td>

      <td style={{ textAlign: "left" }}>
        N/A
      </td>

      <td style={{ textAlign: "left" }}>
        If you need to send special characters like &, Ñ, or . in the subfield name, these characters will not be removed. 
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        rfcs
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        Array
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        N/A
      </td>

      <td style={{ textAlign: "left" }}>
        array containing the list of RFCs that will be consulted
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        rfc
      </td>

      <td style={{ textAlign: "left" }}>
        Alphanumeric
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        13
      </td>

      <td style={{ textAlign: "left" }}>
        Provide a valid RFC.  
        It can be an RFC for a PF with a length of 13 characters or an RFC for a PM with 12 characters.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        cp
      </td>

      <td style={{ textAlign: "left" }}>
        Numeric
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        5
      </td>

      <td style={{ textAlign: "left" }}>
        indicate the 5-digit zip code
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        nombre
      </td>

      <td style={{ textAlign: "left" }}>
        Alphabetic
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        N/A
      </td>

      <td style={{ textAlign: "left" }}>
        name or company name defined for the RFC.
      </td>
    </tr>
  </tbody>
</Table>

If you are not sure how to obtain the RFC field and you have your client's personal data, we suggest you visit our RFC [generate RFC](https://docs.kiban.cloud/reference/sat-generate-rfc-pf) service to generate the RFC.

### Validations applied

For the field *rfc*, kiban cloud applies a RFC format validation according to the SAT rules, the RFC must contain an RFC with homoclave and could be for Persona Física or Persona Moral.

## 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   | 663567bb713cf2110a1106d0 | Invalido          | Indicates that the RFC is invalid |
| 2   | 663567a9713cf2110a110673 | Respuesta exitosa | Indicates that the RFC is valid   |

> 📘 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](https://help.kiban.com/en/articles/2074434)
>
> <Image align="center" width="200px" src="https://files.readme.io/b69ac92-Captura_de_Pantalla_2023-10-18_a_las_19.44.33.png" />

## Successful response

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

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        field Name
      </th>

      <th>
        subfield
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        rfcs
      </td>

      <td>

      </td>

      <td>
        array containing the list of RFCs that were queried.
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        rfc
      </td>

      <td>
        It will indicate the RFC consulted.
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        nombre
      </td>

      <td>
        name or company name recovered for the RFC
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        cp
      </td>

      <td>
        zip code retrieved for the RFC
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        result
      </td>

      <td>
        It will display a message indicating the status of the RFC.

        * RFC válido, y susceptible de recibir facturas
        * RFC no registrado en el padrón de contribuyentes
        * El nombre, denominación o razón social no coincide con el registrado en el RFC
        * El Código Postal no coincide con el registrado en el RFC.
      </td>
    </tr>
  </tbody>
</Table>

```json Successful response
{
    "id": "655ffe922bacd50889a58400",
    "createdAt": "2023-11-24T01:38:26.556261308Z",
    "finishedAt": "2023-11-24T01:38:26.90064124Z",
    "duration": 344,
    "status": "SUCCESS",
    "request": {
        "rfcs": [
            {
                "cp": "06500",
                "nombre": "Felipe Garcia",
                "rfc": "XVRS900119U23"
            },
            {
                "cp": "09810",
                "nombre": "juan lopez",
                "rfc": "LSRT900119U2A"
            }
        ]
    },
    "response": {
        "rfcs": [
            {
                "cp": "09810",
                "nombre": "Jose Montes",
                "result": "RFC válido, y susceptible de recibir facturas",
                "rfc": "MAMA900119U24"
            },
            {
                "cp": "09810",
                "nombre": "Andres Torres",
                "result": "RFC válido, y susceptible de recibir facturas",
                "rfc": "XZXZ900119U24"
            }
        ]
    }
}
```

<br />

## Listing the possible not success responses

### Required RFCs

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

```json Required fields
{
    "RFCs": "EMPTY_ERROR; can't be empty"
}
```

### Empty RFC

You will get a 400 bad request error when the array does not contain at least one ***rfc*** is not provided in the request body.

```json Length error
{
    "rfc[1]": "EMPTY_ERROR; can't be empty"
}
```

### Empty postal code

You will get a 400 bad request error when the array does not contain at least one ***rfc*** is not provided in the request body.

```json Length error
{
    "cp[1]": "EMPTY_ERROR; can't be empty"
}
```

### Empty name

You will get a 400 bad request error when the array does not contain at least one ***rfc*** is not provided in the request body.

```json Length error
{
    "nombre[1]": "EMPTY_ERROR; can't be empty"
}
```

### Test case not found

In sandbox environment, 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

```json Test case
{
    "testCase": "EMPTY_ERROR; test case not found",
    "testCaseId": "EMPTY_ERROR; test case not found with given id"
}
```

### RFC Invalid Format

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

```json
{
    "rfc[1]": "FORMAT_ERROR; should be in rfc format with homoclave"
}
```

### Zip code Invalid Format

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

```json
{  
    "cp[1]": "FORMAT_ERROR; should be in postal code format"  
}
```

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

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "link",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://sandbox.link.kiban.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v2/sat/rfc_validate_from_data?testCase={testCase}": {
      "post": {
        "summary": "Validation for RFCs with data",
        "description": "API to validate multiple RFCs with data",
        "operationId": "validation-for-rfcs-with-data",
        "parameters": [
          {
            "name": "testCaseId",
            "in": "query",
            "description": "Send the id of the test case to consume",
            "schema": {
              "type": "string",
              "default": "663567bb713cf2110a1106d0"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "string",
                    "format": "json"
                  }
                }
              },
              "examples": {
                "Request": {
                  "value": {
                    "rfcs": [
                      {
                        "rfc": "NKO080220554",
                        "cp": "06500",
                        "nombre": "NKONECT"
                      },
                      {
                        "rfc": "MAMJ900119U2A",
                        "cp": "09810",
                        "nombre": "juan Paterno"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success": {
                    "value": "{\n    \"id\": \"655ffbb22bacd50889a583fa\",\n    \"createdAt\": \"2023-11-24T01:26:10.228704229Z\",\n    \"finishedAt\": \"2023-11-24T01:26:10.379991584Z\",\n    \"duration\": 151,\n    \"status\": \"SUCCESS\",\n    \"request\": {\n        \"rfcs\": [\n            {\n                \"cp\": \"10321\",\n                \"nombre\": \"Felipe Garcia\",\n                \"rfc\": \"XVRS900119U23\"\n            },\n            {\n                \"cp\": \"09810\",\n                \"nombre\": \"Empresas Torres\",\n                \"rfc\": \"TOR900119U20\"\n            }\n        ]\n    },\n    \"response\": {\n        \"rfcs\": [\n            {\n                \"cp\": \"09810\",\n                \"nombre\": \"Felipe Garcia Villela\",\n                \"result\": \"RFC válido, y susceptible de recibir facturas\",\n                \"rfc\": \"ABCD900119U24\"\n            },\n            {\n                \"cp\": \"09810\",\n                \"nombre\": \"Empresas Torres\",\n                \"result\": \"RFC válido, y susceptible de recibir facturas\",\n                \"rfc\": \"TOR900119U20\"\n            }\n        ]\n    }\n}"
                  },
                  "Success invalid": {
                    "value": "{\n    \"id\": \"655ffc272bacd50889a583fb\",\n    \"createdAt\": \"2023-11-24T01:28:07.001507424Z\",\n    \"finishedAt\": \"2023-11-24T01:28:07.32893186Z\",\n    \"duration\": 327,\n    \"status\": \"SUCCESS\",\n    \"request\": {\n        \"rfcs\": [\n            {\n                \"cp\": \"10321\",\n                \"nombre\": \"Felipe Garcia\",\n                \"rfc\": \"ACDB900119U23\"\n            },\n            {\n                \"cp\": \"09810\",\n                \"nombre\": \"juan Paterno\",\n                \"rfc\": \"YYYY900119U2A\"\n            }\n        ]\n    },\n    \"response\": {\n        \"rfcs\": [\n            {\n                \"cp\": \"10321\",\n                \"nombre\": \"Felipe Garcia\",\n                \"result\": \"El nombre, denominación o razón social no coincide con el registrado en el RFC\",\n                \"rfc\": \"ACDB900119U23\"\n            },\n            {\n                \"cp\": \"09810\",\n                \"nombre\": \"juan Paterno\",\n                \"result\": \"El Código Postal no coincide con el registrado en el RFC.\",\n                \"rfc\": \"YYYY900119U2A\"\n            }\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "655ffbb22bacd50889a583fa"
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2023-11-24T01:26:10.228704229Z"
                        },
                        "finishedAt": {
                          "type": "string",
                          "example": "2023-11-24T01:26:10.379991584Z"
                        },
                        "duration": {
                          "type": "integer",
                          "example": 151,
                          "default": 0
                        },
                        "status": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "request": {
                          "type": "object",
                          "properties": {
                            "rfcs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cp": {
                                    "type": "string",
                                    "example": "10321"
                                  },
                                  "nombre": {
                                    "type": "string",
                                    "example": "Felipe Garcia"
                                  },
                                  "rfc": {
                                    "type": "string",
                                    "example": "XVRS900119U23"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "response": {
                          "type": "object",
                          "properties": {
                            "rfcs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cp": {
                                    "type": "string",
                                    "example": "09810"
                                  },
                                  "nombre": {
                                    "type": "string",
                                    "example": "Felipe Garcia Villela"
                                  },
                                  "result": {
                                    "type": "string",
                                    "example": "RFC válido, y susceptible de recibir facturas"
                                  },
                                  "rfc": {
                                    "type": "string",
                                    "example": "ABCD900119U24"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Success invalid",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "655ffc272bacd50889a583fb"
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2023-11-24T01:28:07.001507424Z"
                        },
                        "finishedAt": {
                          "type": "string",
                          "example": "2023-11-24T01:28:07.32893186Z"
                        },
                        "duration": {
                          "type": "integer",
                          "example": 327,
                          "default": 0
                        },
                        "status": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "request": {
                          "type": "object",
                          "properties": {
                            "rfcs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cp": {
                                    "type": "string",
                                    "example": "10321"
                                  },
                                  "nombre": {
                                    "type": "string",
                                    "example": "Felipe Garcia"
                                  },
                                  "rfc": {
                                    "type": "string",
                                    "example": "ACDB900119U23"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "response": {
                          "type": "object",
                          "properties": {
                            "rfcs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cp": {
                                    "type": "string",
                                    "example": "10321"
                                  },
                                  "nombre": {
                                    "type": "string",
                                    "example": "Felipe Garcia"
                                  },
                                  "result": {
                                    "type": "string",
                                    "example": "El nombre, denominación o razón social no coincide con el registrado en el RFC"
                                  },
                                  "rfc": {
                                    "type": "string",
                                    "example": "ACDB900119U23"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Mandatory Array": {
                    "value": "{\n    \"RFCs\": \"EMPTY_ERROR; can't be empty\"\n}"
                  },
                  "Mandatory fields of array": {
                    "value": "{\n    \"cp[1]\": \"EMPTY_ERROR; can't be empty\",\n    \"nombre[1]\": \"EMPTY_ERROR; can't be empty\",\n    \"rfc[1]\": \"EMPTY_ERROR; can't be empty\"\n}"
                  },
                  "RFC format error": {
                    "value": "{\n    \"rfc[1]\": \"FORMAT_ERROR; should be in rfc format with homoclave\"\n}"
                  },
                  "CURP format error": {
                    "value": "{\n    \"cp[1]\": \"FORMAT_ERROR; should be in postal code format\"\n}"
                  },
                  "Test case not found": {
                    "value": "[\n    {\n        \"code\": \"EMPTY_ERROR\",\n        \"message\": \"test case not found with given id\",\n        \"field\": \"testCaseId\"\n    }\n]"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Mandatory Array",
                      "type": "object",
                      "properties": {
                        "RFCs": {
                          "type": "string",
                          "example": "EMPTY_ERROR; can't be empty"
                        }
                      }
                    },
                    {
                      "title": "Mandatory fields of array",
                      "type": "object",
                      "properties": {
                        "cp[1]": {
                          "type": "string",
                          "example": "EMPTY_ERROR; can't be empty"
                        },
                        "nombre[1]": {
                          "type": "string",
                          "example": "EMPTY_ERROR; can't be empty"
                        },
                        "rfc[1]": {
                          "type": "string",
                          "example": "EMPTY_ERROR; can't be empty"
                        }
                      }
                    },
                    {
                      "title": "RFC format error",
                      "type": "object",
                      "properties": {
                        "rfc[1]": {
                          "type": "string",
                          "example": "FORMAT_ERROR; should be in rfc format with homoclave"
                        }
                      }
                    },
                    {
                      "title": "CURP format error",
                      "type": "object",
                      "properties": {
                        "cp[1]": {
                          "type": "string",
                          "example": "FORMAT_ERROR; should be in postal code format"
                        }
                      }
                    },
                    {
                      "title": "Test case not found",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "EMPTY_ERROR"
                          },
                          "message": {
                            "type": "string",
                            "example": "test case not found with given id"
                          },
                          "field": {
                            "type": "string",
                            "example": "testCaseId"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```