---
title: Mexico RFC Fetch
slug: mena-apis/mexico-rfc-fetch
createdAt: 2024-10-28T13:28:33.592Z
---

## Overview

The Mexico RFC Fetch API is designed to facilitate the retrieval of detailed information about Registered Federal Contributors (RFC) in Mexico. This asynchronous API mechanism involves two API calls: the first to submit a request and the second to retrieve the result either via a webhook callback or a direct fetch using the request ID.

## Use Case

This API is beneficial for financial institutions, tax advisors, and businesses that need to verify the authenticity of RFC details either for individuals (Personal Finance - PF) or entities (Personal Morales - PM). It supports compliance checks, customer verification during onboarding, and ensures accurate tax-related documentation.

## API Details

### API 1: RFC Reqest

### Request Body

Initiate the process by submitting the RFC data:

:::CodeblockTabs
Preproduction

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/global-kyc-fetch/mx/rfc' \
--header 'Authorization: <----Auth Token---->' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rfc": "DIMV970321K28",
    "accountType": "PF",
    "consent": true,
    "callbackUrl": "https://webhook.site/fh37b379-f561-4dbe-9160-7245f74cd80b"
}'
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/global-kyc-fetch/mx/rfc' \
--header 'Authorization: <----Auth Token---->' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rfc": "DIMV970321K28",
    "accountType": "PF",
    "consent": true,
    "callbackUrl": "https://webhook.site/fh37b379-f561-4dbe-9160-7245f74cd80b"
}'
```
:::

### Request Body Parameters

| Parameter     | Description                                                    | Optional/Mandatory | Data Type |
| ------------- | -------------------------------------------------------------- | ------------------ | --------- |
| `rfc`         | The RFC number to retrieve data for                            | Mandatory          | String    |
| `accountType` | Type of account, either 'PF' for personal or 'PM' for business | Mandatory          | String    |
| `consent`     | Consent to process the data                                    | Mandatory          | Boolean   |
| `callbackUrl` | URL to receive the callback with results                       | Mandatory          | String    |

### Response Body

The initial API call provides a processing status:

:::CodeblockTabs
102 - Successful

```curl
{
    "result": {
        "requestId": "6710fe960ddfa331ae1608d6",
        "statusCode": 102,
        "status": "PROCESSING"
    }
}
```
:::

### Response Body Parameters

| Parameter    | Description                                   | Data Type |
| ------------ | --------------------------------------------- | --------- |
| `requestId`  | Unique identifier for the request             | String    |
| `statusCode` | Status code of the request (102 = Processing) | Integer   |
| `status`     | Status of the request, e.g., 'PROCESSING'     | String    |

### API 2: RFC Data Retrieval

### Request Body

Retrieve the results using the requestId:

:::CodeblockTabs
Preproduction

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/global-kyc-fetch/mx/rfc-get-data' \
--header 'Authorization: <---Auth Token--->' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestId": "6710fe960ddfa331ae1608d6"
}'
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/global-kyc-fetch/mx/rfc-get-data' \
--header 'Authorization: <---Auth Token--->' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestId": "6710fe960ddfa331ae1608d6"
}'
```
:::

### Request Body Parameters

| Parameter   | Description                                    | Optional/Mandatory | Data Type |
| ----------- | ---------------------------------------------- | ------------------ | --------- |
| `requestId` | The requestId returned from the first API call | Mandatory          | String    |

### Response Body

The final data can be fetched or received through the webhook:

:::CodeblockTabs
Successful Response

```json
{
    "result": {
        "requestId": "671100b90yyfa331ae1608f7",
        "input": {
            "rfc": "DIMV970321K28",
            "accountType": "PF",
            "consent": true
        },
        "status": "SUCCESS",
        "result": {
            "rfc": "DIMV970321KG0",
            "state": "Active",
            "type": "Digital Seal Certificate",
            "name": "VICTOR MENDEZ",
            "orgName": "VICTOR MENDEZ",
            "email": "maos.viu6@gmail.com",
            "curp": "DIMV970321HSUJK07",
            "issueDate": "2024-06-26 02:58:10",
            "expiryDate": "2028-06-26 02:58:10",
            "counselRfc": "",
            "counselCurp": ""
        }
    }
}
```
:::

### Response Body Parameters

The detailed response includes the original input and the fetched RFC details.

| Parameter            | Description                                  | Data Type |
| -------------------- | -------------------------------------------- | --------- |
| `requestId`          | Unique identifier for the retrieval request  | String    |
| `statusCode`         | HTTP status code                             | Integer   |
| `status`             | Status of the request, e.g., 'SUCCESS'       | String    |
| `message`            | Descriptive message about the request status | String    |
| `output`             | Object containing detailed RFC information   | Object    |
| `output.rfc`         | RFC number as originally requested           | String    |
| `output.curp`        | CURP associated with the RFC (if available)  | String    |
| `output.name`        | Name associated with the RFC                 | String    |
| `output.companyName` | Company name if 'PM' account type            | String    |
| `output.email`       | Contact email associated with the RFC        | String    |

## Error Code and Response Mapping

:::CodeblockTabs
400 (Bad Request)

```json
{
  "error": {
     "name": "error",
     "message": "Bad Input and description ",
     "status": 400,
     "reason": "VALIDATION_ERROR",
     "type": "Bad Request",
     "statusCode": 400
  }
}
```

401(Unauthorized)

```json
{
  "error": {
     "name": "error",
     "message": "Invalid authentication credentials",
     "status": 401,
     "reason": "AUTHENTICATION_ERROR",
     "type": "Bad Request",
     "statusCode": 401
  }
}
```

403 (Forbidden)

```json
{
  "error": {
     "name": "error",
     "message": "Forbidden",
     "reason": "ERROR",
     "type": "Bad Request",
     "statusCode": "403"
  }
}
```

500 (Internal Server Error)

```json
{
  "error": {
     "name": "error",
     "message": "Internal server error",
     "status": 500,
     "reason": "ERROR",
     "type": "Bad Request",
     "statusCode": 500
  }
}
```

409(Upstream Down

```json
{
  "error": {
     "name": "error",
     "message": "Upstream Down",
     "status": 409,
     "reason": "ERROR",
     "type": "Bad Request",
     "statusCode": 409
  }
}
```
:::

| **Field**    | **Type** | **Description**                                     |
| ------------ | -------- | --------------------------------------------------- |
| `name`       | string   | Text displayed on the screen explaining error type. |
| `reason`     | string   | Reason for the error.                               |
| `status`     | number   | HTTP status code.                                   |
| `message`    | string   | Error message indicating an upstream error.         |
| `type`       | string   | Error type.                                         |
| `statusCode` | number   | Status code representing the error scenario.        |

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.

You can reach out to us at [help@signzy.com](#). We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
:::

