Leer facturas de cobro desde archivo
curl --request POST \
--url https://api.cresium.app/v3/invoice/read \
--header 'x-api-key: <api-key>' \
--header 'x-company-id: <api-key>' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://api.cresium.app/v3/invoice/read"
headers = {
"x-api-key": "<api-key>",
"x-signature": "<api-key>",
"x-timestamp": "<api-key>",
"x-company-id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-signature': '<api-key>',
'x-timestamp': '<api-key>',
'x-company-id': '<api-key>'
}
};
fetch('https://api.cresium.app/v3/invoice/read', 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.cresium.app/v3/invoice/read",
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-api-key: <api-key>",
"x-company-id: <api-key>",
"x-signature: <api-key>",
"x-timestamp: <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.cresium.app/v3/invoice/read"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-signature", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-company-id", "<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.cresium.app/v3/invoice/read")
.header("x-api-key", "<api-key>")
.header("x-signature", "<api-key>")
.header("x-timestamp", "<api-key>")
.header("x-company-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cresium.app/v3/invoice/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-signature"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
request["x-company-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"hasErrors": true,
"errors": [
{
"name": "<string>",
"error": "INTERNAL_SERVER_ERROR"
}
],
"extractedInvoices": [
{
"amount": 123,
"userAddress": {
"id": 5120,
"name": "Proveedor SA",
"uuid": "<string>",
"ranking": 123,
"emails": [
"<string>"
],
"addresses": [
{
"id": 7741,
"type": "CBU",
"value": "0110599520000001234567",
"bankName": "Banco de la Nación Argentina",
"ownerName": "Proveedor SA",
"uuid": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"img": "<string>",
"displayName": "<string>"
}
],
"description": "<string>",
"phone": "<string>",
"defaultAddressId": 123,
"displayName": "<string>",
"defaultAddress": {
"id": 7741,
"type": "CBU",
"value": "0110599520000001234567",
"bankName": "Banco de la Nación Argentina",
"ownerName": "Proveedor SA",
"uuid": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"img": "<string>",
"displayName": "<string>"
},
"erpLink": {
"companyIntegrationId": 123,
"erpObject": "ODOO_PARTNER",
"direction": "IMPORTED",
"status": "PENDING",
"erpId": "<string>"
},
"configuration": {
"id": 123,
"invoicePaymentTerm": "NO_TERM"
},
"tags": [
"PROVIDER"
],
"invoiceSequenceId": 123,
"collectionAddresses": [
{
"id": 123,
"type": "CVU",
"value": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"bankProvider": {
"name": "BIND",
"img": "<string>"
},
"externalId": "<string>"
}
]
},
"userAddressId": 123,
"status": "DRAFT",
"currencyCode": "ARS",
"issuedCurrencyCode": "ARS",
"issuedAmount": 123,
"exchangeRate": 123,
"exchangeRateBaseCurrency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"exchangeRateQuoteCurrency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"externalId": "<string>",
"description": "<string>",
"issuedAt": "<string>",
"expiresAt": "<string>",
"fileUrl": "<string>"
}
]
}
}{
"code": 400,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}{
"code": 401,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}{
"code": 500,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}Cuentas por Cobrar
Leer facturas de cobro desde archivo
Lee facturas de cobro desde archivos (imágenes o PDF) con OCR. Se envían hasta 50 archivos por multipart/form-data, todos con el campo file. Error: INVALID_FILE_TYPE si el tipo de archivo no está soportado.
POST
/
v3
/
invoice
/
read
Leer facturas de cobro desde archivo
curl --request POST \
--url https://api.cresium.app/v3/invoice/read \
--header 'x-api-key: <api-key>' \
--header 'x-company-id: <api-key>' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>'import requests
url = "https://api.cresium.app/v3/invoice/read"
headers = {
"x-api-key": "<api-key>",
"x-signature": "<api-key>",
"x-timestamp": "<api-key>",
"x-company-id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-signature': '<api-key>',
'x-timestamp': '<api-key>',
'x-company-id': '<api-key>'
}
};
fetch('https://api.cresium.app/v3/invoice/read', 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.cresium.app/v3/invoice/read",
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-api-key: <api-key>",
"x-company-id: <api-key>",
"x-signature: <api-key>",
"x-timestamp: <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.cresium.app/v3/invoice/read"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-signature", "<api-key>")
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-company-id", "<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.cresium.app/v3/invoice/read")
.header("x-api-key", "<api-key>")
.header("x-signature", "<api-key>")
.header("x-timestamp", "<api-key>")
.header("x-company-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cresium.app/v3/invoice/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-signature"] = '<api-key>'
request["x-timestamp"] = '<api-key>'
request["x-company-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"hasErrors": true,
"errors": [
{
"name": "<string>",
"error": "INTERNAL_SERVER_ERROR"
}
],
"extractedInvoices": [
{
"amount": 123,
"userAddress": {
"id": 5120,
"name": "Proveedor SA",
"uuid": "<string>",
"ranking": 123,
"emails": [
"<string>"
],
"addresses": [
{
"id": 7741,
"type": "CBU",
"value": "0110599520000001234567",
"bankName": "Banco de la Nación Argentina",
"ownerName": "Proveedor SA",
"uuid": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"img": "<string>",
"displayName": "<string>"
}
],
"description": "<string>",
"phone": "<string>",
"defaultAddressId": 123,
"displayName": "<string>",
"defaultAddress": {
"id": 7741,
"type": "CBU",
"value": "0110599520000001234567",
"bankName": "Banco de la Nación Argentina",
"ownerName": "Proveedor SA",
"uuid": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"img": "<string>",
"displayName": "<string>"
},
"erpLink": {
"companyIntegrationId": 123,
"erpObject": "ODOO_PARTNER",
"direction": "IMPORTED",
"status": "PENDING",
"erpId": "<string>"
},
"configuration": {
"id": 123,
"invoicePaymentTerm": "NO_TERM"
},
"tags": [
"PROVIDER"
],
"invoiceSequenceId": 123,
"collectionAddresses": [
{
"id": 123,
"type": "CVU",
"value": "<string>",
"currency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"bankProvider": {
"name": "BIND",
"img": "<string>"
},
"externalId": "<string>"
}
]
},
"userAddressId": 123,
"status": "DRAFT",
"currencyCode": "ARS",
"issuedCurrencyCode": "ARS",
"issuedAmount": 123,
"exchangeRate": 123,
"exchangeRateBaseCurrency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"exchangeRateQuoteCurrency": {
"symbol": "$",
"code": "ARS",
"image": "<string>",
"decimals": 2
},
"externalId": "<string>",
"description": "<string>",
"issuedAt": "<string>",
"expiresAt": "<string>",
"fileUrl": "<string>"
}
]
}
}{
"code": 400,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}{
"code": 401,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}{
"code": 500,
"error": "INTERNAL_SERVER_ERROR",
"message": "<unknown>"
}