Jobs API

Schedule, assign, and track jobs through the Jobs API.

List Jobs

Retrieve all jobs for your organization.

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

Response:

{
  "data": [
    {
      "id": "job_ccc333",
      "customerId": "cust_abc123",
      "propertyId": "prop_def456",
      "status": "scheduled",
      "scheduledDate": "2025-06-15",
      "assignedTo": ["user_001", "user_002"],
      "services": ["Weekly Mowing", "Edge Trimming"],
      "notes": "Gate code: 1234",
      "createdAt": "2025-06-10T08:00:00Z"
    }
  ]
}

Query Parameters

ParameterTypeDescription
statusstringFilter: scheduled, in_progress, completed, canceled, on_hold
customerIdstringFilter by customer ID
assignedTostringFilter by assigned team member ID
fromstringStart date (ISO 8601)
tostringEnd date (ISO 8601)
pagenumberPage number
limitnumberResults per page

Example: Get today’s jobs:

curl "https://api.lawnledgercrm.com/api/jobs?from=2025-06-15&to=2025-06-15&status=scheduled" \
  -b cookies.txt

Get Job

Retrieve a single job by ID, including checklist items and activity history.

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

Create Job

Create a new job.

curl -X POST https://api.lawnledgercrm.com/api/jobs \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "customerId": "cust_abc123",
    "propertyId": "prop_def456",
    "scheduledDate": "2025-06-20",
    "services": ["Weekly Mowing", "Fertilizer Application"],
    "assignedTo": ["user_001"],
    "notes": "Apply fertilizer to front and back lawns",
    "checklist": [
      "Mow front yard",
      "Mow back yard",
      "Apply fertilizer",
      "Clean up clippings"
    ]
  }'

Required Fields

FieldTypeDescription
customerIdstringCustomer ID
scheduledDatestringDate to perform the job

Optional Fields

FieldTypeDescription
propertyIdstringService property
servicesarrayList of service names
assignedToarrayTeam member IDs
notesstringInstructions for the crew
checklistarrayChecklist items (strings)

Update Job

Update an existing job.

curl -X PUT https://api.lawnledgercrm.com/api/jobs/job_ccc333 \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "status": "completed",
    "notes": "Completed all services. Customer not home."
  }'

Delete Job

Delete a job.

curl -X DELETE https://api.lawnledgercrm.com/api/jobs/job_ccc333 \
  -b cookies.txt

Completed jobs are typically kept for historical records. Consider setting the status to canceled instead of deleting if you need to preserve the record.

Calendar View

The calendar endpoint returns jobs organized by date for calendar display:

curl "https://api.lawnledgercrm.com/api/calendar?from=2025-06-01&to=2025-06-30" \
  -b cookies.txt