Enviar factura por email (SII_ACCEPTED → EMAIL_SENT) (deprecada)
curl --request POST \
--url https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email', 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/billing/invoices/{id}/send-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/billing/invoices/{id}/send-email"
req, _ := http.NewRequest("POST", 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.post("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"receiver_name": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z",
"subtotal": 123,
"discount_total": 123,
"net_amount": 123,
"tax_rate": 123,
"tax_amount": 123,
"total_amount": 123,
"amount_paid": 123,
"client_credit_balance": 123,
"payment_terms_days": 123,
"invoice_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_id": {},
"receiver_rut": {},
"receiver_email": {},
"receiver_address": {},
"receiver_ciudad": {},
"receiver_comuna": {},
"receiver_giro": {},
"tax_amount_override": {},
"total_amount_override": {},
"uf_value_at_creation": {},
"folio_prefix": {},
"folio_number": {},
"internal_notes": {},
"public_notes": {},
"concept": {},
"periodo": {},
"credit_note_for_id": {},
"credit_note_reason": {},
"factura_id": {},
"parent_client_id": {},
"billing_client_id": {},
"oc_number": {},
"hes_number": {},
"requires_oc": true,
"requires_hes": true,
"detail_xlsx_url": {},
"last_dte_error": {},
"dte_retry_count": 123,
"dte_local_status": {},
"sii_status_detail": {},
"created_by": {},
"deleted_at": {}
}Invoices
Enviar factura por email (SII_ACCEPTED → EMAIL_SENT) (deprecada)
deprecated
Deprecada: usar POST /v1/dte/documents/:id/send-email con el id del DTE. Esta ruta envía por el mismo DteEmailPort y además transiciona la factura a EMAIL_SENT.
POST
/
api
/
v1
/
billing
/
invoices
/
{id}
/
send-email
Enviar factura por email (SII_ACCEPTED → EMAIL_SENT) (deprecada)
curl --request POST \
--url https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email', 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/billing/invoices/{id}/send-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/billing/invoices/{id}/send-email"
req, _ := http.NewRequest("POST", 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.post("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/send-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"receiver_name": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z",
"subtotal": 123,
"discount_total": 123,
"net_amount": 123,
"tax_rate": 123,
"tax_amount": 123,
"total_amount": 123,
"amount_paid": 123,
"client_credit_balance": 123,
"payment_terms_days": 123,
"invoice_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_id": {},
"receiver_rut": {},
"receiver_email": {},
"receiver_address": {},
"receiver_ciudad": {},
"receiver_comuna": {},
"receiver_giro": {},
"tax_amount_override": {},
"total_amount_override": {},
"uf_value_at_creation": {},
"folio_prefix": {},
"folio_number": {},
"internal_notes": {},
"public_notes": {},
"concept": {},
"periodo": {},
"credit_note_for_id": {},
"credit_note_reason": {},
"factura_id": {},
"parent_client_id": {},
"billing_client_id": {},
"oc_number": {},
"hes_number": {},
"requires_oc": true,
"requires_hes": true,
"detail_xlsx_url": {},
"last_dte_error": {},
"dte_retry_count": 123,
"dte_local_status": {},
"sii_status_detail": {},
"created_by": {},
"deleted_at": {}
}Authorizations
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Path Parameters
UUID de la factura
Response
200 - application/json
Saldo a favor disponible del cliente desde sobrepagos de otras facturas
local_status del DTE más reciente (estado del XML ante el SII)
Detalle libre devuelto por el SII para el DTE más reciente