curl --request PATCH \
--url https://app.equated.co/api/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payerAccountId": 1,
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"orgMerchantId": 1,
"projectId": 1,
"accountingDate": "<string>",
"lineItems": [
{
"amount": 123,
"name": "<string>",
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"category_key": "<string>",
"categoryAccountId": 1,
"projectId": 1
}
]
}
'import requests
url = "https://app.equated.co/api/documents/{id}"
payload = {
"payerAccountId": 1,
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"orgMerchantId": 1,
"projectId": 1,
"accountingDate": "<string>",
"lineItems": [
{
"amount": 123,
"name": "<string>",
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"category_key": "<string>",
"categoryAccountId": 1,
"projectId": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payerAccountId: 1,
amount: '<string>',
currency: '<string>',
displayTitle: '<string>',
orgMerchantId: 1,
projectId: 1,
accountingDate: '<string>',
lineItems: [
{
amount: 123,
name: '<string>',
description: '<string>',
quantity: 123,
unit_price: 123,
category_key: '<string>',
categoryAccountId: 1,
projectId: 1
}
]
})
};
fetch('https://app.equated.co/api/documents/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payerAccountId' => 1,
'amount' => '<string>',
'currency' => '<string>',
'displayTitle' => '<string>',
'orgMerchantId' => 1,
'projectId' => 1,
'accountingDate' => '<string>',
'lineItems' => [
[
'amount' => 123,
'name' => '<string>',
'description' => '<string>',
'quantity' => 123,
'unit_price' => 123,
'category_key' => '<string>',
'categoryAccountId' => 1,
'projectId' => 1
]
]
]),
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/{id}"
payload := strings.NewReader("{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.equated.co/api/documents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\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",
"matchedTransactions": [
{
"id": 1,
"relationId": 1,
"relationType": "evidence",
"settlementAmount": "<string>",
"settlementCurrency": "<string>",
"fxJournalEntryId": 1,
"paymentAmountBase": "<string>"
}
],
"settlement": {
"derivedStatus": "open",
"settledAmount": "<string>",
"outstandingAmount": "<string>",
"totalRealizedFxBase": "<string>",
"currency": "<string>",
"links": [
{
"relationId": 1,
"kind": "payment",
"transactionId": 1,
"amount": "<string>",
"currency": "<string>",
"matchedAt": "<string>",
"jeStatus": "DRAFT",
"fxJournalEntryId": 1,
"paymentAmountBase": "<string>",
"realizedFxBase": "<string>"
}
]
},
"extractedText": "<string>",
"cardLast4": "<string>",
"resolutionHint": {
"connectedFinancialAccountId": 1,
"suggestedPayerAccountId": 1
}
}
}Edit a document's figures
Edits document details and receipt/reimbursement line items. Draft reimbursement accounting edits rebuild its draft entry; payerAccountId identifies the person owed. Unconfirm a posted reimbursement before editing; unconfirm retains its entry and payer.
curl --request PATCH \
--url https://app.equated.co/api/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payerAccountId": 1,
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"orgMerchantId": 1,
"projectId": 1,
"accountingDate": "<string>",
"lineItems": [
{
"amount": 123,
"name": "<string>",
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"category_key": "<string>",
"categoryAccountId": 1,
"projectId": 1
}
]
}
'import requests
url = "https://app.equated.co/api/documents/{id}"
payload = {
"payerAccountId": 1,
"amount": "<string>",
"currency": "<string>",
"displayTitle": "<string>",
"orgMerchantId": 1,
"projectId": 1,
"accountingDate": "<string>",
"lineItems": [
{
"amount": 123,
"name": "<string>",
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"category_key": "<string>",
"categoryAccountId": 1,
"projectId": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payerAccountId: 1,
amount: '<string>',
currency: '<string>',
displayTitle: '<string>',
orgMerchantId: 1,
projectId: 1,
accountingDate: '<string>',
lineItems: [
{
amount: 123,
name: '<string>',
description: '<string>',
quantity: 123,
unit_price: 123,
category_key: '<string>',
categoryAccountId: 1,
projectId: 1
}
]
})
};
fetch('https://app.equated.co/api/documents/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payerAccountId' => 1,
'amount' => '<string>',
'currency' => '<string>',
'displayTitle' => '<string>',
'orgMerchantId' => 1,
'projectId' => 1,
'accountingDate' => '<string>',
'lineItems' => [
[
'amount' => 123,
'name' => '<string>',
'description' => '<string>',
'quantity' => 123,
'unit_price' => 123,
'category_key' => '<string>',
'categoryAccountId' => 1,
'projectId' => 1
]
]
]),
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/{id}"
payload := strings.NewReader("{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.equated.co/api/documents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payerAccountId\": 1,\n \"amount\": \"<string>\",\n \"currency\": \"<string>\",\n \"displayTitle\": \"<string>\",\n \"orgMerchantId\": 1,\n \"projectId\": 1,\n \"accountingDate\": \"<string>\",\n \"lineItems\": [\n {\n \"amount\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"category_key\": \"<string>\",\n \"categoryAccountId\": 1,\n \"projectId\": 1\n }\n ]\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",
"matchedTransactions": [
{
"id": 1,
"relationId": 1,
"relationType": "evidence",
"settlementAmount": "<string>",
"settlementCurrency": "<string>",
"fxJournalEntryId": 1,
"paymentAmountBase": "<string>"
}
],
"settlement": {
"derivedStatus": "open",
"settledAmount": "<string>",
"outstandingAmount": "<string>",
"totalRealizedFxBase": "<string>",
"currency": "<string>",
"links": [
{
"relationId": 1,
"kind": "payment",
"transactionId": 1,
"amount": "<string>",
"currency": "<string>",
"matchedAt": "<string>",
"jeStatus": "DRAFT",
"fxJournalEntryId": 1,
"paymentAmountBase": "<string>",
"realizedFxBase": "<string>"
}
]
},
"extractedText": "<string>",
"cardLast4": "<string>",
"resolutionHint": {
"connectedFinancialAccountId": 1,
"suggestedPayerAccountId": 1
}
}
}Authorizations
API token issued from the Equated app under Settings → API Tokens.
Path Parameters
x > 0Body
Payer account for a draft reimbursement; not editable on other document types.
x > 0Document total as a signed decimal string. A negative reimbursement total posts mirrored.
^-?\d+(\.\d+)?$3200Vendor or customer to attribute the document to.
x > 0Project to attribute the document to. Null clears the assignment.
x > 0Economic date of the document (YYYY-MM-DD). Bills and reimbursements post on it; fix it here when extraction misread the year.
^\d{4}-\d{2}-\d{2}$Replaces a receipt's or reimbursement's lines wholesale (one per category is the convention; null categoryAccountId = still to place). Bills and invoices edit their lines with edit_bill and edit_invoice instead.
Show child attributes
Show child attributes
Response
Updated document detail
Show child attributes
Show child attributes