Get factura by client and period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/factura/client/{clientId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/factura/client/{clientId}"
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/client/{clientId}', 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/client/{clientId}",
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/client/{clientId}"
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/client/{clientId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/factura/client/{clientId}")
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 factura by client and period
Operacion: Get factura by client and period.
GET
/
api
/
v1
/
factura
/
client
/
{clientId}
Get factura by client and period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/factura/client/{clientId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/factura/client/{clientId}"
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/client/{clientId}', 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/client/{clientId}",
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/client/{clientId}"
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/client/{clientId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/factura/client/{clientId}")
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
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Path Parameters
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes