Share rating data about solar providers, products, comments, questions and answers.
HTTP POST http://api.opensolar.org/V1/rating
The content item that is being rated can be identified by URI:
{
"rating":
{
"item":"http:\/\/api.opensolar.org\/V1\/product\/1234",
"value":3.5
}
}
HTTP POST http://api.opensolar.org/V1/rating/239874124
{
"rating":
{
"value":3.5
}
}
If the request is successful, the API will return the HTTP 201 (Created) status code containing a Location header pointing to the URI of this newly created resource.
Location: http://api.opensolar.org/V1/user/william/rating/124214
If there has been an error, the service will return the appropriate HTTP status code - most likely a 400 (Bad Request), 401 (Unauthorized) or 403 (Forbidden) error. See the Developer Authorization page for details on how to submit authenticated API requests.
HTTP POST http://api.opensolar.org/V1/provider/1234
Where 1234 is the ID of the provider that you are trying to modify.
The method will overwrite any root element that you pass in.
Posting the following piece of JSON to http://api.opensolar.org/V1/provider/1234 would overwrite these five fields for provider 1234.
{
"provider":
{
"website":"http:\/\/www.opensolar.org",
"logo":"http:\/\/www.opensolar.org\/images\/logo.png",
"about":"OpenSolar connects solar businesses, people and products together.",
"type":"private",
"size":"small"
}
}