Object Graph
The Object Graph reads the systems you have connected and returns their records as one set of standard objects: parties, invoices, bills, payments, orders, shipments, tickets and documents. Each object says, field by field, which system the value came from and when it was read. Your records are read where they live, each time you ask. They are not copied into CHANGENTS.AI.
The objects follow the format changents.objects/v1.
Object types
| Type | What it is | Fields |
|---|---|---|
Party | A customer, supplier or other counterparty | name, kind, taxId, email, phone, country |
Invoice | A sales invoice: money owed to you | number, party, issueDate, dueDate, currency, subtotal, tax, total, amountDue, status |
Bill | A purchase invoice: money you owe | same as Invoice |
Payment | Money received or paid | reference, party, date, amount, currency, appliesTo |
Order | A sales or purchase order | number, party, direction, date, status, total, currency |
Shipment | A consignment or container movement | reference, containerNo, origin, destination, departure, arrival, status |
Ticket | A service desk ticket | number, title, status, priority, openedAt, dueAt, assignee |
Document | A file in a document store | name, kind, modifiedAt, url |
Dates are YYYY-MM-DD. Amounts are numbers in the record's own currency.
Where the objects come from
- Xero: Contacts become
Party, sales invoicesInvoice, purchase invoicesBill, and Payments and purchase orders becomePaymentandOrder. This works once Xero is connected. - Tally: sales and purchase vouchers in the Day Book become
InvoiceandBill. This uses the Tally Connector. With a Site Agent that keeps records on your network, Tally is listed as kept on site and is never read by the Object Graph. - Your own database: you map a table to a type, as below. The table is read through the read-only SQL connector.
GET /api/v1/objects lists each type, its fields, and which sources are mapped to it and connected.
Map one of your tables
Mapping a table needs a signed-in session, not an API key, because it changes what every agent reads.
Here {type} is Party:
PUT /api/v1/objects/mappings/{type}
Content-Type: application/json
{
"table": "ar.customers",
"key": "cust_id",
"fields": { "name": "cust_name", "taxId": "uen", "email": "email" }
}- Each field names a column, or
{ "path": "column", "as": "date" | "number" | "abs" | "string" }to convert it. limitcaps the rows read (default 1000, at most 5000).GET /api/v1/objects/mappingslists your mappings.DELETE /api/v1/objects/mappings/{id}removes one.
Read objects
For parties, {type} is Party:
GET /api/v1/objects/{type}
Authorization: Bearer cgnt_sk_...The response has:
objects: each withfields,provenance(per field:source,entity,field,fetchedAt, and any conversion),members(the record ids it joins) andsources;suggestions: records that may be the same, for a person to decide;reads: each source read, with its record count and read time, or the error it returned.
GET /api/v1/objects/{type}/{id} returns one object with its lineage. The id can be the object's own id or any record id it joins. Use ?source=xero to read one source, and ?limit= to cap the objects returned.
An API key needs the objects scope (see Authentication). Reads count against the key's per-minute budget, like every other API.
The same record in two systems
Two records are joined into one object automatically only on an exact match:
| Type | Exact match on |
|---|---|
Party | tax id, or email |
Invoice, Bill, Order | number and party |
Payment | reference and amount |
Shipment | container number, or reference |
Ticket | number |
Document | URL |
Values are compared after normalising (case, spaces, punctuation, and company suffixes such as Pte Ltd).
Anything looser is returned as a suggestion and joined only after a person confirms it, for example two customer names that read alike. A signed-in person records the decision:
POST /api/v1/objects/links
{ "type": "Party", "a": "xero:Party:c-3", "b": "sql:Party:18", "decision": "same" }different keeps two records apart, even when they match exactly. Each decision is written to your organisation's audit chain.
Where joined records disagree on a field, the object shows the first source's value and lists the disagreement under conflicts. It never chooses silently.
Caching and No-Retention Mode
A read is kept in memory for one minute, so a burst of identical requests does not hit your systems again. It is never written to a database. Under No-Retention Mode the memory cache is not used either, and every request reads the source. The response says which mode applied, in retention.
Current limits
- The Object Graph reads; it does not write back to your systems yet.
- Changes are read on request: there are no change notifications from the Object Graph yet.
- The Tally Day Book fields have been tested against a stand-in Tally, not yet a real TallyPrime.
- Reading your own tables has been tested against a stand-in tool runtime, not yet a real database.