Solar Products

Share data about solar products.

Create a New Product

HTTP POST http://api.opensolar.org/V1/product

Example JSON passed in via POST

{
    "product":
    {
	"name":"200W PV Module",	
	"summary":"200W PV Module",	
	"model":"CR2303",     
	"provider":"1234",	
	"type":"pv",
	"image":"http:\/\/www.opensolar.org\/images\/CR2303.jpg",
	"webpage":"http:\/\/www.opensolar.org\/images\/CR2303.jpg",
	"description":"Thin film photovoltaic panels."
    }
}

Response

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.

Example

Location: http://api.opensolar.org/V1/product/98798324

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.


Update an Existing Provider

HTTP POST http://api.opensolar.org/V1/product/98798324

Where 98798324 is the ID of the provider that you are trying to modify.

The method will overwrite any root element that you pass in.

Example

Posting the following piece of JSON to http://api.opensolar.org/V1/product/98798324 would overwrite these five fields for product 98798324.

{
    "product":
    {
	"name":"200W PV Module",	
	"manufacturer":"http:\/\/api.opensolar.org\/V1\/provider\/1234",	
	"model":"CR2303",     
	"thumbnail":"http:\/\/www.opensolar.org\/images\/CR2303.jpg",
	"description":"Thin film photovoltaic panels."
    }
}