Retrieve an XML stamped with your account using only its UUID. This service queries SW storage (Storage) and returns the invoice (CFDI) data, along with the URLs to download the XML and the PDF.
✓Before you start
1Get a Bearer Token with your SW username and password. We recommend using an infinite token.
2Have the UUID of the invoice (CFDI) you want to retrieve at hand. It must have been stamped with the same account as the token.
💡 Storage Service: this service retrieves the XMLs stamped in your account and is subject to the storage you have contracted. If you need to expand it, write to us at soporte@sw.com.mx.
💡 Note: a newly stamped invoice may take some time to become available for querying.
URLs
This service uses the api domain, which is different from the stamping one. Choose the environment and all examples update.
🔗 Endpoint
Request Example
💡 Note: these examples are based on the SW SDKs, but you can build the request directly against the REST API in the language of your choice. The cURL example is the direct REST call.
Response
💡 Note: if the UUID does not exist, is misspelled, was not stamped with the authenticated account, or is not within your contracted storage, the service responds with
status equal to success but with an empty records array. That means there were no matches.💡 Note: the texts returned by the API (such as the error messages in the 401 responses) are in Spanish, exactly as the service returns them.
📋 Fields of data.records[]
The record returns 51 fields that reflect the invoice (CFDI) data. The most important ones are shown here; click View the remaining 46 fields to expand the full table.
Field
Type
Description
Main
urlXml
string
URL to download the XML.
urlPDF
string | null
URL to download the PDF. It is null if there is no PDF generated within the CFDI Stamp Management (ADT).
urlAckCfdi
string | null
URL to download the CFDI acknowledgment.
urlAckCancellation
string | null
URL to download the cancellation acknowledgment. It is null if the CFDI has not been cancelled from the account.
urlAddenda
string | null
URL to download the XML with addenda. It only returns data if the invoice was stamped through a specific path that stores the addenda in the ADT. It is
null if not applicable.Invoice
version
string
CFDI version.
serie
string
Invoice series.
folio
string
Invoice folio number.
fecha
string
Invoice issue date.
tipoDeComprobante
string
Invoice type.
statusSAT
int
Last status of the invoice stored in the ADT; it is not necessarily the current one. For it to reflect the latest status, it must be updated in the ADT. To check the status of an invoice, we recommend using the CFDI Status Query Web Service – Timbrado Masivo CFDI service.
numeroCertificado
string
Number of the certificate (CSD) used to sign the invoice.
subTotal
number
Invoice subtotal.
descuento
number
Invoice discount.
total
number
Invoice total.
moneda
string
Invoice currency.
tipoCambio
number
Currency exchange rate.
metodoPago
string
Payment method. It is empty if the invoice does not include it.
formaPago
string
Payment form. It is empty if the invoice does not include it.
condicionesPago
string
Payment terms of the invoice.
luegarExpedicion
string
Place of issue of the CFDI (postal code).
complementos
string
Invoice complements, separated by a space (for example,
Pagos TimbreFiscalDigital).Issuer and recipient
emisorRfc
string
Issuer RFC.
emisorNombre
string
Issuer name.
regimenFiscal
string
Tax regime key of the issuer.
receptorRfc
string
Recipient RFC.
receptorNombre
string
Recipient name.
residenciaFiscal
string
Tax residence of the foreign recipient. Empty if not applicable.
numRegIdTrib
string
Tax identity registration number of the foreign recipient. Empty if not applicable.
usoCFDI
string
CFDI use key declared by the recipient.
Taxes
totalImpuestosTraslados
number
Total transferred taxes.
totalImpuestosRetencion
number
Total withheld taxes.
trasladosIVA
number
Transferred VAT.
trasladosIEPS
number
Transferred IEPS.
retencionesISR
number
Withheld ISR.
retencionesIVA
number
Withheld VAT.
retencionesIEPS
number
Withheld IEPS.
totalImpuestosLocalesTraslados
number
Total transferred local taxes, if applicable.
totalImpuestosLocalesRetencion
number
Total withheld local taxes, if applicable.
Stamping
uuid
string
UUID of the CFDI.
fechaTimbrado
string
Date the CFDI was stamped.
rfcProvCertif
string
RFC of the certification provider that stamped the invoice.
selloCFD
string
Digital signature (seal) of the invoice.
Addenda, PDF and cancellation
codigoCancelacion
string | null
Cancellation code. It is
null if the CFDI has not been cancelled.hasAddenda
boolean
Indicates whether the invoice includes an addenda.
addenda
string | null
Content of the addenda. It is
null if there is none.fechaGeneracionPdf
string | null
Date the PDF was generated. It is
null if there is no PDF.Internal data
idDealer
string
Internal identifier of the Dealer (parent) account.
idUser
string
Internal identifier of the sub-account (child account).
yearMonth
int
Year and month of stamping, in YYYYMM format (for example,
202610).status
boolean
Internal indicator of the record.
In SW® we strive to be the best for You, wich is why your opinion is very important. Please help us by rating this article and leaving your comments.