Skip to main content
Agent endpoints are available to authenticated users with the appropriate permissions. Read operations are available to Staff; agents can access their own profile data.

List agents

GET /api/agents/list?action=list Returns all active agents available for job assignment, optionally filtered by branch. Required permission: api.agents.list.manage
action
string
required
Must be list.
branch_id
integer
Filter agents to a specific branch.
Search by agent name or email.
curl -X GET "https://propops.yourcompany.com/api/agents/list?action=list" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": [
    {
      "id": 10,
      "name": "Sarah Johnson",
      "email": "sarah.johnson@acme.com",
      "branch_id": 2,
      "branch_name": "London South",
      "is_active": true
    }
  ],
  "count": 8
}

Agent branches

List branches for agents

GET /api/agents/branches Returns all branches that have at least one active agent assigned, along with the agent count per branch. Required permission: api.admin.branches
curl -X GET "https://propops.yourcompany.com/api/agents/branches" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": [
    {
      "branch_id": 2,
      "branch_name": "London South",
      "agent_count": 3,
      "open_jobs": 18
    }
  ]
}

Get branch jobs

GET /api/agents/branch-jobs Returns jobs assigned to agents within a specific branch, with pagination, filtering, statistics, and per-agent breakdown. Required permission: api.agents.branch_jobs.manage
branch_uuid
string
required
UUID of the branch.
status_id
integer
Filter by job status ID.
priority_id
integer
Filter by job priority ID.
job_type_id
integer
Filter by job type ID.
agent_id
integer
Filter by a specific agent within the branch.
search
string
Search by job title, reference, or description.
date_from
string
Filter jobs created on or after this date (YYYY-MM-DD).
date_to
string
Filter jobs created on or before this date (YYYY-MM-DD).
limit
integer
default:"50"
Maximum records to return (max 1000).
offset
integer
default:"0"
Number of records to skip for pagination.
sort_by
string
default:"created_on"
Sort field: created_on, priority, status, title, or job_ref.
sort_order
string
default:"desc"
Sort direction: asc or desc.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-jobs?branch_uuid=550e8400-e29b-41d4-a716-446655440002&status_id=1" \
  -H "Authorization: Bearer <token>"

Get branch profile popover

GET /api/agents/branch-profile-popover Returns a summary card for a specific branch — used for inline popovers in the UI. Required permission: api.agents.list.manage
branch_id
integer
required
Branch ID.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-profile-popover?branch_id=2" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "branch_id": 2,
    "branch_name": "London South",
    "agent_count": 3,
    "open_jobs": 18,
    "completed_jobs_30d": 47,
    "sla_compliance_percent": 94.2
  }
}

SLA profiles

Get branch SLA configuration

GET /api/agents/branch-sla Returns the SLA deadline configuration for a specific branch, including per-priority response-time targets. Required permission: api.agents.list.manage
branch_id
integer
required
Branch ID.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-sla?branch_id=2" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "branch_id": 2,
    "branch_name": "London South",
    "sla_rules": [
      { "priority": "Emergency", "response_hours": 4, "resolution_hours": 24 },
      { "priority": "High",      "response_hours": 8, "resolution_hours": 48 },
      { "priority": "Medium",    "response_hours": 24, "resolution_hours": 120 },
      { "priority": "Low",       "response_hours": 48, "resolution_hours": 240 }
    ]
  }
}

Get branch SLA response times

GET /api/agents/branch-sla-response-times Returns actual average response and resolution times for a branch, grouped by priority. Useful for comparing performance against SLA targets. Required permission: api.agents.list.manage
branch_id
integer
required
Branch ID.
period
string
default:"30days"
Time window: 7days, 30days, 90days.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-sla-response-times?branch_id=2&period=30days" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "branch_id": 2,
    "period": "30days",
    "averages": [
      { "priority": "Emergency", "avg_response_hours": 3.2, "avg_resolution_hours": 21.5, "sla_met_percent": 96.0 },
      { "priority": "High",      "avg_response_hours": 7.1, "avg_resolution_hours": 44.0, "sla_met_percent": 91.4 }
    ]
  }
}

Branch sharing

Get branch sharing rules

GET /api/agents/branch-sharing Returns the data-sharing rules between branches — which branches can see each other’s jobs and contractor pools. Required permission: api.agents.list.manage
branch_id
integer
required
Branch ID.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-sharing?branch_id=2" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "branch_id": 2,
    "shared_with": [
      { "branch_id": 3, "branch_name": "London East", "share_jobs": true, "share_contractors": true }
    ]
  }
}

GET /api/agents/branch-logo Returns the logo image URL for a branch. Required permission: api.agents.list.manage
branch_id
integer
required
Branch ID.
curl -X GET "https://propops.yourcompany.com/api/agents/branch-logo?branch_id=2" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "logo_url": "https://propops.yourcompany.com/uploads/branches/2/logo.png"
  }
}