Actualizar referencia de una factura
curl --request PUT \
--url https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"doc_number": "<string>",
"doc_type_code": "801",
"doc_date": "2026-01-15",
"reason": "<string>"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}"
payload = {
"doc_number": "<string>",
"doc_type_code": "801",
"doc_date": "2026-01-15",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
doc_number: '<string>',
doc_type_code: '801',
doc_date: '2026-01-15',
reason: '<string>'
})
};
fetch('https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}', 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}/references/{refId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'doc_number' => '<string>',
'doc_type_code' => '801',
'doc_date' => '2026-01-15',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}"
payload := strings.NewReader("{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invoice_id": "<string>",
"doc_number": "<string>",
"doc_type_code": "<string>",
"doc_type_name": "<string>",
"doc_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reference_code": {},
"reason": {},
"odoo_reference_id": {}
}Invoices
Actualizar referencia de una factura
Operacion: Actualizar referencia de una factura.
PUT
/
api
/
v1
/
billing
/
invoices
/
{id}
/
references
/
{refId}
Actualizar referencia de una factura
curl --request PUT \
--url https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"doc_number": "<string>",
"doc_type_code": "801",
"doc_date": "2026-01-15",
"reason": "<string>"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}"
payload = {
"doc_number": "<string>",
"doc_type_code": "801",
"doc_date": "2026-01-15",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
doc_number: '<string>',
doc_type_code: '801',
doc_date: '2026-01-15',
reason: '<string>'
})
};
fetch('https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}', 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}/references/{refId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'doc_number' => '<string>',
'doc_type_code' => '801',
'doc_date' => '2026-01-15',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}"
payload := strings.NewReader("{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/billing/invoices/{id}/references/{refId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"doc_number\": \"<string>\",\n \"doc_type_code\": \"801\",\n \"doc_date\": \"2026-01-15\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invoice_id": "<string>",
"doc_number": "<string>",
"doc_type_code": "<string>",
"doc_type_name": "<string>",
"doc_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reference_code": {},
"reason": {},
"odoo_reference_id": {}
}Authorizations
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Body
application/json
Número del documento de referencia
Maximum string length:
100Código del tipo de documento
Available options:
801, HES, HEM, 802, 803, 33, 34, 61, 56, 52 Example:
"801"
Fecha del documento de referencia
Example:
"2026-01-15"
Motivo de la referencia (requerido para NC/ND)
Maximum string length:
500Código de referencia — solo para NC/ND ("1", "2", "3")
Available options:
1, 2, 3 Response
200 - application/json