---
updatedAt: 2025-05-20T21:38:50.000Z
agentTools:
  projectIndex: https://developers.facturoporti.com.mx/llms.txt
---

# Agregar Certificado

Cuando se van a descargar xml o metadata es necesario tener la FIEL agregada ya que se usa para el monitoreo de los archivos generados por el SAT.

[![API Facturacion Electronica](https://cdn.facturoporti.com.mx/2024/08/Llama-ahora.webp)](https://facturoporti.com.mx/facturoporti-rest-api-timbrado-masivo/)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Api de Facturación Electrónica",
    "description": "¿Buscas la mejor api de facturación electrónica ademas validar efos, rfc, direcciones, etc.? Haz clic aquí",
    "contact": {
      "name": "API Soporte",
      "url": "https://www.facturoporti.com.mx/api-de-facturacion-electronica/",
      "email": "soporte@facturoporti.com.mx"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://testapi.facturoporti.com.mx",
      "description": "Servidor de pruebas"
    }
  ],
  "paths": {
    "/DescargarXml/certificado/agregar": {
      "post": {
        "tags": [
          "Descarga Masiva Xml"
        ],
        "summary": "Agregar Certificado",
        "description": "Cuando se van a descargar xml o metadata es necesario tener la FIEL agregada ya que se usa para el monitoreo de los archivos generados por el SAT.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificadoPeticion"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificadoPeticion"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CertificadoPeticion"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertificadoRespuesta"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "x-samples-languages": [
          "curl",
          "php",
          "csharp",
          "java",
          "javascript",
          "python",
          "ruby"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CertificadoPeticion": {
        "type": "object",
        "properties": {
          "idEmpresa": {
            "type": "string",
            "description": "Identificador único de la empresa o contribuyente al que pertenece el certificado",
            "nullable": true
          },
          "certificado": {
            "type": "string",
            "description": "Certificado del contribuyente en base64",
            "nullable": true
          },
          "llavePrivada": {
            "type": "string",
            "description": "Clave o llave privada del certificado del contribuyente en base64",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "Contraseña del certificado",
            "nullable": true
          },
          "tipoCertificado": {
            "$ref": "#/components/schemas/enumTipoCertificado"
          }
        },
        "additionalProperties": false,
        "description": "Entidad del certificado"
      },
      "CertificadoRespuesta": {
        "type": "object",
        "properties": {
          "codigo": {
            "type": "string",
            "description": "Código de respuesta del servicio, él valor 000 indica que no hubo error en la ejecución de la operación",
            "nullable": true
          },
          "mensaje": {
            "type": "string",
            "description": "Descripción del mensaje de la ejecución de la operación",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "enumTipoCertificado": {
        "enum": [
          1
        ],
        "type": "integer",
        "format": "int32"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    }
  },
  "externalDocs": {
    "description": "Puedes descargar y probar todos los ejemplos con Postman instalalo e importa los ejemplos",
    "url": "https://software.facturoporti.com.mx/TaaS/Json/Api/FacturoPorTi-RestApi.zip"
  },
  "x-samples-languages": [
    "curl",
    "php",
    "csharp",
    "java",
    "javascript",
    "python",
    "ruby"
  ]
}
```