Rows

Read, add, change and delete the rows of a list register, with filters, safe retries and the older register addresses.

Reference

At a glance

ActionNeedsDoes
read_document/rowsregisters:rows:readReads rows, with filters
write_record/addregisters:rows:addAdds up to 50 rows
write_record/changeregisters:rows:changeChanges one row's cells
write_record/deleteregisters:rows:deleteDeletes one row for good

Rows a key adds or changes count at once. No one has to approve them. Read each register's columns first with list_columns.

Read rows

bash
curl -X POST https://app.alchex.com/api/v1/tools/read_document/rows \  -H "Authorization: Bearer EXAMPLE_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "register": "Suppliers", "where": [ { "column": "Risk", "is": ["High", "Medium"] }, { "column": "Review due", "before": "today" } ], "sortBy": "Review due", "limit": 20 }'
FieldRequiredWhat it is
registerYesThe register; see Naming a register
whereNoUp to 12 conditions, all of which must hold
sortByNoA column to order by
descendingNoWith sortBy: largest or latest first
tableNoWhich table, for a register with several
limitNoRows to return. 20 if left out, and never more than 50.

Each condition names a column and one test:

TestHolds when the cell
isEquals the value, or one of up to 20 values. Case does not matter.
isNotIs none of the values. An empty cell passes.
containsContains the text
emptyIs empty (true) or filled (false)
beforeIs a date before this one. Send YYYY-MM-DD or today.
afterIs a date on or after this one
atLeast, atMostIs a number at least, or at most, this one
json
{  "register": { "id": "…", "name": "Suppliers", "kind": "sheet", "code": "LST-OPS-001" },  "columns": [ { "name": "Name", "type": "text" }, { "name": "Risk", "type": "choice", "choices": ["Low", "Medium", "High"] } ],  "total": 3,  "counts": { "Risk": { "High": 2, "Medium": 1 } },  "rows": [ { "id": "…", "cells": { "Name": "Acme", "Risk": "High", "Review due": "2026-11-01" } } ],  "truncated": false}

total and counts cover the rows that match. An empty cell reads null, a date YYYY-MM-DD, and a multi-choice cell a list. Rows still waiting as suggestions come separately, under suggested.

A request returns at most 50 rows and stays under a size limit, so a large register may return fewer. There is no next page: narrow the request with where and sortBy instead.

Add rows

bash
curl -X POST https://app.alchex.com/api/v1/tools/write_record/add \  -H "Authorization: Bearer EXAMPLE_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "register": "Suppliers", "idempotencyKey": "import-2026-11-30", "rows": [ { "cells": { "Name": "Acme", "Risk": "High" }, "quote": "From the November supplier export" } ] }'
  • rows holds 1 to 50 rows. Each has cells, by column name, and an optional quote saying where the row came from.
  • idempotencyKey, up to 120 characters, makes a retry safe. You can send it as an Idempotency-Key header instead.
  • A cell value is a string, a number or true/false.

The answer is 201:

json
{ "rowCount": 1, "rowIds": ["…"], "waitsForApproval": false, "message": "…", "link": "/app/governance/sheets/…" }

A repeat with the same idempotency key adds nothing and answers 200 with { "replayed": true, "rowIds": ["…"] }.

Change a row

bash
curl -X POST https://app.alchex.com/api/v1/tools/write_record/change \  -H "Authorization: Bearer EXAMPLE_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "register": "Suppliers", "rowId": "ROW_ID", "cells": { "Risk": "Low" } }'

Send only the cells that change. The answer is 200 with rowId, message and link. An unknown row answers 404 row_not_found.

Delete a row

bash
curl -X POST https://app.alchex.com/api/v1/tools/write_record/delete \  -H "Authorization: Bearer EXAMPLE_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "register": "Suppliers", "rowId": "ROW_ID" }'

The row is deleted for good. The answer is 200 with rowId, "deleted": true, message and link. Sending "Status": "Deleted" in add or change is refused with 400 removal_not_allowed.

The older addresses

MethodAddressSame as
POST/api/v1/registers/<register>/rowswrite_record/add, with body { "rows": [ … ] }
PATCH/api/v1/registers/<register>/rows/<rowId>write_record/change, with body { "cells": { … } }
DELETE/api/v1/registers/<register>/rows/<rowId>write_record/delete, with no body

On these, send the idempotency key as the Idempotency-Key header.