Skip to main content

Contract Usage (GET)

https://core.rock7.com/API3/Contract/{deviceSerial}/Usage

Returns the usage information for a particular device over a period of time.

ParameterTypeDescriptionExample/Possible Values
PATH PARAMS
deviceSerialint32required
The serial number of the device
50075
QUERY PARAMS
fromstringDatetime for start of usage period2017-01-01T00:00:00Z
tostringDatetime for end of usage period2018-01-01T00:00:00Z

Example with Parameters

curl --request GET \
--url 'https://core.rock7.com/API3/Contract/50075/Usage?from=2017-01-01T00:00:00Z&to=2018-01-01T00:00:00Z&username=myUsername&password=myPassword' \
--header 'accept: application/json'

Response

{
"serial": "300605",
"from": "2023-01-01T00:00:00.000Z",
"to": "2024-01-01T00:00:00.000Z",
"credit": 25448
}