Skip to main content
POST
/
invoices
Crear facturas
curl --request POST \
  --url https://facture.ar/api/invoices \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 1.01,
  "description": "<string>",
  "docTipo": 123,
  "docNro": 123,
  "invoiceType": 123
}
'
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    cuitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    amount: 1.01,
    description: '<string>',
    docTipo: 123,
    docNro: 123,
    invoiceType: 123
  })
};

fetch('https://facture.ar/api/invoices', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://facture.ar/api/invoices"

payload = {
    "cuitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "amount": 1.01,
    "description": "<string>",
    "docTipo": 123,
    "docNro": 123,
    "invoiceType": 123
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://facture.ar/api/invoices",
  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([
    'cuitId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    'amount' => 1.01,
    'description' => '<string>',
    'docTipo' => 123,
    'docNro' => 123,
    'invoiceType' => 123
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "x-api-key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "message": "<string>"
}
{
  "error": "<string>",
  "message": "<string>",
  "details": {}
}

Authorizations

x-api-key
string
header
required

API Key para autenticación. Formato: test_sk_xxx para testing, prod_sk_xxx para producción.

Body

application/json
cuitId
string<uuid>
required

ID del CUIT emisor

amount
number<float>
required

Monto de la factura

Required range: x >= 0.01
description
string
required

Descripción de la factura

Maximum string length: 500
docTipo
integer
required

Tipo de documento del cliente

docNro
integer
required

Número de documento del cliente

invoiceType
integer
required

Tipo de factura

ivaType
integer

Tipo de IVA

currency
enum<string>
default:ARS

Moneda de la factura

Available options:
ARS,
USD
dueDate
string<date>

Fecha de vencimiento

Response

Factura(s) aceptada(s) para procesamiento

id
string<uuid>
required

ID único de la factura

status
enum<string>
required

Estado inicial de la factura

Available options:
pending,
processing
message
string

Mensaje de confirmación