Every committed write returns an intentId. Writes never reach Tally during your request, so poll for the result here.
For the full lifecycle, read Write safety and the API overview.
Following a write
A key cannot approve or reject a write. Only a person in the workspace can.
Get a write's status
GET /v1/intents/{id}
Returns where a write has got to. pending covers both waiting for approval and waiting for Tally, and this call cannot tell you which. applied means Tally accepted the import, not that the record is proven. Confirmation is resultGuid non-null, then GET /v1/vouchers/{guid}. For masters, read the record back by name.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
Path | UUID | Yes | The intentId from the commit. |
Response fields
| Field | Type | Description |
|---|---|---|
state |
string | applied means Tally accepted the import. Confirmation is resultGuid. One of: pending, claimed, submitted, applied, failed, rejected. |
resultGuid |
string | GUID of the record, once it has synced back. Null until then. When it is set, read the voucher to confirm. |
resultMasterId |
integer | Tally's numeric id, for vouchers. Null for masters. |
resultVoucherNumber |
string | The number Tally printed. Null until the voucher has synced back. |
error |
string | Why the write failed. Null otherwise. |
Status codes
| Status | Error | Meaning |
|---|---|---|
| 200 | Success. | |
| 401 | unauthorized |
The key is missing, invalid or revoked. The body has error only. |
| 404 | not_found |
No such write in this workspace. |
Example request
curl -s "https://relay.autotally.ai/v1/intents/e21f7a90-5c3b-4d18-8f26-3b9c1d7e4a02" \
-H "authorization: Bearer $AUTOTALLY_TOKEN"
Example response
{
"state": "applied",
"resultGuid": "4c0d6f1e-2a77-4b3d-9e15-0b8f7d3a1c64-00000a3f",
"resultMasterId": 2623,
"resultVoucherNumber": "INV/2026-27/0142",
"error": null
}
Retract a queued write
POST /v1/intents/{id}/supersede
Withdraws a write that is still pending and has not been approved. Answers 200 either way, so read superseded. The key needs writes allowed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
Path | UUID | Yes | The intentId from the commit. |
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
reason |
string | No | Why, recorded with the write. Cut to 200 characters. |
Response fields
| Field | Type | Description |
|---|---|---|
intentId |
string | The write. |
superseded |
boolean | true if it was retracted. |
state |
string | Its state now. One of: pending, claimed, submitted, applied, failed, rejected. |
reason |
string | Why it could not be retracted. Present when superseded is false. One of: already-applied, approved-and-in-flight, failed, already-withdrawn. |
voucherNumber |
string | Present for already-applied once known. For display only. |
masterId |
integer | Present for already-applied: Tally's numeric id for the voucher. |
Status codes
| Status | Error | Meaning |
|---|---|---|
| 200 | The outcome. superseded says whether it was retracted. |
|
| 401 | unauthorized |
The key is missing, invalid or revoked. |
| 403 | forbidden |
The key does not allow writes. |
| 404 | not_found |
No such write in this workspace. |
Example request
curl -s -X POST "https://relay.autotally.ai/v1/intents/e21f7a90-5c3b-4d18-8f26-3b9c1d7e4a02/supersede" \
-H "authorization: Bearer $AUTOTALLY_TOKEN" \
-H "content-type: application/json" \
-d '{
"reason": "Customer cancelled the order"
}'
Example response
{
"intentId": "e21f7a90-5c3b-4d18-8f26-3b9c1d7e4a02",
"superseded": true,
"state": "rejected"
}
Approval bundles
Get an approval bundle
GET /v1/bundles/{id}
A bundle groups the writes proposed from one document, in the order they apply. Read it after an upload returns a bundleId. A key can read a bundle, not approve it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
Path | string | Yes | The bundleId. |
Response fields
| Field | Type | Description |
|---|---|---|
bundleId |
UUID | The bundle. |
companyGuid |
string | Company GUID. |
documentId |
UUID | The document it was proposed from, if any. |
intents[] |
array of object | The writes, in the order they apply. |
intents[].intentId |
UUID | The write. |
intents[].seq |
integer | Position within the bundle. |
intents[].op |
string | What kind of write it is. |
intents[].state |
string | State of this write. One of: pending, claimed, submitted, applied, failed, rejected. |
intents[].payload |
object | The write's content. |
intents[].approvedAt |
date-time | When a person approved it. |
intents[].error |
string | Why it failed, if it did. |
intents[].appliedRules[] |
array of object | Rules that shaped or flagged this write. |
intents[].appliedRules[].ruleId |
UUID | The rule. |
intents[].appliedRules[].kind |
string | Kind of rule. One of: party-ledger-map, party-fact, validation-threshold, workflow-note, company-account-map. |
intents[].appliedRules[].subject |
string | Normalised lookup key. Not for display. |
intents[].appliedRules[].summary |
string | What the rule does, in one sentence. |
intents[].appliedRules[].learnedAt |
date-time | When it was learned. |
intents[].appliedRules[].revokedAt |
date-time | When it was revoked, if it was. |
flags[] |
array of object | Things a person should look at. |
flags[].code |
string | Code. |
flags[].field |
string | The extracted field this concerns. |
flags[].message |
string | Message. |
requiresFieldResolution |
boolean | Two readings of a figure disagree and nobody has picked one. |
requiresAccountMapping |
boolean | The posting names an account the books lack, or hold twice. |
state |
string | The bundle's state, taken from its worst member. One of: pending, approved, applied, rejected, failed. |
Status codes
| Status | Error | Meaning |
|---|---|---|
| 200 | Success. | |
| 401 | unauthorized |
The key is missing, invalid or revoked. |
| 404 | not_found |
No such bundle in this workspace. |
Example request
curl -s "https://relay.autotally.ai/v1/bundles/c8a1e6f2-3d40-4b77-9a15-e2f07b6d4c19" \
-H "authorization: Bearer $AUTOTALLY_TOKEN"
