Upload Data to Wattvision

Your API Settings Page can be found here.

HTTP POST

The parameters are passed as part of the body of the POST request. We expect a JSON object with each of the following properties, some of which are optional. Note that JSON strings are enclosed by double quotes and numbers are not.

Here is some sample code.

You'll need to upload one or both of 'watts' or 'watthours'.
*for full tracking, you'll need to upload both, we don't auto-convert between types

Update Strategy

If you want to have your sensor showing as "sensor active" you must consistently upload faster than once every 5 minutes.

Response Codes

You will receive a 400 Bad Request if the request is not in the correct format, 200 on successful POST.

Body Params
string
required

(Required, JSON string) The sensor id with which the uploaded data will be associated. Must be authorized at the API Settings Page.

string
required

(Required, JSON string) the api id that authorizes this data upload. Found on API Settings Page.

string
required

(Required, JSON string) the api key that authorizes this data upload. Found on API Settings Page.

string
required

(Optional, JSON string) the UTC ISO format date time (YYYY-MM-DDTHH:MM:SS) associated with the uploaded data, if not provided server time is used

string

(JSON number) a float value of a watts measurement

string

(JSON number) a float value of the watthours consumed since the sensor started recording data (for a house that does not put energy back to the grid this number is a monotonically increasing function of time, but it doesn't have to be.)

Responses

Language
Request
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json