Contracts API

Create, manage, and track contracts through the Contracts API.

List Contracts

Retrieve all contracts for your organization.

curl https://api.lawnledgercrm.com/api/contracts \
  -b cookies.txt

Response:

{
  "data": [
    {
      "id": "con_bbb222",
      "title": "2025 Annual Lawn Care Agreement",
      "customerId": "cust_abc123",
      "status": "signed",
      "startDate": "2025-04-01",
      "endDate": "2025-10-31",
      "totalValue": 3600.00,
      "signedAt": "2025-03-20T14:22:00Z",
      "createdAt": "2025-03-15T09:00:00Z"
    }
  ]
}

Query Parameters

ParameterTypeDescription
statusstringFilter: draft, sent, signed, active, expired, canceled
customerIdstringFilter by customer ID
pagenumberPage number
limitnumberResults per page

Get Contract

Retrieve a single contract by ID, including its full content and activity log.

curl https://api.lawnledgercrm.com/api/contracts/con_bbb222 \
  -b cookies.txt

Create Contract

Create a new contract.

curl -X POST https://api.lawnledgercrm.com/api/contracts \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "title": "2025 Snow Removal Contract",
    "customerId": "cust_abc123",
    "propertyId": "prop_def456",
    "templateId": "tmpl_snow2025",
    "startDate": "2025-11-01",
    "endDate": "2026-03-31",
    "services": [
      {
        "description": "Snow plowing per event",
        "unitPrice": 150.00
      },
      {
        "description": "Sidewalk shoveling per event",
        "unitPrice": 50.00
      }
    ],
    "terms": "Service triggered when snowfall exceeds 2 inches."
  }'

Required Fields

FieldTypeDescription
titlestringContract title
customerIdstringCustomer ID

Optional Fields

FieldTypeDescription
propertyIdstringAssociated property
templateIdstringContract template to use
startDatestringContract start date
endDatestringContract end date
servicesarrayServices included in the contract
termsstringTerms and conditions

Update Contract

Update a draft contract.

curl -X PUT https://api.lawnledgercrm.com/api/contracts/con_bbb222 \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "endDate": "2026-04-30",
    "terms": "Extended through April per customer request."
  }'
⚠️

Signed contracts cannot be edited. To make changes after signing, create a new contract or an amendment.

Contract Analytics

Retrieve contract analytics for your organization.

curl https://api.lawnledgercrm.com/api/contract-analytics \
  -b cookies.txt

Returns metrics including total contracts, signing rate, average time to signature, and revenue from active contracts.

Contract Activity

View the activity log for a specific contract.

curl https://api.lawnledgercrm.com/api/contract-activity/con_bbb222 \
  -b cookies.txt

Returns a chronological list of events: created, sent, viewed, signed, etc.