Reportes
Consultar el reporte de ventas
Facturas autorizadas en un rango de fechas: totales frente al período anterior, la serie por día (o por mes en rangos de más de 92 días), y los principales clientes, productos y establecimientos.
Las ventas son netas: sin IVA ni otros impuestos, que se le deben al
SRI. Solo total incluye impuestos.
GET
/
api
/
v1
/
accounts
/
{account_id}
/
reports
/
sales_summary
Consultar el reporte de ventas
curl --request GET \
--url https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary', 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://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary",
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: Bearer <token>"
],
]);
$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://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sales_summary": {
"from": "2023-12-25",
"to": "2023-12-25",
"store_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current": {
"subtotal": 123,
"iva": 123,
"total": 123,
"count": 123,
"average_ticket": 123
},
"previous": {
"subtotal": 123,
"iva": 123,
"total": 123,
"count": 123,
"average_ticket": 123
},
"change": {
"subtotal_pct": 123
},
"series": [
{
"date": "2023-12-25",
"subtotal": 123
}
],
"series_granularity": "day",
"top_products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"unit": "<string>",
"revenue": 123
}
],
"top_customers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"count": 123,
"revenue": 123
}
],
"sales_by_store": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"count": 123,
"revenue": 123
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"errors": [
"<string>"
],
"field_errors": {}
}Authorizations
Token de API enviado como Authorization: Bearer tellen_tk_.... Genera
tu token desde tu cuenta de Tellen. Tu cuenta debe tener el acceso a la
API habilitado.
Path Parameters
Identificador de la cuenta.
Query Parameters
Primer día del rango, como AAAA-MM-DD. Va junto con to; sin ambos, el mes en curso.
Example:
"2026-10-01"
Último día del rango, como AAAA-MM-DD.
Example:
"2026-10-31"
Solo las ventas de este establecimiento. Sin él, todos.
Response
El reporte de ventas.
Show child attributes
Show child attributes
Consultar el reporte de ventas
curl --request GET \
--url https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary', 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://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary",
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: Bearer <token>"
],
]);
$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://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashboard.tellen.app/api/v1/accounts/{account_id}/reports/sales_summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sales_summary": {
"from": "2023-12-25",
"to": "2023-12-25",
"store_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current": {
"subtotal": 123,
"iva": 123,
"total": 123,
"count": 123,
"average_ticket": 123
},
"previous": {
"subtotal": 123,
"iva": 123,
"total": 123,
"count": 123,
"average_ticket": 123
},
"change": {
"subtotal_pct": 123
},
"series": [
{
"date": "2023-12-25",
"subtotal": 123
}
],
"series_granularity": "day",
"top_products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"unit": "<string>",
"revenue": 123
}
],
"top_customers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"count": 123,
"revenue": 123
}
],
"sales_by_store": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"count": 123,
"revenue": 123
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"errors": [
"<string>"
],
"field_errors": {}
}