Obtiene el detalle del CFDi con el id y tipo seleccionado
curl --request GET \
--url https://apisandbox.facturama.mx/cfdi/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apisandbox.facturama.mx/cfdi/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://apisandbox.facturama.mx/cfdi/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apisandbox.facturama.mx/cfdi/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apisandbox.facturama.mx/cfdi/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apisandbox.facturama.mx/cfdi/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apisandbox.facturama.mx/cfdi/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"Id": "J6MjEYRjnLnV6aMCK8dV-w2",
"CfdiType": "ingreso",
"Type": "I - ingreso",
"Serie": "FA",
"Folio": "100",
"Date": "2024-06-25T12:00:00",
"CertNumber": "30001000000500003416",
"PaymentTerms": "03 - Transferencia electrónica de fondos",
"PaymentMethod": "PUE - Pago en una sola exhibición",
"PaymentAccountNumber": "",
"PaymentBankName": "",
"ExpeditionPlace": "78000",
"ExchangeRate": 0,
"Currency": "MXN - Peso Mexicano",
"Subtotal": 100,
"Discount": 0,
"Total": 116,
"Issuer": {
"FiscalRegime": "601 - General de Ley Personas Morales",
"Rfc": "EKU9003173C9",
"TaxName": "ESCUELA KEMPER URGATE",
"Email": "api@facturama.mx",
"Phone": "4448356098",
"TaxAddress": {
"Street": "Cañada de Gomez",
"ExteriorNumber": "128",
"InteriorNumber": "",
"Neighborhood": "Los Laureles",
"ZipCode": "42501",
"Municipality": "Piedras Negras",
"State": "COAHUILA",
"Country": "México"
},
"IssuedIn": {
"Street": "",
"ExteriorNumber": "",
"Neighborhood": "-",
"ZipCode": "78000",
"Municipality": "",
"State": "",
"Country": "MEXICO"
}
},
"Receiver": {
"Rfc": "URE180429TM6",
"Name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
"Email": ""
},
"Items": [
{
"ProductCode": "10101504",
"IdentificationNumber": "EDL",
"UnitCode": "MTS",
"Discount": 0,
"CuentaPredial": "",
"Quantity": 2,
"Unit": "MTS - NO APLICA",
"Description": "Estudios de laboratorio",
"UnitValue": 50,
"Total": 100
}
],
"Taxes": [
{
"Total": 16,
"Name": "IVA",
"Rate": 0,
"Type": "transferred"
}
],
"Complement": {
"TaxStamp": {
"Uuid": "fe3c73d5-7881-49e0-80a3-e6c7e2eece40",
"Date": "2024-06-25T12:00:00",
"CfdiSign": "JvBbBtJZjW+xmCCrk/QW30JKrlYPlVdbLfiHfjtiZrSaI1En8pILqfBmBZ5znc...",
"SatCertNumber": "30001000000500003456",
"SatSign": "VaNEQDLc3XnkNXaFfTIHhOwoQwRwfdlGtaHjOA0wH8UZZvHwEZny3S3CaDWo1z...",
"RfcProvCertif": "SPR190613I52"
}
},
"Status": "active",
"OriginalString": "||4.0|100|2024-06-25T12:00:00|03|30001000000500003416|100|MXN|116.00|I|01|PUE|78000|EKU9003173C9|..."
}Autorizaciones
Autenticación HTTP Basic con usuario y contraseña de Facturama.
Parámetros de ruta
Identificador unico de la factura
Parámetros de consulta
Tipo de comprbante a obtener, puede ser para API Web: ( payroll | received | issued ) y para API Multiemisor: ( issuedLite )
Respuesta
Cuerpo del resultado de consulta de un CFDI.
Identifiacador unico del cfdi.
Tipo del efecto del comprobante fiscal para el contribuyente emisor: ingreso, egreso ó traslado.
Tipo de comprobante segun catalogo del SAT.
Numero de la serie en el control interno del contribuyente.
Numero de la folio en el control interno del contribuyente.
Fecha y hora de expedición del comprobante fiscal.
No del Certificado.
Forma de pago.
Condiciones comerciales aplicables para el pago del comprobante fiscal digital a través de Internet.
Método de pago de los bienes o servicios amparados por el comprobante. Se entiende como método de pago leyendas tales como: cheque, tarjeta de crédito o debito, depósito en cuenta, etc.
Incorpora al menos los cuatro últimos digitos del número de cuenta con la que se realizó el pago.
Nombre del banco donde se realizo el pago.
Lugar de expedición del comprobante.
Tipo de cambio conforme a la moneda usada.
Moneda utilizada para expresar los montos.
Representa la suma de los importes antes de descuentos e impuestos.
Representa el importe total de los descuentos aplicables antes de impuestos.
Representar la suma del subtotal, menos los descuentos aplicables, más los impuestos trasladados, menos los impuestos retenidos.
Observaciones no fiscales de la factura.
Observaciones no fiscales de la factura.
Nodo que contiene el detalle del emisor.
Show child attributes
Show child attributes
Nodo que contiene el detalle del receptor.
Show child attributes
Show child attributes
Nodo que contiene el detalle de los conceptos.
Show child attributes
Show child attributes
Nodo que contiene el detalle de los impuestos.
Show child attributes
Show child attributes
Nodo que contiene complementos de extensión definidos por el SAT.
Show child attributes
Show child attributes
Estatus de la factura.
Cadena original.
Determina si esta factura se puede pagar.
curl --request GET \
--url https://apisandbox.facturama.mx/cfdi/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apisandbox.facturama.mx/cfdi/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://apisandbox.facturama.mx/cfdi/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apisandbox.facturama.mx/cfdi/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apisandbox.facturama.mx/cfdi/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apisandbox.facturama.mx/cfdi/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apisandbox.facturama.mx/cfdi/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"Id": "J6MjEYRjnLnV6aMCK8dV-w2",
"CfdiType": "ingreso",
"Type": "I - ingreso",
"Serie": "FA",
"Folio": "100",
"Date": "2024-06-25T12:00:00",
"CertNumber": "30001000000500003416",
"PaymentTerms": "03 - Transferencia electrónica de fondos",
"PaymentMethod": "PUE - Pago en una sola exhibición",
"PaymentAccountNumber": "",
"PaymentBankName": "",
"ExpeditionPlace": "78000",
"ExchangeRate": 0,
"Currency": "MXN - Peso Mexicano",
"Subtotal": 100,
"Discount": 0,
"Total": 116,
"Issuer": {
"FiscalRegime": "601 - General de Ley Personas Morales",
"Rfc": "EKU9003173C9",
"TaxName": "ESCUELA KEMPER URGATE",
"Email": "api@facturama.mx",
"Phone": "4448356098",
"TaxAddress": {
"Street": "Cañada de Gomez",
"ExteriorNumber": "128",
"InteriorNumber": "",
"Neighborhood": "Los Laureles",
"ZipCode": "42501",
"Municipality": "Piedras Negras",
"State": "COAHUILA",
"Country": "México"
},
"IssuedIn": {
"Street": "",
"ExteriorNumber": "",
"Neighborhood": "-",
"ZipCode": "78000",
"Municipality": "",
"State": "",
"Country": "MEXICO"
}
},
"Receiver": {
"Rfc": "URE180429TM6",
"Name": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
"Email": ""
},
"Items": [
{
"ProductCode": "10101504",
"IdentificationNumber": "EDL",
"UnitCode": "MTS",
"Discount": 0,
"CuentaPredial": "",
"Quantity": 2,
"Unit": "MTS - NO APLICA",
"Description": "Estudios de laboratorio",
"UnitValue": 50,
"Total": 100
}
],
"Taxes": [
{
"Total": 16,
"Name": "IVA",
"Rate": 0,
"Type": "transferred"
}
],
"Complement": {
"TaxStamp": {
"Uuid": "fe3c73d5-7881-49e0-80a3-e6c7e2eece40",
"Date": "2024-06-25T12:00:00",
"CfdiSign": "JvBbBtJZjW+xmCCrk/QW30JKrlYPlVdbLfiHfjtiZrSaI1En8pILqfBmBZ5znc...",
"SatCertNumber": "30001000000500003456",
"SatSign": "VaNEQDLc3XnkNXaFfTIHhOwoQwRwfdlGtaHjOA0wH8UZZvHwEZny3S3CaDWo1z...",
"RfcProvCertif": "SPR190613I52"
}
},
"Status": "active",
"OriginalString": "||4.0|100|2024-06-25T12:00:00|03|30001000000500003416|100|MXN|116.00|I|01|PUE|78000|EKU9003173C9|..."
}