curl --request GET \
--url https://app.trelica.com/api/contracts/v1 \
--header 'Authorization: Bearer <token>'{
"next": "https://app.trelica.com/api/contracts/v1?after=eyJpZCI6IjY2MDk2ODJiZGIzY2Y2ZWM3MmI5NTgzOSJ9&limit=100",
"results": [
{
"id": "6609682bdb3cf6ec72b95839",
"externalId": "EXT1235",
"ref": "PO-12345-00",
"type": "PurchaseOrder",
"vendorName": "Github, Inc.",
"agreementDate": "2022-04-01T00:00:00Z",
"renewalDate": "2023-04-01T00:00:00Z",
"terminationNoticeDays": 90,
"isAutomaticRenewal": false,
"notes": "Annual Github renewal negotiated by Rachele in procurement",
"paymentMethod": "Invoice",
"businessOwnerEmail": "jane.doe@example.org",
"lineItems": [
{
"externalId": "1",
"description": "Github Enterprise annual",
"notes": "For source control",
"unitCount": 50,
"amount": 210,
"currency": "USD",
"baseAmount": 210,
"baseCurrency": "USD",
"startDate": "2022-04-06T00:00:00Z",
"endDate": "2023-04-06T00:00:00Z"
},
{
"externalId": "2",
"description": "Github Advanced Security",
"notes": "Secret scanning etc",
"unitCount": 10,
"amount": 250,
"currency": "USD",
"baseAmount": 250,
"baseCurrency": "USD",
"startDate": "2022-04-06T00:00:00Z",
"endDate": "2023-04-06T00:00:00Z"
}
],
"documents": [],
"createdBy": {
"userId": "110e3dd8077945c2a60d33770eb74b97",
"name": "Sam Procurement",
"email": "sam.procurement@example.org"
},
"createdDtm": "2024-03-31T13:42:03.608Z",
"lastModifiedBy": {
"userId": "110e3dd8077945c2a60d33770eb74b97",
"name": "Sam Procurement",
"email": "sam.procurement@example.org"
},
"lastModifiedDtm": "2024-03-31T13:42:03.608Z"
}
]
}List contracts
Returns a paginated list of the contracts in your organization. Use filter and
q to narrow the results, and follow the next link (also provided in the
link response header) to page through large result sets.
Required scope: Contracts.Read (Read-only access to contracts)
curl --request GET \
--url https://app.trelica.com/api/contracts/v1 \
--header 'Authorization: Bearer <token>'{
"next": "https://app.trelica.com/api/contracts/v1?after=eyJpZCI6IjY2MDk2ODJiZGIzY2Y2ZWM3MmI5NTgzOSJ9&limit=100",
"results": [
{
"id": "6609682bdb3cf6ec72b95839",
"externalId": "EXT1235",
"ref": "PO-12345-00",
"type": "PurchaseOrder",
"vendorName": "Github, Inc.",
"agreementDate": "2022-04-01T00:00:00Z",
"renewalDate": "2023-04-01T00:00:00Z",
"terminationNoticeDays": 90,
"isAutomaticRenewal": false,
"notes": "Annual Github renewal negotiated by Rachele in procurement",
"paymentMethod": "Invoice",
"businessOwnerEmail": "jane.doe@example.org",
"lineItems": [
{
"externalId": "1",
"description": "Github Enterprise annual",
"notes": "For source control",
"unitCount": 50,
"amount": 210,
"currency": "USD",
"baseAmount": 210,
"baseCurrency": "USD",
"startDate": "2022-04-06T00:00:00Z",
"endDate": "2023-04-06T00:00:00Z"
},
{
"externalId": "2",
"description": "Github Advanced Security",
"notes": "Secret scanning etc",
"unitCount": 10,
"amount": 250,
"currency": "USD",
"baseAmount": 250,
"baseCurrency": "USD",
"startDate": "2022-04-06T00:00:00Z",
"endDate": "2023-04-06T00:00:00Z"
}
],
"documents": [],
"createdBy": {
"userId": "110e3dd8077945c2a60d33770eb74b97",
"name": "Sam Procurement",
"email": "sam.procurement@example.org"
},
"createdDtm": "2024-03-31T13:42:03.608Z",
"lastModifiedBy": {
"userId": "110e3dd8077945c2a60d33770eb74b97",
"name": "Sam Procurement",
"email": "sam.procurement@example.org"
},
"lastModifiedDtm": "2024-03-31T13:42:03.608Z"
}
]
}Authorizations
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Query Parameters
A SCIM-style filter expression restricting the items returned. See the Filtering section of the introduction for the operators and syntax; the filterable fields are listed per resource.
Filterable fields
- string:
createdBy.email,createdBy.name,createdBy.userId,documents[description],documents[id],documents[linkUrl],externalId,id,lastModifiedBy.email,lastModifiedBy.name,lastModifiedBy.userId,lineItems[currency],lineItems[description],lineItems[externalId],lineItems[id],lineItems[notes],notes,paymentMethod,type,vendorName - number:
lineItems[amount],lineItems[unitCount],terminationNoticeDays - date:
agreementDate,createdDtm,lastModifiedDtm,lineItems[endDate],lineItems[startDate],renewalDate,startDate - boolean:
deleted,isAutomaticRenewal
Filter examples
vendorName eq "Agilebits Inc"— Contracts whose vendor is "Agilebits Inc"vendorName sw "Micros"— Contracts with vendors starting with "Micros", e.g. "Microsoft"lineItems[unitCount gt 100]— Contracts with a line item of more than 100 unitsisAutomaticRenewal eq true— Contracts that automatically renewagreementDate ge "2021-06-01"— Contracts with agreement dates on or after 1 Jun 2021
Free-text search across the resource's displayable fields.
Only return items modified at or after this ISO-8601 timestamp.
Only return items modified at or before this ISO-8601 timestamp.
Opaque pagination cursor supplied by SaaS Manager via the link response header and the next field.
Maximum number of items to return per page (default 100, maximum 1000).
1 <= x <= 1000Was this page helpful?