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.
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
certifications : String
DEI : String
isUnion : Boolean
isInNetwork : Boolean
tiers : String !
}
enum SERVICES {
ELECTRICAL = ' Electrical ' ,
HVAC = ' HVAC ' ,
PLUMBING = ' Plumbing ' ,
EFFICIENCY = ' Efficiency ' ,
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 ' ,
WATER_HEATERS = ' Water Heaters ' ,
WIND = ' Wind ' ,
CARPENTRY = ' Carpentry ' ,
ROOFING = ' Roofing ' ,
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 {
businesses ( zipCode : String ! , services : [ String ! ] ! , optionalServices : [ String ! ] ) : [ Business ! ] !
businessesByCoordinates ( latitude : Float ! , longitude : Float ! , distance : Int ! , services : [ String ! ] ! , optionalServices : [ String ! ] ) : [ Business ! ] !
services : [ String ! ] !
}
extend type Mutation {
reviewContractor ( id : String ! , rating : Int ! , review : String ! , services : [ String ! ] , photoUrls : [ String ! ] ) : Boolean
flagContractor ( id : String ! , notes : String ! ) : Boolean
flagResultSet ( query : String ! , notes : String ! ) : Boolean
}