NOM-151 Constancies Validation

Sovos (Advantage Security, S. de R.L. de C.V.) as an Certification Services Provider (PSC) offers the service to validate NOM-151 Constancies.

Content

In this document, you will find detailed information about the SOAP webservice to perform the following functions:

  • validaFolioNOM151
  • validaNOM151

Audience

This document is aimed at system personnel in charge of develop the applications that will connect to the webservices provided by Sovos to obtain validation constancies for the digestion of an electronic document and a NOM-151 preservation constancy issued by Sovos.

Background

Sovos service for validation of constancies can process requests that have the digital fingerprint value (digestion) belonging to their original file and its preservation constancy file.

You can get the fingerprint through any of the digestion functions (HASH) allowed by the Ministry of Economy and must match the one used when you requested a NOM-151 Constancy.

This service allows to perform the validation through 2 options: * Requester has the file of the preservation constancy. * Requester gives the certificate folio of the issued constancy.

As a result of the validation, the service returns a PDF document called a Validation Constancy containing an evidence sheet of the results.

The evidence sheet is divided into 5 sections: * Section 1. Indicates the date and time at validation time, and the result of the 3 verification processes performed. - Correlation between the given digestion value and the digestion value in the certificate. - Validity of the seal of the constancy. Indicates that the constancy is valid and authentic in respect of the seal on it. - Issuance by the PSC. Indicates the constancy was issued by Sovos. There's also a QR Code in the first section with the summary of the validation process.

  • Section 2. Describes the name of the validated file and the value of its digital fingerprint.
  • Section 3. Indicates the information in the validated preservation constancy.
  • Section 4. Provides the policy identifier and the name of the PSC stated in the validated preservation constancy.
  • Section 5. Provides the value of the electronic signature of the time stamping seal of the validation constancy.

Here is an example of the Evidence Sheet of the validation constancy with sample data. In the production environment the data will change.

Ejemplo hoja de evidencia

SOAP webservice for NOM-151 certificate validation description

The SOAP webservice to obtain validation constancies is available for institutions that have been enrolled and authorized based on the contract procedures established by Sovos.

The functions or methods available through the webservice are:

  • validaFolioNOM151
  • validaNOM151

Each method is intended for a specific functionality. The description of the functionalities is:

  • validaFolioNOM151.- This method performs the validation of the document's fingerprint and the folio number of the constancy that the requester institution provided. Only the folios of constancies issued for the institution will be validated.
  • validaNOM151.- This method performs the validation of the document fingerprint and the NOM-151 preservation constancy file.

Requirements for the interaction with the SOAP Web Service

The requirements the institutions asking for a preservation constancy must fulfill are:

  • Have an internet connection to access the service web location.
  • Request Sovos for the credentials to access the service.
  • Confirm with Sovos the addresses to access the webservice in the test and production environment.

Location of the service

The URLs where you can find the webservice definition for each environment are:

Environment WSDL Location
UAT https://pilot-psc.reachcore.com/wsnom_validacion/webservice.asmx?WSDL
Production https://nom151.advantage-security.com/wsnom_reporteValidacion/webservice.asmx?WSDL

Description of the webservice methods

validaFolioNOM151

Request to validaFolioNOM151

Header

Parameter Usage Description Data type
entidad Required Unique code assigned to the institution that hired the service. String (20)
usuario Required Account of the assigned user by the institution to access the webservice. String (20)
clave Required Password assigned by the user to operate the webservice. String (20)

Body

Parameter Usage Description Data type
nombreArchivoOriginal Required Name of the document that will be included in the evidence sheet. String (200)
huellaDigitalArchivo Required Value of the digestion obtained from the original document. Must be encoded in Base64. Base64
folio Required This is the full value from the constancy folio. Numeric

Example of request to validaFolioNom151:


   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
       <soap:Header>
          <tem:AuthSoapHd>
             <tem:Entidad>Entidad</tem:Entidad>
             <tem:Usuario>nombre_usuario</tem:Usuario>
             <tem:Clave>Contraseña</tem:Clave>
          </tem:AuthSoapHd>
       </soap:Header>
       <soap:Body>
          <tem:validaFolioNOM151>
             <tem:nombreArchivoOriginal>Especificaciones.pdf</tem:nombreArchivoOriginal>
             <tem:huellaDigitalArchivo>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</tem:huellaDigitalArchivo>
             <tem:folio>10526380</tem:folio>
          </tem:validaFolioNOM151>
       </soap:Body>
    </soap:Envelope>
    

Response from validaFolioNOM151

Parameter Description Data type
Estado Numeric value that indicates the result of the executed method. Its value is zero when the process was successfully executed and other than zero when an exception was generated when processing the request. Numeric
Descripcion Description of the numerical value on the Estado element String (200)
validaFecha Time and date of the moment of the validation and generation of the proof sheet. The hour matches Mexico Central Time zone and it is reported as "YYYY/MM/DD HH24:MI:SS". String (19)
validaRelacion Boolean value indicating if the file digestion values and the digestion in the certificate are the same. If true, the returned value is "true", if they do not match the returned value is "false". Boolean
validaSello Boolean value indicating if the integrity of the certificate is correct. If the certificate is complete the returned value is "true", if the certificate is not valid the returned value is "false". Boolean
validaPSC Boolean value indicating if the name of the Service Provider matches Sovos. In case the name matches the returned value is "true" and if the name is different, it will be "false". Boolean
documentoNombre Name of the document that will appear in the proof sheet String (200)
documentoHuellaDigital Value of the digestion SHA256 or SHA512 obtained from the document sent to validate. Must be encoded in Base64. Base64
constanciaSerie Folio number of the NOM-151 preservation constancy used for the validation. Numeric
constanciaHuellaDigital SHA256 or SHA512 digestion value obtained when processing the constancy received for validation. Base64
constanciaFecha Time and date when the constancy was generated in the UTC time zone in the format YYYYMMDDHH24:MI:SS.MSSZ String (21)
constanciaAlgoritmo Name of the algorithm identified in the NOM-151 constancy. Its allowed value is a SHA-256. String (7)
constanciaSello Electronic signature contained in the NOM-151 constancy, encoded in Base64, and generated by the Sovos PSC. Base64
pscPolitica Policy identifier assigned by the Secretary of Economy to the NOM-151 services of Sovos. String (100)
pscNombrePSC Distinctive name of Sovos to issue NOM-151 constancies. String (200)
qrPDF Summary of the information for the validation contained in the QR code of the PDF report.
Summary will be available on Production environment for 365 days, for UAT it will be 7 days
String (200)
reportePDF PDF report encoded in Base64 and containing the representation of the validation process. Base64

Example of response from validaFolioNom151:


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <validaFolioNOM151Response xmlns="http://tempuri.org/">
         <validaFolioNOM151Result>
            <Estado>0</Estado>
            <Descripcion>Satisfactorio</Descripcion>
            <validaFecha>2022/01/31 12:27:39</validaFecha>
            <validaRelacion>true</validaRelacion>
            <validaSello>true</validaSello>
            <validaPSC>true</validaPSC>
            <documentoNombre>Especificaciones.pdf</documentoNombre>
            <documentoHuellaDigital>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</documentoHuellaDigital>
            <constanciaSerie>10526380</constanciaSerie>
            <constanciaHuellaDigital>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</constanciaHuellaDigital>
            <contanciaFecha>20220131182502.115Z</contanciaFecha>
            <constanciaAlgoritmo>SHA-256</constanciaAlgoritmo>
            <pscPolitica>1.16.484.101.10.316.1.2</pscPolitica>
            <pscNombre>PSC Advantage Security (Pruebas)</pscNombre>
            <qrPDF>||10526380|Especificaciones.pdf|PSC Advantage Security (Pruebas)|2022/01/31 12:27:39|true|true|true||</qrPDF>
            <constanciaSello>UWMFZHkm7LetSmx2xrDstZn1Gx+OI8pGrxKtapGLLdsfZWyDbnPlu8OHOIfDVf6Opx7gMCZm78MVrFyuppXc8uZ+GBMPsGc+Sa7by7Y=...</constanciaSello>
            <reportePDF>JVBERi0xLjQKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAyMjAxMzExM...</reportePDF>
         </validaFolioNOM151Result>
      </validaFolioNOM151Response>
   </soap:Body>
</soap:Envelope>

validaNOM151

Request to validaNOM151

Header

Parameter Usage Description Data type
entidad Required Unique code assigned to the institution that hired the service String (20)
usuario Required Account of the assigned user by the institution to access the webservice String (20)
clave Required Password assigned by the user to operate the webservice String (20)

Body

Parameter Usage Description Data type
nombreArchivoOriginal Required Name of the document to be included in the evidence sheet. String (200)
huellaDigitalArchivo Required Digestion value obtained from the original document. Must be encoded in Base64. Base64
Constancia Required Preservation constancy NOM-151 file encoded in Base64. Verification of document fingerprint will be based on this value. Base64

Example of request to validaNOM151:


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
   <soap:Header>
      <tem:AuthSoapHd>
         <tem:Entidad>Entidad</tem:Entidad>
         <tem:Usuario>nombre_usuario</tem:Usuario>
         <tem:Clave>Contraseña</tem:Clave>
      </tem:AuthSoapHd>
   </soap:Header>
   <soap:Body>
      <tem:validaFolioNOM151>
         <tem:nombreArchivoOriginal>Especificaciones.pdf</tem:nombreArchivoOriginal>
         <tem:huellaDigitalArchivo>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</tem:huellaDigitalArchivo>
         <tem:folio>10526380</tem:folio>
      </tem:validaFolioNOM151>
   </soap:Body>
</soap:Envelope>

Response from validaNOM151

Parameter Description Data type
Estado Numeric value that indicates the result of the transaction. Its value is zero when the process was successfully executed and other than zero when an exception was generated Numeric
Descripcion Text message describing the numeric value defined by the Estado element. String (200)
validaFecha Time and date of the moment of the validation and generation of the proof sheet. Time corresponds to Mexico's Central Time Zone and it is reported as "YYYY/MM/DD HH24:MI:SS". String (19)
validaRelacion Boolean value indicating if the digestion values of the file and the digestion in the constancy are the same. In case of match: the returned value will be "true", if they do not match the returned value will be "false". Boolean
validaSello Boolean value indicating the integrity of the constancy. If the constancy's integrity is meet: the returned value will be "true", if the constancy is not valid, the returned value will be "false". Boolean
validaPSC Boolean value indicating if the name of the services provider matches Sovos. In case of match the returned value will be "true" and if the name is not valid it will be "false". Boolean
documentoNombre Name of the document to be integrated into the proof sheet String (200)
documentoHuellaDigital SHA256 or SHA512 digestion value obtained from the document sent to validate. Must be encoded in Base64. Base64
constanciaSerie Folio number of the generated NOM-151 preservation constancy used for the validation. Numeric
constanciaHueLlaDigital SHA256 or SHA512 digestion value obtained from the constancy sent to validate. Base64
constanciaFecha Time and date of the constancy according to UTC timezone in the format YYYYMMDDHH24MISS.MSSZ String (21)
constanciaAlgoritmo Name of the identified algorithm in the NOM-151 constancy. Its allowed value must be SHA-256. String (7)
constanciaSello Electronic signature value contained in the NOM-151 constancy. Encoded in Base64 and generated by Sovos PSC. Base64
pscPolitica Identifier for the assigned policy by the Ministry of Economy for the NOM-151 Sovos PSC Services. String (100)
pscNombrePSC Distinctive name of Sovos for the NOM-151 constancy issuance. String (200)
qrPDF Summarized information of the validation contained in the QR Code of the PDF report.
Summary will be available on Production environment for 365 days, for UAT it will be 7 days
String (200)
reportePDF PDF report encoded in Base64 containing the representation of the validation result. Base64

Example of response from validaNOM151:


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <validaFolioNOM151Response xmlns="http://tempuri.org/">
         <validaFolioNOM151Result>
            <Estado>0</Estado>
            <Descripcion>Satisfactorio</Descripcion>
            <validaFecha>2022/01/31 12:27:39</validaFecha>
            <validaRelacion>true</validaRelacion>
            <validaSello>true</validaSello>
            <validaPSC>true</validaPSC>
            <documentoNombre>Especificaciones.pdf</documentoNombre>
            <documentoHuellaDigital>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</documentoHuellaDigital>
            <constanciaSerie>10526380</constanciaSerie>
            <constanciaHuellaDigital>VinEQ+AIl4M3MIasYVlWjPQZ9GnnlW0b81IEqgAsohw=</constanciaHuellaDigital>
            <contanciaFecha>20220131182502.115Z</contanciaFecha>
            <constanciaAlgoritmo>SHA-256</constanciaAlgoritmo>
            <pscPolitica>1.16.484.101.10.316.1.2</pscPolitica>
            <pscNombre>PSC Advantage Security (Pruebas)</pscNombre>
            <qrPDF>||10526380|Especificaciones.pdf|PSC Advantage Security (Pruebas)|2022/01/31 12:27:39|true|true|true||</qrPDF>
            <constanciaSello>UWMFZHkm7LetSmx2xrDstZn1Gx+OI8pGrxKth7o8MLMTQ1VL2W6XBn08FP66E2LDY=..</constanciaSello>
            <reportePDF>JVBERi0xLjQKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAyMjAxMzExM...</reportePDF>
         </validaFolioNOM151Result>
      </validaFolioNOM151Response>
   </soap:Body>
</soap:Envelope>

Error codes

Code Description Action
-100 Entidad was not provided The Entidad code was not present on the request
-101 Usuario was not provided The Usuario information was not present on the request
-102 Clave was not provided The user password was not present on the request
-103 NombreArchivoOriginal was not provided The nombreArchivoOriginal was not present on the request
-104 HuellaDigitalArchivo was not provided The huellaDigitalArchivo was not present on the request
-105 Encoding of the document fingerprint is not valid Fingerprint was not encoded in Base64
-106 The value of the folio must be greater than 0 The folio given by the user was minor than 0
-107 Error decoding the NOM-151 constancy The NOM-151 constancy could not be decoded.
-108 Digestion algorithm is not valid The digestion algorithm applied to the original file is not valid. Only SHA256 and SHA512 are supported.
-109 An error occurred generating the time stamp The time stamp could not be obtained.
-110 Error decoding a time stamp The time stamp could not be decoded.
-111 An error occurred processing your request Generic error processing the request. Contact Sovos support
-112 The NOM-151 constancy was not specified The NOM-151 constancy was not present on the request
-500 An error occurred generating the PDF with the proof sheet Generic error generating the PDF. Contact Sovos support
-2 Error executing the requested store procedure Contact Sovos support
-1 There is no connection to the requested database Contact Sovos support
0 Satisfactory Correct procedure
1 The user account is not valid or does not exist The user account is not valid
2 The user account or password is not valid The user account or its password is not valid
3 The user account was blocked due exceeding the allowed number of connection attempts The user account does not allow connection. Contact Sovos support
4 Pending user account's activation User must activate its user account
5 User account blocked The user account is blocked. Contact Sovos support
6 User account blocked The user account is blocked. Contact Sovos support
7 User password expired Users must modify their password
9 The user account must be activated Users must access the site to activate their password.
10 Generic error, contact your admin Contact Sovos support
11 There's no information for the given data Contact Sovos support
13 The user account does not allow connection Contact Sovos support
15 User doesn't have permission to perform the requested method Contact Sovos support
18 User account status does not allow the procedure Contact Sovos support
19 The profile assigned to the user is not authorized Contact Sovos support
20 The operation code does not exist Contact Sovos support
22 Request values exceed allowed limits, please verify content Validate the length of the parameters in the request
23 The user profile does not exist, or the user is not active Contact Sovos support
25 Profile code is not valid Contact Sovos support
26 The entity code does not exist The given entity code is not valid.
27 The entity code does not have permission to perform the requested procedure Contact Sovos support
29 Invalid Digestion type Digestion algorithm is not valid for the procedure.
30 PSC Certificate not located or inactive The requested digital certificate is not available.
31 Type of given data invalid Verify all the information in the request against its data type
32 Constancy not found for the requester The folio number in the constancy was not found for the user who requested it.

Regresar