Obtiene el catálogo de productos y servicios paginado (versión octubre de 2020, sucesón del original /product).
curl --request GET \
--url https://apisandbox.facturama.mx/products \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apisandbox.facturama.mx/products"
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/products', 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/products",
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/products"
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/products")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apisandbox.facturama.mx/products")
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": "GtenxmdGJMbQl26GUVmDMQ2",
"UnitCode": "E48",
"Unit": "Servicio",
"IdentificationNumber": "WEB003",
"Name": "Sitio Web CMS",
"Description": "Producto de prueba Marca ACME",
"Price": 999.9999,
"CodeProdServ": "43232408",
"ObjetoImp": "02"
}
]Authorizations
HTTP Basic authentication with Facturama username and password.
Query Parameters
Start position.
Data length.
Keyword to search in Name, Description, Product or Service Code, and Unit.
Attribute by which results will be sorted.
Sort order for search results: 'asc' for ascending or 'desc' for descending.
Page.
Response
Paginated product list.
Unique product identifier
Code corresponding to the Unit per the SAT catalog
The unit of measure applicable for the quantity expressed in the product
Product serial number
Product name
Product description
Product category name
Product category name
Unit value or price of the product
Product or service key per the SAT catalog
Name corresponding to the product or service key per the SAT catalog
Property tax account cfdi 4.0 (for lease invoices that need to express this information)
Property tax account cfdi 4.0 (for lease invoices that need to express this information)
Corresponding key to indicate whether the commercial operation is subject to tax or not
Customs information (first-hand sales of imported goods or foreign trade operations)
Federal taxes applicable to the product
Show child attributes
Show child attributes
Complements applicable to the product
Show child attributes
Show child attributes
curl --request GET \
--url https://apisandbox.facturama.mx/products \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apisandbox.facturama.mx/products"
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/products', 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/products",
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/products"
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/products")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apisandbox.facturama.mx/products")
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": "GtenxmdGJMbQl26GUVmDMQ2",
"UnitCode": "E48",
"Unit": "Servicio",
"IdentificationNumber": "WEB003",
"Name": "Sitio Web CMS",
"Description": "Producto de prueba Marca ACME",
"Price": 999.9999,
"CodeProdServ": "43232408",
"ObjetoImp": "02"
}
]