Gets the CFDI detail by the selected id and type
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|..."
}Authorizations
HTTP Basic authentication with Facturama username and password.
Path Parameters
Unique invoice identifier
Query Parameters
Type of voucher to retrieve, can be for Web API: ( payroll | received | issued ) and for Multi-issuer API: ( issuedLite )
Response
Body of the result of a CFDI query.
Unique CFDI identifier.
Type of tax voucher effect for the issuing taxpayer: income, expense, or transfer.
Voucher type per SAT catalog.
Series number in the taxpayer's internal control.
Folio number in the taxpayer's internal control.
Date and time of issuance of the tax voucher.
Certificate number.
Payment form.
Commercial conditions applicable for the payment of the digital tax voucher via Internet.
Payment method for the goods or services covered by the voucher. Payment methods include: check, credit or debit card, account deposit, etc.
Includes at least the last four digits of the account number used for payment.
Name of the bank where the payment was made.
Place of issuance of the voucher.
Exchange rate per the currency used.
Currency used to express amounts.
Represents the sum of amounts before discounts and taxes.
Represents the total amount of applicable discounts before taxes.
Represents the sum of the subtotal, minus applicable discounts, plus transferred taxes, minus withheld taxes.
Non-fiscal observations of the invoice.
Non-fiscal observations of the invoice.
Node containing the issuer detail.
Show child attributes
Show child attributes
Node containing the receiver detail.
Show child attributes
Show child attributes
Node containing the line items detail.
Show child attributes
Show child attributes
Node containing the tax detail.
Show child attributes
Show child attributes
Node containing extension complements defined by SAT.
Show child attributes
Show child attributes
Invoice status.
Original string.
Determines whether this invoice can be paid.
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|..."
}