Inverters
This section covers the API endpoints for managing inverters. You can use these endpoints to retrieve, create, update, and delete inverter information in your application.
The inverter model
The inverter model contains information about solar inverters. Here are the properties included in the inverter model:
Properties
-
- Name
id
- Type
- integer
- Description
-
Unique identifier for the inverter.
-
- Name
is_producing
- Type
- boolean
- Description
-
Indicates whether the inverter is currently producing power.
-
- Name
last_updated
- Type
- dateTime
- Description
-
The date and time when the inverter data was last updated.
-
- Name
production_rate
- Type
- float
- Description
-
Current power production rate of the inverter.
-
- Name
total_lifetime_production
- Type
- float
- Description
-
Total lifetime energy production of the inverter.
-
- Name
brand
- Type
- string
- Description
-
Brand of the inverter.
-
- Name
model
- Type
- string
- Description
-
Model of the inverter.
-
- Name
site_name
- Type
- string
- Description
-
Name of the site where the inverter is installed.
-
- Name
installation_date
- Type
- timestamp
- Description
-
Date when the inverter was installed.
-
- Name
latitude
- Type
- float
- Description
-
Latitude coordinate of the inverter's location.
-
- Name
longitude
- Type
- float
- Description
-
Longitude coordinate of the inverter's location.
List all inverters
This endpoint allows you to retrieve a paginated list of all inverters that belong to your account. By default, a maximum of ten inverters are shown per page.
Optional parameters
-
- Name
limit
- Type
- integer
- Description
-
Limit the number of inverters returned (default: 10, max: 100).
-
- Name
page
- Type
- integer
- Description
-
Page number for pagination (default: 1).
Request
curl -G https://api.getcurrents.com/v1/inverters \
-H "Authorization: Bearer {token}" \
-d limit=10 \
-d page=1
Response
{
"data": [
{
"id": 1,
"is_producing": true,
"last_updated": "2024-03-17T10:30:00Z",
"production_rate": 4.5,
"total_lifetime_production": 10000.5,
"brand": "SolarEdge",
"model": "SE7600H-US",
"site_name": "Main House",
"installation_date": "2023-05-15T00:00:00Z",
"latitude": 37.7749,
"longitude": -122.4194
},
// ... more inverters
],
"links": {
"first": "https://api.getcurrents.com/v1/inverters?page=1",
"last": "https://api.getcurrents.com/v1/inverters?page=5",
"prev": null,
"next": "https://api.getcurrents.com/v1/inverters?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"path": "https://api.getcurrents.com/v1/inverters",
"per_page": 10,
"to": 10,
"total": 50
}
}
Create an inverter
This endpoint allows you to add a new inverter to your application. You need to provide the required inverter information in the request body.
Required attributes
-
- Name
brand
- Type
- string
- Description
-
Brand of the inverter.
-
- Name
model
- Type
- string
- Description
-
Model of the inverter.
Request
curl https://api.getcurrents.com/v1/inverters \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"brand": "SolarEdge",
"model": "SE7600H-US",
"site_name": "Main House",
"installation_date": "2024-03-17",
"latitude": 37.7749,
"longitude": -122.4194
}'
Response
{
"data": {
"id": 51,
"brand": "SolarEdge",
"model": "SE7600H-US",
"site_name": "Main House",
"installation_date": "2024-03-17T00:00:00Z",
"latitude": 37.7749,
"longitude": -122.4194,
"is_producing": false,
"last_updated": null,
"production_rate": null,
"total_lifetime_production": 0,
"created_at": "2024-03-17T11:00:00Z",
"updated_at": "2024-03-17T11:00:00Z"
}
}
Update an inverter
This endpoint allows you to update an existing inverter's information.
Optional attributes
-
- Name
is_producing
- Type
- boolean
- Description
-
Update the production status of the inverter.
-
- Name
production_rate
- Type
- float
- Description
-
Update the current production rate of the inverter.
-
- Name
-
total_lifetime_production
- Type
- float
- Description
-
Update the total lifetime production of the inverter.
Request
curl -X PUT https://api.getcurrents.com/v1/inverters/51 \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"is_producing": true,
"production_rate": 5.2,
"total_lifetime_production": 100.5
}'
Response
{
"data": {
"id": 51,
"brand": "SolarEdge",
"model": "SE7600H-US",
"site_name": "Main House",
"installation_date": "2024-03-17T00:00:00Z",
"latitude": 37.7749,
"longitude": -122.4194,
"is_producing": true,
"last_updated": "2024-03-17T11:30:00Z",
"production_rate": 5.2,
"total_lifetime_production": 100.5,
"created_at": "2024-03-17T11:00:00Z",
"updated_at": "2024-03-17T11:30:00Z"
}
}
Delete an inverter
This endpoint allows you to delete an inverter from your application. Note: This action cannot be undone.
Request
curl -X DELETE https://api.getcurrents.com/v1/inverters/51 \
-H "Authorization: Bearer {token}"
Response
{
"message": "Inverter deleted successfully"
}