Greenwork API


Endpoints

https://crm.joingreenwork.com/api/residential
https://crm.joingreenwork.com/api/commercial
Both endpoints have the same schema described below. Choose the endpoint appropriate for your usecase, whether residential or commercial.
While our API is powered by GraphQL, that doesn’t strictly mean that you need to use GraphQL on the receiving end. The cURL request below works, of course, despite lack of GraphQL knowledge. Basically, in the end you can expect a JSON response and whether or not you model the data on your end with GraphQL is up to you.


Example Code

curl -g \
-X POST \
-H "Content-Type: application/json" \
-H "api-key: YOUR-API-KEY" \
-d '{"query": "query Businesses($zipCode: String!, $services: [String!]!) { businesses(zipCode: $zipCode, services: $services) { id businessName greenworkScore } services }", "variables": {"zipCode": "94010", "services": []}}' \
https://crm.joingreenwork.com/api/residential

Schema

type Business {
id: String!
greenworkScore: Int
avgRating: Float
numRatings: Int
businessName: String!
address: String!
city: String!
state: String!
zipCode: String!
phoneNumber: String
email: String
website: String
latitude: Float
longitude: Float
services: String # list of services (see enum below) separated by |
certifications: String # list of certs separated by |
DEI: String # list of DEI classifications separated by |
isUnion: Boolean
isInNetwork: Boolean
tiers: String!
}
enum SERVICES {
# General service types
ELECTRICAL = 'Electrical',
HVAC = 'HVAC',
PLUMBING = 'Plumbing',
EFFICIENCY = 'Efficiency',
# More specific service types
AIR_SOURCE_HEAT_PUMP = 'Air Source Heat Pump',
HPWH = 'Heat Pump Water Heater',
EV_CHARGERS = 'EV Chargers',
PANEL_UPGRADE = 'Panel Upgrade',
ENERGY_AUDIT = 'Energy Audit',
INSULATION = 'Insulation',
SOLAR = 'Solar',
STORAGE = 'Storage',
GROUND_SOURCE_HEAT_PUMP = 'Ground Source Heat Pump',
INDUCTION_STOVES = 'Induction Stoves',
# More specific service types, less relevant
WATER_HEATERS = 'Water Heaters',
WIND = 'Wind',
CARPENTRY = 'Carpentry',
ROOFING = 'Roofing',
# Service size types
RESIDENTIAL = 'Residential',
MULTIFAMILY_RESIDENTIAL = 'Multifamily',
COMMERCIAL = 'Commercial & Industrial',
EPC = 'EPC',
}
enum DEI {
SMBE = 'State Minority Business Enterprise',
SWBE = 'State Women Business Enterprise',
DBE = 'Disadvantaged Business Enterprise',
WOMAN_OWNED = 'Woman-owned business',
MINORITY_OWNED = 'Minority-owned business',
}
type Query {
# Query business within a 25mi radius of provided zipcode.
# Services can be an empty array but must be present.
# Multiple services are AND'd together in the query.
# This returns the top 20 results.
businesses(zipCode: String!, services: [String!]!, optionalServices: [String!]): [Business!]!
# Query business within specified radius of provided lat/lng coordinates.
# Services can be an empty array but must be present.
# Multiple services are AND'd together in the query.
# This returns the top 20 results.
businessesByCoordinates(latitude: Float!, longitude: Float!, distance: Int!, services: [String!]!, optionalServices: [String!]): [Business!]!
# Provides list of current services you can query on.
services: [String!]!
}
# BETA: These endpoints are in development!
extend type Mutation {
# Send review/rating for a contractor in the system.
# Ratings are out of 5.
reviewContractor(id: String!, rating: Int!, review: String!, services: [String!], photoUrls: [String!]): Boolean
# Send feedback to Greenwork about a Contractor.
flagContractor(id: String!, notes: String!): Boolean
# Send feedback to Greenwork about a result set.
flagResultSet(query: String!, notes: String!): Boolean
}

Current State Quality

⭐ = Basic
⭐⭐ = Good (N.B. licenses at municipal level, or state w/o canonical sources)
⭐⭐⭐ = Good
⭐⭐⭐⭐ = Great
⭐⭐⭐⭐⭐ = Excellent

AK ⭐⭐
AL ⭐⭐⭐
AR ⭐⭐⭐
AZ ⭐⭐⭐
CA ⭐⭐⭐⭐
CO ⭐⭐
CT ⭐⭐⭐
DC ⭐⭐⭐
DE ⭐⭐⭐
FL ⭐⭐⭐
GA ⭐⭐
HI ⭐⭐⭐
IA ⭐⭐⭐
ID ⭐⭐⭐
IL ⭐⭐
IN ⭐⭐
KS ⭐⭐
KY ⭐⭐⭐
LA ⭐⭐⭐
MA ⭐⭐
MD ⭐⭐
ME ⭐⭐
MI ⭐⭐⭐
MN ⭐⭐
MO ⭐⭐
MS ⭐⭐⭐
MT ⭐⭐
NC ⭐⭐⭐
ND ⭐⭐
NE ⭐⭐
NH ⭐⭐
NJ ⭐⭐
NM ⭐⭐
NV ⭐⭐⭐
NY ⭐⭐⭐
OH ⭐⭐⭐
OK ⭐⭐
OR ⭐⭐⭐
PA ⭐⭐
RI ⭐⭐⭐
SC ⭐⭐⭐
SD ⭐⭐
TN ⭐⭐⭐
TX ⭐⭐⭐⭐
UT ⭐⭐⭐
VA ⭐⭐⭐
VT ⭐⭐
WA ⭐⭐⭐
WI ⭐⭐⭐
WV ⭐⭐⭐
WY ⭐⭐

GU ⭐⭐⭐
PR ⭐⭐
VI ⭐⭐⭐

Service

County map of known Air Source Heat Pump contractors per capita (density of contractors compared to county population)



Made with 💚 in San Francisco, CA
Copyright © 2024 Greenwork. All rights reserved.