Consultar consumo
curl --request GET \
--url https://api.linahealthcareplatform.com/api/v1/billing/consumption \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.linahealthcareplatform.com/api/v1/billing/consumption"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.linahealthcareplatform.com/api/v1/billing/consumption', 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://api.linahealthcareplatform.com/api/v1/billing/consumption",
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://api.linahealthcareplatform.com/api/v1/billing/consumption"
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://api.linahealthcareplatform.com/api/v1/billing/consumption")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/billing/consumption")
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{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-14T23:59:59Z",
"totalCredits": 1550,
"breakdown": [
{ "action": "call", "credits": 890, "count": 15 },
{ "action": "conversation", "credits": 340, "count": 22 },
{ "action": "schedule.whatsapp", "credits": 150, "count": 50 },
{ "action": "schedule.sms", "credits": 100, "count": 50 },
{ "action": "schedule.email", "credits": 70, "count": 70 },
{ "action": "schedule.app", "credits": 0, "count": 45 }
]
}
{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-03T23:59:59Z",
"totalCredits": 320,
"breakdown": [
{ "date": "2026-05-01", "credits": 120, "count": 18 },
{ "date": "2026-05-02", "credits": 95, "count": 12 },
{ "date": "2026-05-03", "credits": 105, "count": 15 }
]
}
Créditos
Consultar consumo
Obtiene un desglose detallado del consumo de créditos por periodo y tipo de acción.
GET
/
billing
/
consumption
Consultar consumo
curl --request GET \
--url https://api.linahealthcareplatform.com/api/v1/billing/consumption \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.linahealthcareplatform.com/api/v1/billing/consumption"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.linahealthcareplatform.com/api/v1/billing/consumption', 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://api.linahealthcareplatform.com/api/v1/billing/consumption",
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://api.linahealthcareplatform.com/api/v1/billing/consumption"
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://api.linahealthcareplatform.com/api/v1/billing/consumption")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/billing/consumption")
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{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-14T23:59:59Z",
"totalCredits": 1550,
"breakdown": [
{ "action": "call", "credits": 890, "count": 15 },
{ "action": "conversation", "credits": 340, "count": 22 },
{ "action": "schedule.whatsapp", "credits": 150, "count": 50 },
{ "action": "schedule.sms", "credits": 100, "count": 50 },
{ "action": "schedule.email", "credits": 70, "count": 70 },
{ "action": "schedule.app", "credits": 0, "count": 45 }
]
}
{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-03T23:59:59Z",
"totalCredits": 320,
"breakdown": [
{ "date": "2026-05-01", "credits": 120, "count": 18 },
{ "date": "2026-05-02", "credits": 95, "count": 12 },
{ "date": "2026-05-03", "credits": 105, "count": 15 }
]
}
Query Parameters
Fecha inicio en formato ISO 8601 (ej.
2026-05-01T00:00:00Z).Fecha fin en formato ISO 8601.
Agrupar resultados por:
day o action.{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-14T23:59:59Z",
"totalCredits": 1550,
"breakdown": [
{ "action": "call", "credits": 890, "count": 15 },
{ "action": "conversation", "credits": 340, "count": 22 },
{ "action": "schedule.whatsapp", "credits": 150, "count": 50 },
{ "action": "schedule.sms", "credits": 100, "count": 50 },
{ "action": "schedule.email", "credits": 70, "count": 70 },
{ "action": "schedule.app", "credits": 0, "count": 45 }
]
}
{
"startDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-03T23:59:59Z",
"totalCredits": 320,
"breakdown": [
{ "date": "2026-05-01", "credits": 120, "count": 18 },
{ "date": "2026-05-02", "credits": 95, "count": 12 },
{ "date": "2026-05-03", "credits": 105, "count": 15 }
]
}
Total de créditos consumidos en el periodo consultado.
Desglose del consumo según la agrupación seleccionada.
Tipo de acción (cuando
groupBy=action): call, conversation, schedule.email, schedule.sms, schedule.whatsapp, schedule.app.Número de operaciones realizadas.
⌘I

