curl --request POST \
--url https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--form file=@example-fileimport requests
url = "https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
options.body = form;
fetch('https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file', 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.sandbox.tesouro.com/finops/v1/payables/upload-from-file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-id>"
],
]);
$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.sandbox.tesouro.com/finops/v1/payables/upload-from-file"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.tesouro.com/finops/v1/payables/upload-from-file")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "8940c6f2-0614-4284-8260-64c8fe1c820d",
"created_at": "2023-06-01T09:15:00+00:00",
"updated_at": "2024-01-16T09:15:00+00:00",
"credit_notes": [
{
"document_id": "CN-123456",
"id": "123e4567-e89b-12d3-a456-426614174000",
"issued_at": "2024-01-15",
"status": "submitted_for_approval",
"total_amount": 1000
}
],
"entity_id": "31c5d948-45a9-410d-b663-e6c5bff208d0",
"payable_origin": "upload",
"source_of_payable_data": "ocr",
"status": "paid",
"amount_due": 0,
"amount_paid": 1350,
"amount_to_pay": 0,
"approval_policy_id": "acca576b-8592-43dd-8640-4f666833bf8d",
"counterpart": {
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
},
"counterpart_address_id": "8ecb94a4-d4f3-46a2-ad52-d873810d78a6",
"counterpart_bank_account_id": "dc626f45-e9f7-4c97-a1cd-1de279c934c6",
"counterpart_id": "20efb53b-c3ef-4f55-977f-9a0ad6453b43",
"counterpart_raw_data": {
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
},
"counterpart_vat_id_id": "a0b8cf93-6b7f-4ea2-8f09-8d8ac2c5e3f2",
"currency": "USD",
"currency_exchange": {
"default_currency_code": "EUR",
"rate": 1.08,
"total": 1458
},
"description": "Office supplies for Q3",
"discount": 150,
"document_id": "INV-2287",
"due_date": "2023-07-01",
"duplicates": [
{
"created_at": "2023-06-01T09:15:00+00:00",
"id": "5e6f7a8b-9c0d-4e1f-8a2b-4c5d6e7f8091",
"matched_payable_id": "6f7a8b9c-0d1e-4f2a-9b3c-5d6e7f809102",
"matched_payable_status": "new",
"resolved_at": "2023-06-02T09:15:00+00:00",
"resolved_by_user_id": "2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8",
"status": "confirmed",
"updated_at": "2023-06-02T09:15:00+00:00"
}
],
"enforce_approval_policy_id": "acca576b-8592-43dd-8640-4f666833bf8d",
"file": {
"created_at": "2023-06-01T09:15:00+00:00",
"file_type": "payables",
"id": "0b78b85c-bb5a-42e2-994b-509abb733def",
"md5": "31d1a2dd1ad3dfc39be849d70a68dac0",
"mimetype": "application/pdf",
"name": "invoice.pdf",
"region": "eu-central-1",
"size": 24381,
"url": "https://bucketname.s3.amazonaws.com/12345/67890.pdf"
},
"file_id": "0b78b85c-bb5a-42e2-994b-509abb733def",
"issued_at": "2023-06-01",
"marked_as_paid_by_entity_user_id": "71e8875a-43b3-434f-b12a-54c84c176ef3",
"marked_as_paid_with_comment": "Was paid partly in the end of the month.",
"ocr_request_id": "064f8e30-ac0d-4820-a1b5-33398aaafcff",
"ocr_status": "success",
"other_extracted_data": {
"counterpart_name": "Acme Inc.",
"currency": "USD",
"document_id": "INV-2287",
"total_excl_vat_raw": 12.5,
"total_raw": 13.5
},
"paid_at": "2023-06-15T10:32:00+00:00",
"partner_metadata": {
"internal_id": "PO-2024-001"
},
"payment_terms": {
"name": "Net 30 with early discount",
"term_1": {
"discount": 200,
"number_of_days": 10
},
"term_final": {
"number_of_days": 30
}
},
"project_id": "d480fc79-1c87-4d45-ae1a-14855e010341",
"purchase_order_id": "689e9a1f-a357-4e53-8b6c-a2259b56714e",
"purchase_order_number": "PO-2024-001",
"scheduled_payment_date": null,
"sender": "hello@example.com",
"subtotal": 1250,
"suggested_payment_term": {
"date": "2023-06-11",
"discount": 200
},
"tags": [
{
"created_at": "2022-09-07T16:35:18.484507+00:00",
"id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
"name": "Marketing",
"updated_at": "2022-09-07T16:35:18.484507+00:00"
}
],
"tax": 2000,
"tax_amount": 250,
"total_amount": 1350,
"total_amount_with_credit_notes": 1350,
"was_created_by_user_id": "2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"error": {
"message": "<string>"
}
}Upload payable from file
Upload an incoming invoice (payable) in PDF, PNG, or JPEG format and scan its contents. The maximum file size is 20MB.
curl --request POST \
--url https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--form file=@example-fileimport requests
url = "https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
options.body = form;
fetch('https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file', 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.sandbox.tesouro.com/finops/v1/payables/upload-from-file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-id>"
],
]);
$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.sandbox.tesouro.com/finops/v1/payables/upload-from-file"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.tesouro.com/finops/v1/payables/upload-from-file")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/payables/upload-from-file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "8940c6f2-0614-4284-8260-64c8fe1c820d",
"created_at": "2023-06-01T09:15:00+00:00",
"updated_at": "2024-01-16T09:15:00+00:00",
"credit_notes": [
{
"document_id": "CN-123456",
"id": "123e4567-e89b-12d3-a456-426614174000",
"issued_at": "2024-01-15",
"status": "submitted_for_approval",
"total_amount": 1000
}
],
"entity_id": "31c5d948-45a9-410d-b663-e6c5bff208d0",
"payable_origin": "upload",
"source_of_payable_data": "ocr",
"status": "paid",
"amount_due": 0,
"amount_paid": 1350,
"amount_to_pay": 0,
"approval_policy_id": "acca576b-8592-43dd-8640-4f666833bf8d",
"counterpart": {
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
},
"counterpart_address_id": "8ecb94a4-d4f3-46a2-ad52-d873810d78a6",
"counterpart_bank_account_id": "dc626f45-e9f7-4c97-a1cd-1de279c934c6",
"counterpart_id": "20efb53b-c3ef-4f55-977f-9a0ad6453b43",
"counterpart_raw_data": {
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
},
"counterpart_vat_id_id": "a0b8cf93-6b7f-4ea2-8f09-8d8ac2c5e3f2",
"currency": "USD",
"currency_exchange": {
"default_currency_code": "EUR",
"rate": 1.08,
"total": 1458
},
"description": "Office supplies for Q3",
"discount": 150,
"document_id": "INV-2287",
"due_date": "2023-07-01",
"duplicates": [
{
"created_at": "2023-06-01T09:15:00+00:00",
"id": "5e6f7a8b-9c0d-4e1f-8a2b-4c5d6e7f8091",
"matched_payable_id": "6f7a8b9c-0d1e-4f2a-9b3c-5d6e7f809102",
"matched_payable_status": "new",
"resolved_at": "2023-06-02T09:15:00+00:00",
"resolved_by_user_id": "2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8",
"status": "confirmed",
"updated_at": "2023-06-02T09:15:00+00:00"
}
],
"enforce_approval_policy_id": "acca576b-8592-43dd-8640-4f666833bf8d",
"file": {
"created_at": "2023-06-01T09:15:00+00:00",
"file_type": "payables",
"id": "0b78b85c-bb5a-42e2-994b-509abb733def",
"md5": "31d1a2dd1ad3dfc39be849d70a68dac0",
"mimetype": "application/pdf",
"name": "invoice.pdf",
"region": "eu-central-1",
"size": 24381,
"url": "https://bucketname.s3.amazonaws.com/12345/67890.pdf"
},
"file_id": "0b78b85c-bb5a-42e2-994b-509abb733def",
"issued_at": "2023-06-01",
"marked_as_paid_by_entity_user_id": "71e8875a-43b3-434f-b12a-54c84c176ef3",
"marked_as_paid_with_comment": "Was paid partly in the end of the month.",
"ocr_request_id": "064f8e30-ac0d-4820-a1b5-33398aaafcff",
"ocr_status": "success",
"other_extracted_data": {
"counterpart_name": "Acme Inc.",
"currency": "USD",
"document_id": "INV-2287",
"total_excl_vat_raw": 12.5,
"total_raw": 13.5
},
"paid_at": "2023-06-15T10:32:00+00:00",
"partner_metadata": {
"internal_id": "PO-2024-001"
},
"payment_terms": {
"name": "Net 30 with early discount",
"term_1": {
"discount": 200,
"number_of_days": 10
},
"term_final": {
"number_of_days": 30
}
},
"project_id": "d480fc79-1c87-4d45-ae1a-14855e010341",
"purchase_order_id": "689e9a1f-a357-4e53-8b6c-a2259b56714e",
"purchase_order_number": "PO-2024-001",
"scheduled_payment_date": null,
"sender": "hello@example.com",
"subtotal": 1250,
"suggested_payment_term": {
"date": "2023-06-11",
"discount": 200
},
"tags": [
{
"created_at": "2022-09-07T16:35:18.484507+00:00",
"id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
"name": "Marketing",
"updated_at": "2022-09-07T16:35:18.484507+00:00"
}
],
"tax": 2000,
"tax_amount": 250,
"total_amount": 1350,
"total_amount_with_credit_notes": 1350,
"was_created_by_user_id": "2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the entity that owns the requested resource.
"9d2b4c8f-2087-4738-ba91-7359683c49a4"
Body
Response
Successful Response
Represents an Accounts Payable document received from a vendor or supplier.
A unique ID assigned to this payable.
"8940c6f2-0614-4284-8260-64c8fe1c820d"
The list of linked credit notes of the payable.
Show child attributes
Show child attributes
[
{
"document_id": "CN-123456",
"id": "123e4567-e89b-12d3-a456-426614174000",
"issued_at": "2024-01-15",
"status": "submitted_for_approval",
"total_amount": 1000
}
]
The ID of the entity to which the payable was issued.
"31c5d948-45a9-410d-b663-e6c5bff208d0"
Specifies how this payable was created in Monite: upload - created via an API call, email - sent via email to the entity's mailbox.
upload, email "upload"
Specifies how the property values of this payable were provided: ocr - Monite OCR service extracted the values from the provided PDF or image file, user_specified - values were added or updated via an API call.
ocr, user_specified "ocr"
How much is left to be paid on the invoice (in minor units).
0
How much was paid on the invoice (in minor units).
1350
How much is left to be paid on the invoice (in minor units) with discounts from payment terms.
0
Id of existing approval policy that applies to this payable, if any. A policy is applied if the payable matches the policy trigger conditions.
"acca576b-8592-43dd-8640-4f666833bf8d"
Object representing de-normalized counterpart data. Filled at the moment of invoice submitting for approval or payment.
Show child attributes
Show child attributes
{
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
}
The ID of counterpart address object stored in counterparts service
"8ecb94a4-d4f3-46a2-ad52-d873810d78a6"
The ID of counterpart bank account object stored in counterparts service
"dc626f45-e9f7-4c97-a1cd-1de279c934c6"
The ID of the counterpart object that represents the vendor or supplier.
"20efb53b-c3ef-4f55-977f-9a0ad6453b43"
Object representing counterpart data which was extracted by OCR. Used for informational purposes.
Show child attributes
Show child attributes
{
"email": "acme@example.com",
"name": "Acme Inc.",
"phone": "5551231234",
"tax_id": "123456789"
}
The ID of counterpart VAT ID object stored in counterparts service
"a0b8cf93-6b7f-4ea2-8f09-8d8ac2c5e3f2"
The currency code of the currency used in the payable.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLE, SOS, SRD, SSP, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW "USD"
Show child attributes
Show child attributes
{
"default_currency_code": "EUR",
"rate": 1.08,
"total": 1458
}
An arbitrary description of this payable.
"Office supplies for Q3"
The discount stated on the document. This is informational only: total_amount is expected to already reflect it, and the API never applies or subtracts it separately. in minor units. For example, $12.50 is represented as 1250.
150
A unique invoice number assigned by the invoice issuer for payment tracking purposes. This is different from id which is an internal ID created automatically by Monite.
"INV-2287"
The date by which the payable must be paid, in the YYYY-MM-DD format. If the payable specifies payment terms with early payment discounts, this is the final payment date.
"2023-07-01"
Suspected and reviewed duplicates of this payable. Both payables of a matched pair see the same match. Ordered: suspected first, then confirmed, then dismissed, newest first within each group. At most 100 entries are returned.
Show child attributes
Show child attributes
[
{
"created_at": "2023-06-01T09:15:00+00:00",
"id": "5e6f7a8b-9c0d-4e1f-8a2b-4c5d6e7f8091",
"matched_payable_id": "6f7a8b9c-0d1e-4f2a-9b3c-5d6e7f809102",
"matched_payable_status": "new",
"resolved_at": "2023-06-02T09:15:00+00:00",
"resolved_by_user_id": "2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8",
"status": "confirmed",
"updated_at": "2023-06-02T09:15:00+00:00"
}
]
Id of an existing approval policy that should be enforced when submitting the payable for approval.If this field is set, no other policies will be evaluated via their triggers - the specified policy will always be applied instead.
"acca576b-8592-43dd-8640-4f666833bf8d"
The original file from which this payable was created.
Show child attributes
Show child attributes
{
"created_at": "2023-06-01T09:15:00+00:00",
"file_type": "payables",
"id": "0b78b85c-bb5a-42e2-994b-509abb733def",
"md5": "31d1a2dd1ad3dfc39be849d70a68dac0",
"mimetype": "application/pdf",
"name": "invoice.pdf",
"region": "eu-central-1",
"size": 24381,
"url": "https://bucketname.s3.amazonaws.com/12345/67890.pdf"
}
File id to retrieve the stored file info.
"0b78b85c-bb5a-42e2-994b-509abb733def"
The date when the payable was issued, in the YYYY-MM-DD format.
"2023-06-01"
The ID of the entity user who marked this document as paid.
"71e8875a-43b3-434f-b12a-54c84c176ef3"
An arbitrary comment that describes how and when this payable was paid.
"Was paid partly in the end of the month."
Id of OCR request to match asynchronous result of processing payable.
"064f8e30-ac0d-4820-a1b5-33398aaafcff"
The status of the data recognition process using OCR. The 'processing' status means that the data recognition is in progress and the user needs to wait for the data enrichment. The 'error' status indicates that some error occurred on the OCR side and the user can fill in the data manually. The 'success' status means the data recognition has been successfully completed, after which the user can check the data if desired and enrich or correct it.
processing, error, success, canceled "success"
Data extracted from the uploaded payable by OCR.
- Option 1
- Option 2
Show child attributes
Show child attributes
{
"counterpart_name": "Acme Inc.",
"currency": "USD",
"document_id": "INV-2287",
"total_excl_vat_raw": 12.5,
"total_raw": 13.5
}
The date by which the payable was paid
"2023-06-15T10:32:00+00:00"
Metadata for partner needs
{ "internal_id": "PO-2024-001" }
The number of days to pay with potential discount for options shorter than due_date
Show child attributes
Show child attributes
{
"name": "Net 30 with early discount",
"term_1": { "discount": 200, "number_of_days": 10 },
"term_final": { "number_of_days": 30 }
}
Project id of a payable.
"d480fc79-1c87-4d45-ae1a-14855e010341"
The identifier of the purchase order to which this payable belongs.
"689e9a1f-a357-4e53-8b6c-a2259b56714e"
The PO number as it appears on the document - not validated against, or linked to, any purchase order record. See purchase_order_id for that.
255"PO-2024-001"
The date of this payable's earliest live scheduled payment, in the YYYY-MM-DD format, or null if it has none. This is the value sort=scheduled_payment_date orders by; payables with no live scheduled payment sort last in ascending order and first in descending order.
null
The email address from which the invoice was sent to the entity.
"hello@example.com"
The subtotal amount to be paid, in minor units. For example, $12.50 is represented as 1250.
1250
The suggested date and corresponding discount in which payable could be paid. The date is in the YYYY-MM-DD format. The discount is calculated as X * (10^-4) - for example, 100 is 1%, 25 is 0,25%, 10000 is 100 %. Date varies depending on the payment terms and may even be equal to the due date with discount 0.
Show child attributes
Show child attributes
{ "date": "2023-06-11", "discount": 200 }
A list of user-defined tags (labels) assigned to this payable. Tags can be used to trigger a specific approval policy for this payable.
Show child attributes
Show child attributes
[
{
"created_at": "2022-09-07T16:35:18.484507+00:00",
"id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
"name": "Marketing",
"updated_at": "2022-09-07T16:35:18.484507+00:00"
}
]
Registered tax percentage applied for a service price in minor units, e.g. 200 means 2%, 1050 means 10.5%.
2000
Tax amount in minor units. For example, $12.50 is represented as 1250.
250
The total amount to be paid, in minor units. For example, $12.50 is represented as 1250.
1350
The total price of the payable in minor units, excluding all issued credit notes.
1350
"2ec8f1a3-60ca-48e0-a5f9-a38e683e3bf8"
Was this page helpful?