Get all facturas by period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/factura/period \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/factura/period"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/factura/period', 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.raul.ugps.io/api/v1/factura/period",
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.raul.ugps.io/api/v1/factura/period"
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.raul.ugps.io/api/v1/factura/period")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/factura/period")
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[
{
"id": 123,
"client_id": "<string>",
"fecha": "2023-11-07T05:31:56Z",
"uf_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"total_clp": 123,
"total_descuento_clp": 123,
"detalleSubscripciones": [
{
"id": 123,
"subscription_detail_id": "<string>",
"equipo": "<string>",
"patente": "<string>",
"plan_comercial": "<string>",
"estado": "<string>",
"precio_uf": 123,
"precio_clp": 123,
"dias": 123,
"child_client_name": "<string>"
}
],
"detalleVisitas": [
{
"id": 123,
"visit_detail_id": "<string>",
"tipo_visita": "<string>",
"patente": "<string>",
"ciudad": "<string>",
"direccion": "<string>",
"fecha_visita": "2023-11-07T05:31:56Z",
"km_recorridos": 123,
"moneda": "<string>",
"costo_visita": 123,
"costo_por_km": 123,
"carga_costo_km": true,
"carga_costo_cliente": true,
"child_client_name": "<string>"
}
],
"detalleVentas": [
{
"id": 123,
"subscription_cancellation_id": 123,
"equipo": "<string>",
"patente": "<string>",
"plan_comercial": "<string>",
"fecha_venta": "2023-11-07T05:31:56Z",
"motivo_venta": "<string>",
"moneda": "<string>",
"monto_venta": 123,
"child_client_name": "<string>"
}
],
"descuentosAplicados": [
{
"id": "<string>",
"base_calculo_clp": 123,
"monto_descuento_clp": 123,
"motivo": "<string>",
"tipo_descuento": "<string>",
"valor": 123,
"monto_descuento_uf": 123,
"subscription_name": "<string>"
}
]
}
]Billing - Facturas
Get all facturas by period
Operacion: Get all facturas by period.
GET
/
api
/
v1
/
factura
/
period
Get all facturas by period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/factura/period \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/factura/period"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/factura/period', 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.raul.ugps.io/api/v1/factura/period",
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.raul.ugps.io/api/v1/factura/period"
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.raul.ugps.io/api/v1/factura/period")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/factura/period")
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[
{
"id": 123,
"client_id": "<string>",
"fecha": "2023-11-07T05:31:56Z",
"uf_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"total_clp": 123,
"total_descuento_clp": 123,
"detalleSubscripciones": [
{
"id": 123,
"subscription_detail_id": "<string>",
"equipo": "<string>",
"patente": "<string>",
"plan_comercial": "<string>",
"estado": "<string>",
"precio_uf": 123,
"precio_clp": 123,
"dias": 123,
"child_client_name": "<string>"
}
],
"detalleVisitas": [
{
"id": 123,
"visit_detail_id": "<string>",
"tipo_visita": "<string>",
"patente": "<string>",
"ciudad": "<string>",
"direccion": "<string>",
"fecha_visita": "2023-11-07T05:31:56Z",
"km_recorridos": 123,
"moneda": "<string>",
"costo_visita": 123,
"costo_por_km": 123,
"carga_costo_km": true,
"carga_costo_cliente": true,
"child_client_name": "<string>"
}
],
"detalleVentas": [
{
"id": 123,
"subscription_cancellation_id": 123,
"equipo": "<string>",
"patente": "<string>",
"plan_comercial": "<string>",
"fecha_venta": "2023-11-07T05:31:56Z",
"motivo_venta": "<string>",
"moneda": "<string>",
"monto_venta": 123,
"child_client_name": "<string>"
}
],
"descuentosAplicados": [
{
"id": "<string>",
"base_calculo_clp": 123,
"monto_descuento_clp": 123,
"motivo": "<string>",
"tipo_descuento": "<string>",
"valor": 123,
"monto_descuento_uf": 123,
"subscription_name": "<string>"
}
]
}
]Authorizations
Bearer token authentication
Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I