Contracts
Terms, notice periods and price uplifts extracted from your order forms and agreements.
A contract records the commercial terms with a vendor: when the current term starts and ends, whether it renews automatically, how much notice it needs, and what you pay. We extract these terms from order forms, MSAs and renewal notices in memory, and keep only the terms. The documents themselves stay in your mailbox, and every field links back to its source.
Endpoints
- GET/v1/contractsList contracts
- GET/v1/contracts/:idRetrieve a contract
- PATCH/v1/contracts/:idCorrect extracted terms
- POST/v1/contracts/:id/send_noticeSend non-renewal notice
The contract object
{
"id": "ctr_4Lw7Yh",
"object": "contract",
"vendor": "ven_9xKd02",
"term_start": "2026-02-01",
"term_end": "2027-01-31",
"auto_renews": true,
"renewal_term_months": 12,
"notice_period_days": 60,
"notice_deadline": "2026-12-02",
"annual_value": { "amount": 3840000, "currency": "usd" },
"billing_interval": "annual",
"uplift": { "type": "percent", "max": 7.0 },
"quantity": 40,
"unit": "seat",
"documents": [
{ "id": "doc_51Hc", "kind": "order_form", "received_at": "2026-01-22T17:03:00Z", "source_url": "https://mail.google.com/mail/u/0/#all/18c2f…" }
],
"confidence": { "notice_period_days": 0.98, "uplift": 0.91 },
"verified": false,
"livemode": false
}
notice_deadlinedate | The last day you can give notice of non-renewal. It’s calculated from term_end and notice_period_days. |
upliftobject, nullable | Any automatic price increase at renewal. type is percent or cpi. max is the cap, if one is stated. |
confidenceobject | How confident we are in each extracted field, from 0 to 1. Fields below 0.85 are flagged for review in the dashboard. |
verifiedboolean | true once someone on your team or ours has confirmed the terms. |
List contracts
vendorstring | Only contracts for this vendor. |
term_end[gte], term_end[lt]date | Filter by end date. |
auto_renewsboolean | Only auto-renewing contracts, or only the ones that don’t auto-renew. |
verifiedboolean | Filter by verification state. |
Retrieve a contract
Returns the contract. Trimline doesn’t store document files. Each entry in documents has a source_url that opens the original message or file in your own mailbox or finance platform.
Correct a contract
If we’ve extracted a term incorrectly, correct it here. Corrected fields get a confidence of 1.0 and the contract is marked verified. Changing term_end or notice_period_days recalculates the related renewal’s deadline.
curl -X PATCH https://api.trimline.tech/v1/contracts/ctr_4Lw7Yh \
-H "Authorization: Bearer $TRIMLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "notice_period_days": 90 }'
Send a non-renewal notice
Creates a draft giving the vendor written notice that you won’t renew. Like every draft, it isn’t sent until it’s approved. Sending notice protects your leverage. It doesn’t stop you negotiating, and you can still sign a new deal afterwards.
reasonenum | switching, no_longer_needed, budget or renegotiating. This sets the tone of the notice. |
approveboolean, default false | Approve and send straight away. Requires the drafts:write scope. |
Returns 409 notice_deadline_passed if the deadline has already gone by. The notice can still be drafted with "force": true, but the vendor isn’t obliged to accept it for this term.
Something unclear or missing? Email developers@trimline.tech.