curl --request GET \
--url https://app.trelica.com/api/contracts/v1/{id} \
--header 'Authorization: Bearer <token>'{
"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"
}Get a contract
Fetches a single contract by its SaaS Manager ID or by your own external ID.
Required scope: Contracts.Read (Read-only access to contracts)
curl --request GET \
--url https://app.trelica.com/api/contracts/v1/{id} \
--header 'Authorization: Bearer <token>'{
"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>.
Path Parameters
The contract's SaaS Manager ID, or the external ID you assigned when importing it.
Response
OK
A contract
The contract's SaaS Manager ID. Supply to update an existing contract.
Your own external ID for the contract. Supply to match an existing contract on update.
A reference for the contract, e.g. a PO number
The contract type
OrderForm, MSA, GenericContract, PurchaseOrder, Subscription The vendor name
(ISO format) The contract's start date
(ISO format) The agreement date. Defaults to now on creation.
(ISO format) The renewal date
Whether the contract is a rolling contract
The number of days' notice required to terminate the contract
Whether the contract renews automatically
Notes about the contract
The payment method
CreditCard, Invoice The email address of the contract's business owner
The contract's line items
Show child attributes
Show child attributes
Documents linked to the contract
Show child attributes
Show child attributes
The user that created the contract record
Show child attributes
Show child attributes
The timestamp for when the contract record was created
The user that last modified the contract record
Show child attributes
Show child attributes
The timestamp for when the contract record was last modified
Was this page helpful?