GET
/
contractors
/
{id}
/
metrics
curl --request GET \
  --url https://api.shovels.ai/v2/contractors/{id}/metrics \
  --header 'X-API-Key: <api-key>'
{
  "items": [
    {
      "property_type": "residential",
      "date": "2022-01-01",
      "tag": "solar",
      "permit_count": 10,
      "avg_job_value": 1000000,
      "total_job_value": 10000000,
      "avg_construction_duration": 100,
      "avg_inspection_pass_rate": 95
    },
    {
      "property_type": "residential",
      "date": "2022-02-01",
      "tag": "solar",
      "permit_count": 4,
      "avg_job_value": 1000000,
      "total_job_value": 10000000,
      "avg_construction_duration": 30,
      "avg_inspection_pass_rate": 45
    }
  ],
  "size": 2,
  "next_cursor": "eyJkYXRlIjoi",
  "pagination_type": "cursor"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

id
string
required

Filter by the specified contractor ID.

Query Parameters

metric_from
string
required

Start date for metrics (inclusive)

metric_to
string
required

End date for metrics (inclusive)

property_type
string
required

Filter by property type

tag
string
required

Filter by tag

cursor
string | null

Cursor for pagination

page
integer | null

Page number for offset-based pagination (only used if cursor is not provided)

Required range: x >= 1
size
integer
default:50

Number of items per page

Required range: 1 <= x <= 100

Response

200
application/json

Contractor monthly metrics

Schema for paginated contractors metrics response.