{
  "openapi": "3.1.1",
  "info": {
    "title": "ApiReportes.Api | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api-masivos-qa.cne.gob.mx/"
    }
  ],
  "paths": {
    "/Acuse/{solicitudId}": {
      "get": {
        "tags": [
          "Acuse"
        ],
        "parameters": [
          {
            "name": "solicitudId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/Acuse/Pdf/{solicitudId}": {
      "get": {
        "tags": [
          "Acuse"
        ],
        "parameters": [
          {
            "name": "solicitudId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/pruebas/CalcularCadenaOriginal": {
      "post": {
        "tags": [
          "Pruebas"
        ],
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "efirma_password",
                  "ObligacionId",
                  "Version",
                  "Periodo"
                ],
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reporte": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "efirma_cerFile": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "efirma_keyFile": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "efirma_password": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ObligacionId": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "Version": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "Periodo": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "NumeroPermiso": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              }
            }
          }
        }
      }
    },
    "/pruebas/reporte/{solicitudId}": {
      "get": {
        "tags": [
          "Pruebas"
        ],
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "solicitudId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reportes/CrearSolicitudReporte": {
      "post": {
        "tags": [
          "Reportes"
        ],
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SolicitudRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SolicitudRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrearSolicitudReporteResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/reportes/CargarArchivoReporte/{solicitudId}": {
      "put": {
        "tags": [
          "Reportes"
        ],
        "parameters": [
          {
            "name": "solicitudId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reportes/ConsultarEstadoReporte/{solicitudId}": {
      "get": {
        "tags": [
          "Reportes"
        ],
        "parameters": [
          {
            "name": "solicitudId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reportes/PresentarReporte": {
      "post": {
        "tags": [
          "Reportes"
        ],
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "ObligacionId",
                  "Version",
                  "SelloDigitalBase64",
                  "Periodo"
                ],
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reporte": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "efirma_cerFile": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ObligacionId": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "Version": {
                        "pattern": "^-?(?:0|[1-9]\\d*)$",
                        "type": [
                          "integer",
                          "string"
                        ],
                        "format": "int32"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "SelloDigitalBase64": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "NumeroPermiso": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "Periodo": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CrearSolicitudReporteResponse": {
        "required": [
          "solicitudId",
          "estado",
          "urlCarga",
          "vigenciaUrlCarga"
        ],
        "type": "object",
        "properties": {
          "solicitudId": {
            "type": "string",
            "format": "uuid"
          },
          "estado": {
            "type": "string"
          },
          "urlCarga": {
            "type": "string"
          },
          "vigenciaUrlCarga": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DatosArchivoReporte": {
        "required": [
          "nombre",
          "sha256Base64"
        ],
        "type": "object",
        "properties": {
          "nombre": {
            "type": "string"
          },
          "sha256Base64": {
            "type": "string"
          },
          "tamanioBytes": {
            "maximum": 9223372036854776000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "DatosObligacion": {
        "type": "object",
        "properties": {
          "oblicacion_id": {
            "maximum": 4294967295,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "version": {
            "maximum": 4294967295,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "numeroPermiso": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Firma": {
        "required": [
          "contenidoCERT_Base64",
          "cadenaOriginal",
          "selloDigitalBase64"
        ],
        "type": "object",
        "properties": {
          "contenidoCERT_Base64": {
            "type": "string"
          },
          "cadenaOriginal": {
            "type": "string"
          },
          "selloDigitalBase64": {
            "type": "string"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "SolicitudRequest": {
        "required": [
          "obligacion",
          "archivoReporte",
          "firma"
        ],
        "type": "object",
        "properties": {
          "obligacion": {
            "$ref": "#/components/schemas/DatosObligacion"
          },
          "archivoReporte": {
            "$ref": "#/components/schemas/DatosArchivoReporte"
          },
          "firma": {
            "$ref": "#/components/schemas/Firma"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Acuse"
    },
    {
      "name": "Pruebas"
    },
    {
      "name": "Reportes"
    }
  ]
}