Home Energy Scoring‎ > ‎API Definitions‎ > ‎API Methods‎ > ‎2017.2‎ > ‎

generate_label

Generates a Home Energy Score label document in both PDF and PNG formats. Requires that the upgrade package for the building has been generated by a call to calculate_package_building.

Parameters

NameDescriptionTypeRequiredOptions
 session_token Get from the get_session_token methodstringYes 
user_keyAPI key for accessstringYes
 building_id ID of building for which to generate a label. intYes 
 force_regenerate Pass 1 to force the label to be regenerated. This is mostly used for HES internal development, but it can be useful if an update has resulted in a change in how labels are rendered and you wish to re-render a label to take advantage of that change. int No 0 or 1 (treated as 0 if not passed)



Response

ElementDescription
resultFAIL or OK
 message Error or success message depending on result
 file On success, a series of file elements will be returned. The first contains the URL of the PDF file. The others contain PNG images of each page of the label. 





Roles

Method access is limited by the roles assigned the user to whom the session token was assigned

RoleAccess
AssessorMust be the assessor who created the building
PartnerNo access
 Admin Allowed to generate label for any building