CFDI recover through FolioOperacion
Sovos has developed a service to recover a CFDI previously certified through FolioOperacion.
Content
General Features
With this service, you can obtain information on a receipt issued in the Sovos certification platform with a Sovos unique ID. That ID (procedure folio) is independent of the elements integrating the original chain used to certify a CFDI.
Technical Considerations
This service does not substitute the API REST to recover a CFDI based on a UUID.
This service only collects the last 6 months of operation.
What do I need?
Para poder hacer uso del servicio se necesita lo siguiente:
- A service contract with Sovos. If you don’t have one, please send an email to sales-mexico@sovos.com
- To generate an API key on your Sovos account, this is an identifier that authenticates the user on the platform web services. To generate an API key, please review this article: Generating an API Key for web services.
- To specify a procedure folio in the certification request. This folio can be specified in issuance web service, stamping web service or integration file issuance.
- To use a web service published on the internet through a safe connection (SSL).
Service Location
The URLs for each of the environments are:
Environment | WSDL Location |
---|---|
Test | https://oat.reachcore.com/api/ws/6.0/pacservices/FolioOperacion.svc/basic?wsdl |
Production | https://go.reachcore.com/api/ws/6.0/pacservices/FolioOperacion.svc/basic?wsdl |
Method [RecuperaComprobante
]
Through this web service method, you can request the recovery of a CFDI based on a procedure folio indicating the receipt, whether is a CFDI or a CFDI supporting retentions and payment information. Next, we see a description of the elements issued in the requisition and the ones in the response:
RecuperaComprobante Request
Element | Use | Description |
---|---|---|
ApiKey | Required | Authentication Id generated on the Sovos portal. |
FolioOperacion | Required | Id of no more than 200 characters identifying the receipt you want to recover. |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
<soapenv:Header>
<cus:ApiKey>?</cus:ApiKey>
</soapenv:Header>
<soapenv:Body>
<urn:ComprobanteRequest>
<urn:FolioOperacion>INTERNO-2020-06-11_000001</urn:FolioOperacion>
</urn:ComprobanteRequest>
</soapenv:Body>
</soapenv:Envelope>
Response: RecuperaComprobante
When the procedure was successful
Existen dos tipos de respuestas exitosas:
- When the requested document could be recovered through the operation folio.
- When the requested document couldn’t be recovered through the operation folio, but the folio fiscal and the issuance date could be recovered. This scenario can happen for receipts certified by Sovos older than 6 months.
For the first scenario, those are the fields that you will get as part of a response:
Element | Description |
---|---|
TransactionId | Procedure Id |
Comprobante | The receipt related to the procedure folio specified in the requisition. It is included inside an element <![CDATA[...]]> . |
Retencion | The CFDI of retentions and payment information related to the procedure folio specified in the requisition. It is included inside an element <![CDATA[...]]> . |
The nodes Comprobante
and Retencion
are mutually excluded, meaning we can’t have a node Comprobante
and a node Retencion
at the same time.
This is the response message when a CFDI no older than 6 months is successfully recovered.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ComprobanteResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>432d07e0-1054-45c8-b56f-f9aa71aef21f</TransactionId>
<Comprobante><![CDATA[<cfdi:Comprobante xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cfdi="http://www.sat.gob.mx/cfd/3" Version="3.3" LugarExpedicion="11520" TipoDeComprobante="I" Descuento="30.0000" SubTotal="135.0000" Total="101.8500" Moneda="MXN" Fecha="2021-01-25T13:29:16" NoCertificado="30001000000400002434" FormaPago="99" Folio="101" Serie="AUTOMATION" MetodoPago="PPD" Certificado="MIIFuzCCA6OgAwIBAgIUMzAwMDEwMDAwMDA0MDAwMDI0MzQwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWRpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTA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K0fQcN3IftBwsgNFdFhUtCyw3lus1SSJbPxjLHS6FcZZ51YSeIfcNXOAuTqdimusaXq15GrSrCOkM6n2jfj2sMJYM2HXaXJ6rGTEgYmhYdwxWtil6RfZB+fGQ/H9I9WLnl4KTZUS6C9+NLHh4FPDhSk19fpS2S/56aqgFoGAkXAYt9Fy5ECaPcULIfJ1DEbsXKyRdCv3JY89+0MNkOdaDnsemS2o5Gl08zI4iYtt3L40gAZ60NPh31kVLnYNsmvfNxYyKp+AeJtDHyW9w7ftM0Hoi+BuRmcAQSKFV3pk8j51la+jrRBrAUv8blbRcQ5BiZUwJzHFEKIwTsRGoRyEx96sNnB03n6GTwjIGz92SmLdNl95r9rkvp+2m4S6q1lPuXaFg7DGBrXWC8iyqeWE2iobdwIIuXPTMVqQb12m1dAkJVRO5NdHnP/MpqOvOgLqoZBNHGyBg4Gqm4sCJHCxA1c8Elfa2RQTCk0tAzllL4vOnI1GHkGJn65xokGsaU4B4D36xh7eWrfj4/pgWHmtoDAYa8wzSwo2GVCZOs+mtEgOQB91/g==" Sello="isRbYYbU1DXhlIx6yQ1Hvq3sZ8IHFmPl/iWrllfsgCHUrPpjrfouA6eNBDYFKCW867PWUz5Sg5HJewc8gOIDdARBIKDTyMrO/rZRgn0/YTPvNqtap8GcbFXKJaiwFt1CE+FyaRD7KoqNrguVKYM0zDdwmmxHTX4+RdhFsqWX0LAiLCSIt/ADvHuFA+EZEtnth3AnXiP3Wi2ONdXfTP5aq/jssrPEUFnxB/z7bhwwjuyBrp/X7EkRBqcvyZRXpTB55z6gSNkKswHedTWViuv3gxcjWcdgkAGyrGluCY4QgQXWW01C19E7GG0xSTOuD2cM4J6TnUyjJ0zuFfNOBb5FAg==" xsi:schemaLocation="http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd"><cfdi:Emisor Rfc="EKU9003173C9" RegimenFiscal="601" /><cfdi:Receptor Rfc="CACX7605101P8" UsoCFDI="G01" /><cfdi:Conceptos><cfdi:Concepto ClaveProdServ="10111301" Cantidad="3" ClaveUnidad="C83" Unidad="Metro" Descripcion="Descripcion" ValorUnitario="45" Importe="135.0000" Descuento="30.0000"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Base="105" Impuesto="003" TasaOCuota="0.030000" Importe="3.150000" TipoFactor="Tasa" /></cfdi:Traslados><cfdi:Retenciones><cfdi:Retencion Base="105" Impuesto="003" TipoFactor="Tasa" TasaOCuota="0.060000" Importe="6.300000" /></cfdi:Retenciones></cfdi:Impuestos></cfdi:Concepto></cfdi:Conceptos><cfdi:Impuestos TotalImpuestosTrasladados="3.1500" TotalImpuestosRetenidos="6.3000"><cfdi:Retenciones><cfdi:Retencion Impuesto="003" Importe="6.300000" /></cfdi:Retenciones><cfdi:Traslados><cfdi:Traslado Impuesto="003" TipoFactor="Tasa" TasaOCuota="0.030000" Importe="3.150000" /></cfdi:Traslados></cfdi:Impuestos><cfdi:Complemento><tfd:TimbreFiscalDigital xmlns:tfd="http://www.sat.gob.mx/TimbreFiscalDigital" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/TimbreFiscalDigital http://www.sat.gob.mx/sitio_internet/cfd/TimbreFiscalDigital/TimbreFiscalDigitalv11.xsd" Version="1.1" UUID="9ABE9C31-FF0D-4B53-ACBB-B70C36CDE106" FechaTimbrado="2021-01-26T19:08:56" RfcProvCertif="ASE0201179X0" SelloCFD="isRbYYbU1DXhlIx6yQ1Hvq3sZ8IHFmPl/iWrllfsgCHUrPpjrfouA6eNBDYFKCW867PWUz5Sg5HJewc8gOIDdARBIKDTyMrO/rZRgn0/YTPvNqtap8GcbFXKJaiwFt1CE+FyaRD7KoqNrguVKYM0zDdwmmxHTX4+RdhFsqWX0LAiLCSIt/ADvHuFA+EZEtnth3AnXiP3Wi2ONdXfTP5aq/jssrPEUFnxB/z7bhwwjuyBrp/X7EkRBqcvyZRXpTB55z6gSNkKswHedTWViuv3gxcjWcdgkAGyrGluCY4QgQXWW01C19E7GG0xSTOuD2cM4J6TnUyjJ0zuFfNOBb5FAg==" NoCertificadoSAT="20001000000300022323" SelloSAT="UmH5FeN2dTy3iJe91wagUOfnIdxJ1q3m71FM23mdxLBY7HBACbPGq5aeU5F76lQqXJMYzOWR0J/UUnQgXM2gq5NEn+loMynR+Y1gdj79KfBb34o85wIIKxjovCMLHKg2gGFM3fA4b+hiUWx1iV/VkuLIKsbS2e85etacgOdXQnn2yztCKc4ZmWT12jysgAb3X9aENcq6ckmGAUh6kfkDzA5brNdAxnX1FK87NAc0XzERwDPsqZMzEtJ+tfJrA5dWNPG2MFvkV59mx0zbIq9oFjuH+yY3u6LU7Zo/+s4HqquximtU/Djd3hcdChURq4vIrYpGsbiKHF7DeuKad4sVoA==" /></cfdi:Complemento></cfdi:Comprobante>]]></Comprobante>
</ComprobanteResponse>
</s:Body>
</s:Envelope>
For the second scenario, these are the fields returned as a response:
Element | Description |
---|---|
TransactionId | Procedure Id |
UUID | The fiscal folio of the requested receipt. |
FechaEmision | The issuance date of the requested receipt. |
This is the response message when a CFDI older than 6 months is successfully recovered:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ComprobanteResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>433d07e0-2063-45c8-c56f-f9aa71aef21f</TransactionId>
<UUID>38F89C20-FDCB-4E26-B59B-386E0F52E36F</UUID>
<FechaEmision>2019-12-27T13:28:00</FechaEmision>
</ComprobanteResponse>
</s:Body>
</s:Envelope>
When the recovery was not possible
Element | Description |
---|---|
TransactionId | Procedure Id that is used for diagnosis and support. You need to provide this Id if you request Sovos Support. |
Error | Object to describe errors. |
Code | A chain identifying the specific error. |
Message | The error code description that is used to ease the diagnosis of the client’s applications without referring to the error code table. Its value will be always the same for a specific error. |
You can see response messages with an error in the recovery process next:
- Example of a response with an error when the procedure folio was not found
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ComprobanteResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>a5060ae6-442f-4f52-a754-232f9b4d0f7d</TransactionId>
<Error>
<Code>405</Code>
<Message>El folio de operación es incorrecto.</Message>
<Details>No existe registro del folio de operación: 'INTERNO-2020-06-11_000002'.</Details>
</Error>
</ComprobanteResponse>
</s:Body>
</s:Envelope>
- Example of a response with an error when the specified API KEY is not valid
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ComprobanteResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>6a49eee3-5e68-446a-9c60-954a8cf57329</TransactionId>
<Error>
<Code>AuthenticationFailed</Code>
<Message>Credenciales inválidas.</Message>
<InnerErrors>
<Error>
<Code>101</Code>
<Message>API Key no válida.</Message>
<Target>Consulta de Folio de Operación</Target>
</Error>
</InnerErrors>
</Error>
</ComprobanteResponse>
</s:Body>
</s:Envelope>
Error Codes
Here is a list of the error codes that you will see in the platform
Error.Code | Error.InnerErrors.Error.Code | Meaning | Description |
---|---|---|---|
AuthenticationFailed | 100 | API Key Required | The element ApiKey is empty or has blanks. |
AuthenticationFailed | 101 | API Key not valid | The API Key doesn’t exist in Sovos. |
AuthenticationFailed | 102 | API Key not valid | The given API Key is not active. |
AuthenticationFailed | 105 | Suspended account | The account related to the API Key is suspended. |
AuthenticationFailed | 106 | API Key not valid | The given API Key is invalid. |
401 | - | You must specify a procedure folio that is not empty | |
405 | - | The procedure folio is incorrect | There’s no registration for the given procedure folio. |
InvalidRequest | 999 | Service internal error | Sovos platform error. |
InternalServerError | 999 | The request can’t be processed. Please contact support with your procedure Id. |
Method [RecuperaFolioComprobante
]
Through this web service method, you can request the recovery of a CFDI list based on an operation folio identifying the receipt whether is a CFDI or a CFDI supporting retentions and payment information. The elements issued in the request and the ones obtained in the response are described next:
Request RecuperaComprobante
Element | Use | Description |
---|---|---|
ApiKey | Required | Authentication Id generated on the Sovos portal. |
FechaInicial | Required | This specifies the initial date of the period you want to recover. The date format must be yyyy-mm-dd |
FechaFinal | Required | This specifies the final date of the period you want to recover. The date format must be yyyy-mm-dd |
Technical Considerations:
The consultation service can’t be older than 3 months.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
<soapenv:Header>
<cus:ApiKey>?</cus:ApiKey>
</soapenv:Header>
<soapenv:Body>
<urn:FoliosRegistradosRequest>
<urn:FechaInicial>2021-01-25</urn:FechaInicial>
<urn:FechaFinal>2021-01-26</urn:FechaFinal>
</urn:FoliosRegistradosRequest>
</soapenv:Body>
</soapenv:Envelope>
Response: RecuperaFolioComprobante
As a response to the recovery request of the receipt’s procedure folio, you will get the following:
When the transaction was successful
Element | Description |
---|---|
TransactionId | Procedure Id |
Comprobantes | Data structure with the Total of receipts found in the consulted period and a Comprobante with the following metadata: Version of the CFDI, FolioOperacion related to the receipt, UUID of the receipt, FechaEmision specified in the receipt, RFCEmisor , RFCReceptor , Serie , Folio , and the Total of the receipt. |
Retenciones | Structure with the data that has the Total of the CFDI of retentions and payment information found in the consulted period and a Retention with the following metadata: Version of the Retention, FolioOperacion related, UUID of the retention, FechaEmision specified in the retention, RFCEmisor , FolioInt , montoTotOperacion , montoTotGrav , montoTotExent , and the montoTotRet declared in the retention. |
This is the message of a successful response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FoliosRegistradosResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>3790e35b-95d5-46b2-8a35-d23288cd0022</TransactionId>
<Comprobantes Total="2">
<Comprobante Version="3.3" FolioOperacion="INTERNO-2020-06-11_000001" UUID="9abe9c31-ff0d-4b53-acbb-b70c36cde106" FechaEmision="2021-01-25T13:29:16" RFCEmisor="EKU9003173C9" RFCReceptor="CACX7605101P8" Serie="AUTOMATION" Folio="101" Total="101.850000"/>
<Comprobante Version="3.3" FolioOperacion="INTERNO-2020-06-27_000014" UUID="30376a74-033b-427e-bce8-8364e3de3053" FechaEmision="2021-01-26T13:29:16" RFCEmisor="EKU9003173C9" RFCReceptor="CACX7605101P8" Serie="AUTOMATION" Folio="214" Total="101.850000"/>
</Comprobantes>
<Retenciones Total="0"/>
</FoliosRegistradosResponse>
</s:Body>
</s:Envelope>
When the consultation was not possible.
Element | Description |
---|---|
TransactionId | Procedure Id that is used for diagnosis and support. You need to provide this Id if you request Sovos Support. |
Error | Object for error description. |
Code | A chain that identifies the specific error. |
Message | The error code description that is used to ease the diagnosis in the client application without referring to the error table. Its value will always be the same for a specific error code. |
You can see response messages with an error in the recovery process next:
- Example of a response with an error when the consultation cannot be executed.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FoliosRegistradosResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
<TransactionId>4fc97877-231f-4119-a8d0-b9ce75669831</TransactionId>
<Error>
<Code>406</Code>
<Message>El rango de las fechas para recuperar los folios registrados es incorrecto.</Message>
<Details>La fecha inicial [2021-02-01] debe ser menor a la fecha final [2021-01-26].</Details>
</Error>
</FoliosRegistradosResponse>
</s:Body>
</s:Envelope>
Error Codes
Here is a list of the error codes that you will see in the platform
Error.Code | Error.InnerErrors.Error.Code | Meaning | Description |
---|---|---|---|
AuthenticationFailed | 100 | API Key Required | The element ApiKey is empty or has blanks. |
AuthenticationFailed | 101 | API Key not valid | The API Key doesn’t exist in Sovos. |
AuthenticationFailed | 102 | API Key not valid | The given API Key is not active. |
AuthenticationFailed | 105 | Suspended account | The account related to the API Key is suspended. |
AuthenticationFailed | 106 | API Key not valid | The given API Key is invalid. |
406 | - | The initial date FechaInicial must be lower than the final date FechaFinal |
|
406 | - | The period to consult can’t be greater than 3 months. | |
InvalidRequest | 999 | Service internal error | Sovos platform error. |
InternalServerError | 999 | The request can’t be processed. Please contact support with your procedure Id. |
For more information or to clarify any doubt about this guide, please send an email to MEX-soporte@sovos.com
Regresar