Retrieving contracts
Use /api/sam/v2/contracts.json API to retrieve
contracts.
Example HTTP conversation
- GET /api/sam/v2/contracts.json

{ "total":1,"rows": [ { "contract_id":"CO3","name":"C1","type":1,"threshold":90,"threshold_type":1,"metric":{"id":9,"code_name":"INTERNAL_INSTALL"}, "computer_group":{"id":0,"name":"All Computers"},"purchase_orders":[{"purchase_number":"PO1","quantity":200,"expense":1000.0,"cost_center":"center1","project":"project1","entitlement_start":"2026-02-01","entitlement_end":"9999-12-31"}],"software_products":[{"name":"Notepad++","publisher_name":"Don Ho"}]} ] }- GET /api/sam/v2/contracts.json?columns[]=name&columns[]=contract_custom_field_1
-
{ "total":1,"rows": [ { "name":"Contract1","contract_custom_field_1":"Value of the custom field" } ] }
Note: Not all columns are displayed by default. To see the lists
of available columns, check the below topics: