Consultation and Recovery of Documents

Sovos offers you the consultation and downloading of receipts and files from the different services we offer through an API REST.

Content

General Features

The API REST focus on recovering receipts processes by Sovos. You can recover the XMLs and the printed representation (PDF) of the CFDIs (version 3.2, 3.3 and 4.0) and retentions receipts issued by Sovos, and also, the receipts sent to the validation service with their corresponding printed representation.

In the stamping service, you have the functionality to generate a printed representation according to the needs of the issuer. To get the stamping CFDI printed representation, you must have that service activated, the recovery is done through this service.

What do I need?

  • 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 Mexico account, this is an identifier that authenticates the user on the platform webservices. To generate an API key, please review this article: Generating an API Key for web services (Spanish only).
  • To use a webservice published on the internet through a secure connection (SSL).
  • To execute a consultation to the Sovos REST services using the method GET.

Service Location

The URLs for each of the environments are:

Environment URL
UAT https://oat.reachcore.com/api/rest
Production https://go.reachcore.com/api/rest

Authentication

To perform the authentication with the API REST service, it is required to include the parameter RCApiKey in the header of the HTTP request, indicating the API Key value that was generated in the Sovos Mexico platform.

Procedures

The procedures of the Sovos REST API are described next.

1. Stamping and Issuance Service

the following procedures are related to the fiscal receipts that have been stamped and issued in Sovos:

Digital Fiscal Receipts through the Internet (CFDI)

Action Method Description
Recovery through UUID Timbre/Get?uuid={uuid}&format={format} Allows the recovery of a CFDI in XML or PDF based on the UUID. By default, is XML, to get the printed representation use pdf.
Recovery through RFC, sequences and folio Timbre/Get?rfcEmisor={rfcEmisor}&serie={serie}&folio={folio}&format={format} Allows the recovery of a CFDI through the Issuer RFC, serie, and folio. By default the format is xml. To get the printed representation use pdf.
Metadata recovery Timbre/timbredata?uuid={uuid} Allows the recovery of the most relevant metadata for a stamping transaction of a CFDI. The response is in JSON format.

Electronic document supporting retentions and payment information

Action Method Description
Recovery through UUID Timbre/Retenciones?uuid={uuid}&format={format} Allows the recovery of an electronic document in XML or PDF through UUID. By default the format is xml, to get the printed representation use pdf.
Recovery through RFC and folio Timbre/Retenciones?rfcEmisor={rfcEmisor}&folio={folio}&format={format} Allows the recovery of an electronic document through the issuer’s RFC and folio. By default the format is xml, to get the printed representation use pdf.

2. Validation Service for fiscal receipts

The following procedures are used to obtain the related documents with the fiscal receipt validation.

Action Method Description
Recovery of the print version of the original validated document DocumentValidation/Transactions/{trackingId}/pdf Allows the recovery of the print version of a validation operation.
Recovery of the original validated document DocumentValidation/Transactions/{trackingId}/original Allows the recovery of the xml version of a validation operation.
Recovery of the original document Nom151/Transactions/{trackingId}/original Recovery of the original document used to generate a NOM-151 certificate.
Recovery of time stamping certificate (only if enabled) DocumentValidation/Transactions/{trackingId}/timestamp Recovery method of a NOM-151 certificate.
NOM-151 Certificate (only if enabled) Nom151/Transactions/{trackingId}/constancia Recovery method of a NOM-151 certificate.

3. Electronic Signature Service

Procedures for documents processed in the electronic signature service

Action Method Description
Recovery original file Signature/Transactions/{transactionId}/original Recovery method for the original XML file, before the electronic signature.
Obtain PDF Signature/Transactions/{transactionId}/pdf Recovery method for the PDF that represents the information contained in the electronically signed XML.

Response Codes

As a response to the REST Service, you will get a code indicating the result of the procedure.

Code Meaning on HTTP 1.1 Successful Procedure Meaning
200 OK Yes The receipt could be recovered. The XML of the CFDI with content-type: application/xml
401 Unauthorized No The authentication API Key is not valid. Error message indicating the authentication was not successful.
404 Not Found No There’s not a receipt with the specified criteria (rfcEmisor, sequence, folio). Error message indicating that the receipt could not be found.
500 Internal Server Error No Sovos platform error. Error message indicating the error cause.

Content Type

The content-type for every type of file is:

Content Type Content Extension
application/xml XML file of the fiscal receipt or SAT receipt for CFDI. .xml
application/pdf PDF file, this is the printed representation of the fiscal document. .pdf
application/json JSON file from the SAT receipt for the electronic document supporting retentions. CFDI metadata validated. .json
application/timestamp-reply Timestamp RFC-3161 (ASN.1 encoded as DER) .tsr
application/pkcs7-mime Constancia NOM-151-SCFI-2002 (ASN.1 encoded as DER) .cns
text/plain File not found for download. .txt

For more information or doubts related to this guide, please send an email to MEX-soporte@sovos.com


Regresar