GET /contracts migration guide (v1.0 → v1.1)
This guide describes what changes between X-API-Version: 1.0 and X-API-Version: 1.1 of the GET /contracts and GET /contracts/{idContract} endpoints, so you can migrate your integration safely.
Selecting the version
Send the version via the request header:
X-API-Version: 1.1
If the header is omitted, the default is:
1.0for API keys created before Aug 1st 20261.1for API keys created on or after Aug 1st 2026
We recommend always sending the header explicitly so your behavior doesn't depend on when the key was created.
What's new in v1.1
v1.1 adds capabilities that don't exist in v1.0:
| Query parameter | Description |
|---|---|
q | Full-text search across contracts |
sort | Server-side sort order |
size | Page size (default 1000, max 1000) |
cursor | Cursor for pagination (use nextCursor from the previous response) |
aggs | Aggregations (e.g. group-by, metrics, date histograms). JSON-encoded. |
filters | Advanced filter array. JSON-encoded. |
Filtering by passing a field name as a query parameter (e.g. ?status=active&idApp=123) still works in v1.1, in addition to the new filters parameter.
New selectable fields in v1.1:
creationTime— when the contract was created (ISO timestamp)source— how the contract was created (api,ui, …)
Response envelope
v1.0
{ "contracts": [ ... ] }v1.1
{
"contracts": [ ... ],
"count": 3,
"total": 355,
"nextCursor": "WyIxMDE1MTkiXQ==",
"aggregations": [ ... ]
}count— items in this pagetotal— total matching the querynextCursor— pass back ascursorfor the next page;nullwhen exhaustedaggregations— present only whenaggswas requested
Pagination & default sort
| v1.0 | v1.1 | |
|---|---|---|
| Pagination | None — the entire matching list is returned in one response | Cursor-based via cursor / nextCursor, controlled by size |
| Default sort | id ascending | Not guaranteed — pass an explicit sort if you need a deterministic order |
Field value differences (breaking changes)
The same contract returns different value types under each version for several field types:
| Field type | Example fields | v1.0 value | v1.1 value |
|---|---|---|---|
| Number | licenses, cancellationNoticePeriodDays, ccf_renewalTermIncrease | string — "30" | number — 30 |
| Currency | amount, yearlyCost, ccf_arr, ccf_contractPrice | string — "365000" | object — { "value": 365000, "currency": "USD", "convertedValue": 365000 } |
| Date | startDate, endDate, cancellationDeadline | mixed: ISO timestamp for newer entries, date-only ("2021-06-30") for some legacy entries | always ISO timestamp — "2021-06-30T00:00:00.000Z" |
| User | owner, c_contractBudgetOwner, createdBy | string id — "25" | numeric id — 25 |
| Contract reference (multi) | previousContracts, nextContracts | array of strings — ["51791"] | array of numbers — [51791] |
Field types that are unchanged: singleLine (text), multiLine (text), dropdown, email, cardNumber, fileUpload (documents), and the id field.
Removed: the calculated currency field
currency fieldIn v1.0 you could request currency in fields to get the contract's currency code as a string (e.g. "USD").
In v1.1 that field is no longer selectable — requesting it returns 400 "Invalid fields: currency". The currency code now lives inside every currency-typed field's object (amount.currency, yearlyCost.currency, …).
Other notes
- Whether an unset custom field appears as
"<key>": nullor is omitted from the response can differ between versions. Treat missing andnullas equivalent. - The order of JSON keys in the response is not stable across versions.
Example: same contract under each version
Single contract endpoint, requested with no fields parameter:
v1.0
{
"contract": {
"id": 100,
"name": "Adobe 2026-2027",
"idApp": 6960,
"amount": "2699520",
"currency": "USD",
"owner": "1234"
}
}v1.1
{
"contract": {
"id": 100,
"name": "Adobe 2024-2025",
"idApp": 6960,
"amount": { "value": 2699520, "currency": "USD", "convertedValue": 2699520 },
"owner": 1234
}
}Migration checklist
- Set the header explicitly:
X-API-Version: 1.1. - Currency fields — replace
contract.amountwithcontract.amount.value. Read the currency code fromcontract.amount.currency. - Remove
currencyfromfields— read it from any currency field's.currencyproperty instead. - Number, user, and contract-reference fields — treat as numbers.
- Paginate — read
nextCursorand loop until it isnull. Don't assume one response contains the whole list. - Sort — pass an explicit
sortif you depend on a deterministic order.
Updated about 2 hours ago