Enviar registros de facturación en lote
curl --request POST \
--url https://api.kubifactu.com/api/invoicing/invoices/batch \
--header 'Content-Type: application/json' \
--header 'X-Qbikode-ClientApiKey: <api-key>' \
--data '
{
"invoices": [
{
"sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
"sender_data": {
"sender_full_name": "<string>",
"sender_id_card_number": "<string>"
},
"invoice_data": {
"invoice_type_key": "F1",
"fiscal_year": 2025,
"series_code": "2025",
"invoice_number": "00021",
"invoice_datetime": "2025-02-26 12:35:44",
"description": "<string>",
"lines": [
{
"tax_base": 200,
"tax_base_at_cost": 123,
"tax_rate": 21,
"tax_quota": 42,
"equalization_tax_rate": 5.2,
"equalization_tax_quota": 10.4
}
],
"total_quota": 123,
"total_amount": 123,
"operation_date": "2025-02-26",
"representative_company_name": "<string>",
"representative_tax_id_number": "<string>",
"is_simplified": false,
"coupon_key": "N",
"invoicing_agreement_registration_number": "<string>",
"sif_agreement_id": "<string>",
"rectified_base_amount": 2500.55,
"rectified_quota": 42.3,
"rectified_equalization_tax_quota": 5.2,
"replaced_rectified_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
],
"substituted_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
]
},
"callback_url": "https://www.tuempresa.com/kubifactu/callback",
"recipients": [
{
"full_name": "<string>",
"tax_id_number": "<string>",
"other_id_country_code": "<string>",
"other_id_card_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.kubifactu.com/api/invoicing/invoices/batch"
payload = { "invoices": [
{
"sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
"sender_data": {
"sender_full_name": "<string>",
"sender_id_card_number": "<string>"
},
"invoice_data": {
"invoice_type_key": "F1",
"fiscal_year": 2025,
"series_code": "2025",
"invoice_number": "00021",
"invoice_datetime": "2025-02-26 12:35:44",
"description": "<string>",
"lines": [
{
"tax_base": 200,
"tax_base_at_cost": 123,
"tax_rate": 21,
"tax_quota": 42,
"equalization_tax_rate": 5.2,
"equalization_tax_quota": 10.4
}
],
"total_quota": 123,
"total_amount": 123,
"operation_date": "2025-02-26",
"representative_company_name": "<string>",
"representative_tax_id_number": "<string>",
"is_simplified": False,
"coupon_key": "N",
"invoicing_agreement_registration_number": "<string>",
"sif_agreement_id": "<string>",
"rectified_base_amount": 2500.55,
"rectified_quota": 42.3,
"rectified_equalization_tax_quota": 5.2,
"replaced_rectified_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
],
"substituted_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
]
},
"callback_url": "https://www.tuempresa.com/kubifactu/callback",
"recipients": [
{
"full_name": "<string>",
"tax_id_number": "<string>",
"other_id_country_code": "<string>",
"other_id_card_id": "<string>"
}
]
}
] }
headers = {
"X-Qbikode-ClientApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Qbikode-ClientApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
sif_id: '9db0bca1-187e-4cf4-b87c-96f2044008d7',
sender_data: {sender_full_name: '<string>', sender_id_card_number: '<string>'},
invoice_data: {
invoice_type_key: 'F1',
fiscal_year: 2025,
series_code: '2025',
invoice_number: '00021',
invoice_datetime: '2025-02-26 12:35:44',
description: '<string>',
lines: [
{
tax_base: 200,
tax_base_at_cost: 123,
tax_rate: 21,
tax_quota: 42,
equalization_tax_rate: 5.2,
equalization_tax_quota: 10.4
}
],
total_quota: 123,
total_amount: 123,
operation_date: '2025-02-26',
representative_company_name: '<string>',
representative_tax_id_number: '<string>',
is_simplified: false,
coupon_key: 'N',
invoicing_agreement_registration_number: '<string>',
sif_agreement_id: '<string>',
rectified_base_amount: 2500.55,
rectified_quota: 42.3,
rectified_equalization_tax_quota: 5.2,
replaced_rectified_invoices: [
{
tax_id_number: '<string>',
full_invoice_number: '<string>',
invoice_date: '2025-02-26'
}
],
substituted_invoices: [
{
tax_id_number: '<string>',
full_invoice_number: '<string>',
invoice_date: '2025-02-26'
}
]
},
callback_url: 'https://www.tuempresa.com/kubifactu/callback',
recipients: [
{
full_name: '<string>',
tax_id_number: '<string>',
other_id_country_code: '<string>',
other_id_card_id: '<string>'
}
]
}
]
})
};
fetch('https://api.kubifactu.com/api/invoicing/invoices/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'sif_id' => '9db0bca1-187e-4cf4-b87c-96f2044008d7',
'sender_data' => [
'sender_full_name' => '<string>',
'sender_id_card_number' => '<string>'
],
'invoice_data' => [
'invoice_type_key' => 'F1',
'fiscal_year' => 2025,
'series_code' => '2025',
'invoice_number' => '00021',
'invoice_datetime' => '2025-02-26 12:35:44',
'description' => '<string>',
'lines' => [
[
'tax_base' => 200,
'tax_base_at_cost' => 123,
'tax_rate' => 21,
'tax_quota' => 42,
'equalization_tax_rate' => 5.2,
'equalization_tax_quota' => 10.4
]
],
'total_quota' => 123,
'total_amount' => 123,
'operation_date' => '2025-02-26',
'representative_company_name' => '<string>',
'representative_tax_id_number' => '<string>',
'is_simplified' => false,
'coupon_key' => 'N',
'invoicing_agreement_registration_number' => '<string>',
'sif_agreement_id' => '<string>',
'rectified_base_amount' => 2500.55,
'rectified_quota' => 42.3,
'rectified_equalization_tax_quota' => 5.2,
'replaced_rectified_invoices' => [
[
'tax_id_number' => '<string>',
'full_invoice_number' => '<string>',
'invoice_date' => '2025-02-26'
]
],
'substituted_invoices' => [
[
'tax_id_number' => '<string>',
'full_invoice_number' => '<string>',
'invoice_date' => '2025-02-26'
]
]
],
'callback_url' => 'https://www.tuempresa.com/kubifactu/callback',
'recipients' => [
[
'full_name' => '<string>',
'tax_id_number' => '<string>',
'other_id_country_code' => '<string>',
'other_id_card_id' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kubifactu.com/api/invoicing/invoices/batch"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qbikode-ClientApiKey", "<api-key>")
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.post("https://api.kubifactu.com/api/invoicing/invoices/batch")
.header("X-Qbikode-ClientApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/invoicing/invoices/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qbikode-ClientApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
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",
"fiscal_year": 123,
"full_invoice_number": "<string>",
"created_at": "2025-09-15T07:35:24.992854Z",
"fingerprint": "<string>",
"csv": "<string>",
"has_warnings": false,
"vf_error_descriptions": "<string>",
"next_request_waiting_time": 123,
"next_request_datetime": "1977-04-22T06:00:00Z",
"qr_value": "<string>",
"qr_image_url": "<string>",
"xml_url": "<string>",
"vf_response_body": "aSDinaTvuI8gbWludGxpZnk="
}
}{
"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"
}
}
}
}API Reference
Enviar registros de facturación en lote
Generación de nuevos registros de facturación en lote que serán procesados en diferido.
POST
/
api
/
invoicing
/
invoices
/
batch
Enviar registros de facturación en lote
curl --request POST \
--url https://api.kubifactu.com/api/invoicing/invoices/batch \
--header 'Content-Type: application/json' \
--header 'X-Qbikode-ClientApiKey: <api-key>' \
--data '
{
"invoices": [
{
"sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
"sender_data": {
"sender_full_name": "<string>",
"sender_id_card_number": "<string>"
},
"invoice_data": {
"invoice_type_key": "F1",
"fiscal_year": 2025,
"series_code": "2025",
"invoice_number": "00021",
"invoice_datetime": "2025-02-26 12:35:44",
"description": "<string>",
"lines": [
{
"tax_base": 200,
"tax_base_at_cost": 123,
"tax_rate": 21,
"tax_quota": 42,
"equalization_tax_rate": 5.2,
"equalization_tax_quota": 10.4
}
],
"total_quota": 123,
"total_amount": 123,
"operation_date": "2025-02-26",
"representative_company_name": "<string>",
"representative_tax_id_number": "<string>",
"is_simplified": false,
"coupon_key": "N",
"invoicing_agreement_registration_number": "<string>",
"sif_agreement_id": "<string>",
"rectified_base_amount": 2500.55,
"rectified_quota": 42.3,
"rectified_equalization_tax_quota": 5.2,
"replaced_rectified_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
],
"substituted_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
]
},
"callback_url": "https://www.tuempresa.com/kubifactu/callback",
"recipients": [
{
"full_name": "<string>",
"tax_id_number": "<string>",
"other_id_country_code": "<string>",
"other_id_card_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.kubifactu.com/api/invoicing/invoices/batch"
payload = { "invoices": [
{
"sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
"sender_data": {
"sender_full_name": "<string>",
"sender_id_card_number": "<string>"
},
"invoice_data": {
"invoice_type_key": "F1",
"fiscal_year": 2025,
"series_code": "2025",
"invoice_number": "00021",
"invoice_datetime": "2025-02-26 12:35:44",
"description": "<string>",
"lines": [
{
"tax_base": 200,
"tax_base_at_cost": 123,
"tax_rate": 21,
"tax_quota": 42,
"equalization_tax_rate": 5.2,
"equalization_tax_quota": 10.4
}
],
"total_quota": 123,
"total_amount": 123,
"operation_date": "2025-02-26",
"representative_company_name": "<string>",
"representative_tax_id_number": "<string>",
"is_simplified": False,
"coupon_key": "N",
"invoicing_agreement_registration_number": "<string>",
"sif_agreement_id": "<string>",
"rectified_base_amount": 2500.55,
"rectified_quota": 42.3,
"rectified_equalization_tax_quota": 5.2,
"replaced_rectified_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
],
"substituted_invoices": [
{
"tax_id_number": "<string>",
"full_invoice_number": "<string>",
"invoice_date": "2025-02-26"
}
]
},
"callback_url": "https://www.tuempresa.com/kubifactu/callback",
"recipients": [
{
"full_name": "<string>",
"tax_id_number": "<string>",
"other_id_country_code": "<string>",
"other_id_card_id": "<string>"
}
]
}
] }
headers = {
"X-Qbikode-ClientApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Qbikode-ClientApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
sif_id: '9db0bca1-187e-4cf4-b87c-96f2044008d7',
sender_data: {sender_full_name: '<string>', sender_id_card_number: '<string>'},
invoice_data: {
invoice_type_key: 'F1',
fiscal_year: 2025,
series_code: '2025',
invoice_number: '00021',
invoice_datetime: '2025-02-26 12:35:44',
description: '<string>',
lines: [
{
tax_base: 200,
tax_base_at_cost: 123,
tax_rate: 21,
tax_quota: 42,
equalization_tax_rate: 5.2,
equalization_tax_quota: 10.4
}
],
total_quota: 123,
total_amount: 123,
operation_date: '2025-02-26',
representative_company_name: '<string>',
representative_tax_id_number: '<string>',
is_simplified: false,
coupon_key: 'N',
invoicing_agreement_registration_number: '<string>',
sif_agreement_id: '<string>',
rectified_base_amount: 2500.55,
rectified_quota: 42.3,
rectified_equalization_tax_quota: 5.2,
replaced_rectified_invoices: [
{
tax_id_number: '<string>',
full_invoice_number: '<string>',
invoice_date: '2025-02-26'
}
],
substituted_invoices: [
{
tax_id_number: '<string>',
full_invoice_number: '<string>',
invoice_date: '2025-02-26'
}
]
},
callback_url: 'https://www.tuempresa.com/kubifactu/callback',
recipients: [
{
full_name: '<string>',
tax_id_number: '<string>',
other_id_country_code: '<string>',
other_id_card_id: '<string>'
}
]
}
]
})
};
fetch('https://api.kubifactu.com/api/invoicing/invoices/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoices' => [
[
'sif_id' => '9db0bca1-187e-4cf4-b87c-96f2044008d7',
'sender_data' => [
'sender_full_name' => '<string>',
'sender_id_card_number' => '<string>'
],
'invoice_data' => [
'invoice_type_key' => 'F1',
'fiscal_year' => 2025,
'series_code' => '2025',
'invoice_number' => '00021',
'invoice_datetime' => '2025-02-26 12:35:44',
'description' => '<string>',
'lines' => [
[
'tax_base' => 200,
'tax_base_at_cost' => 123,
'tax_rate' => 21,
'tax_quota' => 42,
'equalization_tax_rate' => 5.2,
'equalization_tax_quota' => 10.4
]
],
'total_quota' => 123,
'total_amount' => 123,
'operation_date' => '2025-02-26',
'representative_company_name' => '<string>',
'representative_tax_id_number' => '<string>',
'is_simplified' => false,
'coupon_key' => 'N',
'invoicing_agreement_registration_number' => '<string>',
'sif_agreement_id' => '<string>',
'rectified_base_amount' => 2500.55,
'rectified_quota' => 42.3,
'rectified_equalization_tax_quota' => 5.2,
'replaced_rectified_invoices' => [
[
'tax_id_number' => '<string>',
'full_invoice_number' => '<string>',
'invoice_date' => '2025-02-26'
]
],
'substituted_invoices' => [
[
'tax_id_number' => '<string>',
'full_invoice_number' => '<string>',
'invoice_date' => '2025-02-26'
]
]
],
'callback_url' => 'https://www.tuempresa.com/kubifactu/callback',
'recipients' => [
[
'full_name' => '<string>',
'tax_id_number' => '<string>',
'other_id_country_code' => '<string>',
'other_id_card_id' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kubifactu.com/api/invoicing/invoices/batch"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qbikode-ClientApiKey", "<api-key>")
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.post("https://api.kubifactu.com/api/invoicing/invoices/batch")
.header("X-Qbikode-ClientApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/invoicing/invoices/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qbikode-ClientApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"sif_id\": \"9db0bca1-187e-4cf4-b87c-96f2044008d7\",\n \"sender_data\": {\n \"sender_full_name\": \"<string>\",\n \"sender_id_card_number\": \"<string>\"\n },\n \"invoice_data\": {\n \"invoice_type_key\": \"F1\",\n \"fiscal_year\": 2025,\n \"series_code\": \"2025\",\n \"invoice_number\": \"00021\",\n \"invoice_datetime\": \"2025-02-26 12:35:44\",\n \"description\": \"<string>\",\n \"lines\": [\n {\n \"tax_base\": 200,\n \"tax_base_at_cost\": 123,\n \"tax_rate\": 21,\n \"tax_quota\": 42,\n \"equalization_tax_rate\": 5.2,\n \"equalization_tax_quota\": 10.4\n }\n ],\n \"total_quota\": 123,\n \"total_amount\": 123,\n \"operation_date\": \"2025-02-26\",\n \"representative_company_name\": \"<string>\",\n \"representative_tax_id_number\": \"<string>\",\n \"is_simplified\": false,\n \"coupon_key\": \"N\",\n \"invoicing_agreement_registration_number\": \"<string>\",\n \"sif_agreement_id\": \"<string>\",\n \"rectified_base_amount\": 2500.55,\n \"rectified_quota\": 42.3,\n \"rectified_equalization_tax_quota\": 5.2,\n \"replaced_rectified_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ],\n \"substituted_invoices\": [\n {\n \"tax_id_number\": \"<string>\",\n \"full_invoice_number\": \"<string>\",\n \"invoice_date\": \"2025-02-26\"\n }\n ]\n },\n \"callback_url\": \"https://www.tuempresa.com/kubifactu/callback\",\n \"recipients\": [\n {\n \"full_name\": \"<string>\",\n \"tax_id_number\": \"<string>\",\n \"other_id_country_code\": \"<string>\",\n \"other_id_card_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
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",
"fiscal_year": 123,
"full_invoice_number": "<string>",
"created_at": "2025-09-15T07:35:24.992854Z",
"fingerprint": "<string>",
"csv": "<string>",
"has_warnings": false,
"vf_error_descriptions": "<string>",
"next_request_waiting_time": 123,
"next_request_datetime": "1977-04-22T06:00:00Z",
"qr_value": "<string>",
"qr_image_url": "<string>",
"xml_url": "<string>",
"vf_response_body": "aSDinaTvuI8gbWludGxpZnk="
}
}{
"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.
Body
application/json
Array de registros de facturación con la misma estructura que la del endpoint de Enviar registro de facturación.
Show child attributes
Show child attributes
Response
Facturas recibidas con éxito.
Show child attributes
Show child attributes
⌘I