Exports the inspection to a Shapefile (zip file with associated files)

Additional example to write contents to a local file:

import requests

url = "https://api.raptormaps.com/solar_inspections/inspection_id/exports/kml"

# Filepath with .zip extension that specifies where to save the shapefile zip
save_path = "/path/to/save/inspection_shapefile.zip"

headers = {"Accept": "application/json"}

r = requests.request("GET", url, headers=headers)

with open(save_path, 'wb') as f:
    for chunk in r.iter_content(chunk_size=512):
        if chunk:
            f.write(chunk)

print("Complete. Check file at: %s" % save_path)
Language
Authentication
Header
URL
Click Try It! to start a request and see the response here!