curl --request POST \
--url https://app.equated.co/api/documents/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadKey": "<string>",
"counterpartyName": "<string>",
"amount": "<string>",
"documentDate": "<string>",
"note": "<string>"
}
'import requests
url = "https://app.equated.co/api/documents/ingest"
payload = {
"uploadKey": "<string>",
"counterpartyName": "<string>",
"amount": "<string>",
"documentDate": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadKey: '<string>',
counterpartyName: '<string>',
amount: '<string>',
documentDate: '<string>',
note: '<string>'
})
};
fetch('https://app.equated.co/api/documents/ingest', 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://app.equated.co/api/documents/ingest",
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([
'uploadKey' => '<string>',
'counterpartyName' => '<string>',
'amount' => '<string>',
'documentDate' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.equated.co/api/documents/ingest"
payload := strings.NewReader("{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.equated.co/api/documents/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/documents/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"document": {
"id": 1,
"documentType": "<string>",
"lifecycle": "<string>",
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"documentNumber": "<string>",
"dueDate": "<string>",
"createdAt": "<string>",
"orgMerchantId": 1,
"orgMerchant": {
"id": 1,
"name": "<string>",
"website": "<string>",
"imageUrl": "<string>",
"logo": "<string>"
},
"amountBase": "<string>",
"baseCurrency": "<string>",
"derivedSettlementStatus": "open",
"derivedOutstandingAmount": "<string>",
"payerAccountId": 1,
"resolution": "unresolved"
}
}Create a document from an uploaded file
Ingest a file uploaded via POST /documents/upload-urls as a DRAFT document. Name documentType (RECEIPT, REIMBURSEMENT, BILL, or INVOICE) when you know it and it is kept over the classifier’s guess; omit it and the document lands unsorted for the classifier to name. When all you know is the direction, uploadContext (money_out / money_in) leans the classifier that way without settling anything — the document’s own evidence still decides. AI extraction fills the type, amount, dates, counterparty, and line items in the background, guided by any details provided; bills and invoices then also get their draft accrual journal entry. Re-read the document until aiExtractionPending is false. Idempotent on uploadKey — retries return the same document.
curl --request POST \
--url https://app.equated.co/api/documents/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadKey": "<string>",
"counterpartyName": "<string>",
"amount": "<string>",
"documentDate": "<string>",
"note": "<string>"
}
'import requests
url = "https://app.equated.co/api/documents/ingest"
payload = {
"uploadKey": "<string>",
"counterpartyName": "<string>",
"amount": "<string>",
"documentDate": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadKey: '<string>',
counterpartyName: '<string>',
amount: '<string>',
documentDate: '<string>',
note: '<string>'
})
};
fetch('https://app.equated.co/api/documents/ingest', 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://app.equated.co/api/documents/ingest",
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([
'uploadKey' => '<string>',
'counterpartyName' => '<string>',
'amount' => '<string>',
'documentDate' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.equated.co/api/documents/ingest"
payload := strings.NewReader("{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.equated.co/api/documents/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/documents/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadKey\": \"<string>\",\n \"counterpartyName\": \"<string>\",\n \"amount\": \"<string>\",\n \"documentDate\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"document": {
"id": 1,
"documentType": "<string>",
"lifecycle": "<string>",
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"documentNumber": "<string>",
"dueDate": "<string>",
"createdAt": "<string>",
"orgMerchantId": 1,
"orgMerchant": {
"id": 1,
"name": "<string>",
"website": "<string>",
"imageUrl": "<string>",
"logo": "<string>"
},
"amountBase": "<string>",
"baseCurrency": "<string>",
"derivedSettlementStatus": "open",
"derivedOutstandingAmount": "<string>",
"payerAccountId": 1,
"resolution": "unresolved"
}
}Authorizations
API token issued from the Equated app under Settings → API Tokens.
Body
uploadKey from the presign step, after the PUT succeeded.
1Which kind of document this is, when the caller knows. Preserved over the AI classifier's own guess; omit it and the classifier decides.
RECEIPT, BILL, INVOICE, REIMBURSEMENT Which side of the books the file came from when the caller knows only that: money_out (the business pays) or money_in (the business is owed). A weak prior for the classifier, which the document's own evidence and a named documentType both outrank.
money_in, money_out Vendor (receipt/bill) or customer (invoice) the user named.
1 - 200Grand total the user stated, in currency.
^\d+(\.\d+)?$ISO currency the user stated. Omit to let extraction decide.
CAD, USD, EUR, GBP, AUD Receipt/issue date printed on the document.
^\d{4}-\d{2}-\d{2}$Any other context the user gave about this document.
1 - 2000Response
Ingested document
Show child attributes
Show child attributes