GET /color

Parameters

nametypedata typedescription
zipcoderequiredintzipcode of user's location
api_keyrequiredstringuser's purpleair API key

Responses

http codecontent-typeresponse
200application/jsonJSON object
400application/json{error: "Invalid zipcode"}
400application/json{"error": "No sensors found within the range of "x" miles."}
400application/json{"error": "No read key or zipcode provided."}

Example response

   {
       "color": "0xFF00FF",
       "zipcode": 11101
   }