curl --request POST \
--url https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel \
--header 'X-Qbikode-ClientApiKey: <api-key>'import requests
url = "https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel"
headers = {"X-Qbikode-ClientApiKey": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Qbikode-ClientApiKey': '<api-key>'}};
fetch('https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel', 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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Qbikode-ClientApiKey: <api-key>"
],
]);
$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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Qbikode-ClientApiKey", "<api-key>")
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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel")
.header("X-Qbikode-ClientApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qbikode-ClientApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb",
"sif_id": "0995C42C-6708-44FB-BFBF-B363A5FE873E",
"fingerprint": "<string>",
"has_warnings": false,
"vf_error_descriptions": "<string>",
"next_request_waiting_time": 123,
"next_request_datetime": "1977-04-22T06:00:00Z"
}
}{
"data": {
"error": {
"code": "E-UNAUTH-APIKEY",
"message": "No client with API-KEY '5tVySMGJOpq8HfMgIX28Qz6kF0dFOoq37x55PLZcWsGeGeYkNgJyAcRTlFJ5NbVoDRm8qtCywEoiN3A9JkBanMBXYmxiqR3BItxgxx' was found.",
"http_code": 403,
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}{
"data": {
"error": {
"message": "The given data was invalid.",
"errors": {
"invoice_exists": [
"An invoice already exists with the indicated invoice number and fiscal for the provided SIF. Existing invoice ID: [9db6bb78-6799-4abb-b9a0-22d127c543ed]."
],
"incorrect_total_quota": [
"The total quota of the invoice does not match the total tax quota and equalization_tax_quota of the lines. Calculated total quota: [26.25]."
],
"incorrect_total_amount": [
"The total amount of the invoice does not match the total tax base of the lines. Calculated total amount: [151.25]."
]
},
"details": {
"request_id": "9ded9e2c-d59e-4432-a926-652cbcfac365"
}
}
}
}Anular registro de facturación
Anulación de un registro de facturación.
Si se considera que “toda la factura” en sí misma está mal o no debería haberse emitido, siempre que para solucionarlo no deba emplearse algún procedimiento (de rectificativa u otro) previsto en el Reglamento de Obligaciones de Facturación (ROF), se podrá anular, generando para ello un registro de facturación de anulación.
curl --request POST \
--url https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel \
--header 'X-Qbikode-ClientApiKey: <api-key>'import requests
url = "https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel"
headers = {"X-Qbikode-ClientApiKey": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Qbikode-ClientApiKey': '<api-key>'}};
fetch('https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel', 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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Qbikode-ClientApiKey: <api-key>"
],
]);
$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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Qbikode-ClientApiKey", "<api-key>")
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.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel")
.header("X-Qbikode-ClientApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/invoicing/invoices/{invoiceId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qbikode-ClientApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb",
"sif_id": "0995C42C-6708-44FB-BFBF-B363A5FE873E",
"fingerprint": "<string>",
"has_warnings": false,
"vf_error_descriptions": "<string>",
"next_request_waiting_time": 123,
"next_request_datetime": "1977-04-22T06:00:00Z"
}
}{
"data": {
"error": {
"code": "E-UNAUTH-APIKEY",
"message": "No client with API-KEY '5tVySMGJOpq8HfMgIX28Qz6kF0dFOoq37x55PLZcWsGeGeYkNgJyAcRTlFJ5NbVoDRm8qtCywEoiN3A9JkBanMBXYmxiqR3BItxgxx' was found.",
"http_code": 403,
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}{
"data": {
"error": {
"message": "The given data was invalid.",
"errors": {
"invoice_exists": [
"An invoice already exists with the indicated invoice number and fiscal for the provided SIF. Existing invoice ID: [9db6bb78-6799-4abb-b9a0-22d127c543ed]."
],
"incorrect_total_quota": [
"The total quota of the invoice does not match the total tax quota and equalization_tax_quota of the lines. Calculated total quota: [26.25]."
],
"incorrect_total_amount": [
"The total amount of the invoice does not match the total tax base of the lines. Calculated total amount: [151.25]."
]
},
"details": {
"request_id": "9ded9e2c-d59e-4432-a926-652cbcfac365"
}
}
}
}Authorizations
API-KEY de la empresa que hace la petición. Este dato se puede consultar en el panel web, accediendo a la sección Empresas y accediendo a la ficha de la empresa en cuestión.
Path Parameters
ID de la factura. Este ID se obtiene en la respuesta a las altas de registros de facturación. También se peude obtener desde el panel web, acediendo a la factura en el campo ID DE KUBIFACTU.
Response
Factura enviada con éxito.
Show child attributes
Show child attributes