@datafire/edrv v3.0.0
@datafire/edrv
Client library for eDRV API
Installation and Usage
npm install --save @datafire/edrv
let edrv = require('@datafire/edrv').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Description
edrv.io API Documentation
Actions
getChargeStations
List all Chargestations
edrv.getChargeStations({}, context)
Input
- input
object
- organization
string
: Filter by Org. Id - location
string
: Filter by Location Id - online
boolean
: Filter by Online Status - active
boolean
: Chargestations that have been activated/deactivated by the admin - public
boolean
: Chargestations that are public - paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_location
boolean
: Populate location - include_evses
boolean
: Populate evses - include_organization
boolean
: Populate organization
- organization
Output
Output schema unknown
postChargeStations
Create a new charge station
edrv.postChargeStations({
"body": {}
}, context)
Input
- input
object
- body required schema1
Output
- output
object
- chargestation
object
- message
string
- ok
boolean
- chargestation
deleteChargeStation
Use to delete a charge station
edrv.deleteChargeStation({
"id": ""
}, context)
Input
- input
object
- id required
string
: The charge station id that needs to be deleted
- id required
Output
Output schema unknown
getChargeStation
Get a single charge station's data
edrv.getChargeStation({
"id": ""
}, context)
Input
- input
object
- id required
string
: The charge station id that needs to be fetched - include_location
boolean
: Populate location - include_evses
boolean
: Populate evses - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
patchChargeStation
Update a charge station's data
edrv.patchChargeStation({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of charge station that needs to be updated - body required schema1
- id required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getChargeStationConnectors
List connectors for a chargestation
edrv.getChargeStationConnectors({
"id": ""
}, context)
Input
- input
object
- id required
string
: chargeStation id - include_evse
boolean
: Populate evse - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
getCommands
Get Commands data
edrv.getCommands({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_chargestation
boolean
: Populate chargestation - include_driver
boolean
: Populate driver - include_transaction
boolean
: Populate transaction - include_organization
boolean
: Populate organization
- paginate_limit
Output
Output schema unknown
cancelreservation
Use to request a delete an existing reservation. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.cancelreservation({
"body": {}
}, context)
Input
- input
object
- body required
object
- reservation
string
- reservation
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
deletechargingschedule
Delete a smart charging schedule
edrv.deletechargingschedule({
"body": {}
}, context)
Input
- input
object
- body required
object
- id
string
- id
- body required
Output
- output
object
- command
object
- message
string
- ok
boolean
- command
setchargingschedule
Set one of charging power or current of a specific chargestation connector
edrv.setchargingschedule({
"body": null
}, context)
Input
- input
object
- body required
object
- connector
string
- schedule
array
- items
object
- endDate
string
- limit
number
- startDate
string
- unit
string
- endDate
- items
- connector
- body required
Output
- output
object
- command
object
- message
string
- ok
boolean
- command
remotestart
Use to request a remote start command. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.remotestart({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- connector
string
- driver
string
- token
string
- chargestation
- body required
Output
- output
object
- command
object
- message
string
- ok
boolean
- command
remotestop
Use to request a remote stop command. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.remotestop({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- driver
string
- transaction
string
- chargestation
- body required
Output
Output schema unknown
reserve
Use to request a reserve command. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.reserve({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- connector
string
- driver
string
- endDate
string
- token
string
- chargestation
- body required
Output
- output
object
- command
object
- message
string
- ok
boolean
- command
reset
Use to request a reset command. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.reset({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- type
string
- chargestation
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
unlockconnector
Use to request an unlock command for a connector. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.unlockconnector({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- connector
string
- chargestation
- body required
Output
- output
object
- command
object
- message
string
- ok
boolean
- command
getVariables
Get a charge station's config variables
edrv.getVariables({
"id": ""
}, context)
Input
- input
object
- id required
string
: The chargestation id
- id required
Output
Output schema unknown
patchChargeStationVariable
Update config variables for a chargestation
edrv.patchChargeStationVariable({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of charge station - body required
object
- value
string
- variable
string
(values: MeterValueSampleInterval, HeartbeatInterval, ConnectionTimeOut, WebSocketPingInterval, TransactionMessageRetryInterval, TransactionMessageAttempts)
- value
- id required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getConfigurations
Get Configurations data
edrv.getConfigurations({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String
- paginate_limit
Output
Output schema unknown
postConfigurations
Create connector with parameters
edrv.postConfigurations({
"body": {}
}, context)
Input
- input
object
- body required
object
- key
string
- value
string
- key
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getConfiguration
Get one Configuration data
edrv.getConfiguration({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of Configuration that needs to be fetched
- id required
Output
Output schema unknown
getConnectors
List connectors
edrv.getConnectors({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_evse
boolean
: Populate evse - include_organization
boolean
: Populate organization - include_rate
boolean
: Populate rate
- paginate_limit
Output
Output schema unknown
postConnectors
Create a new connector
edrv.postConnectors({
"body": {}
}, context)
Input
- input
object
- body required
object
- chargestation
string
- format
string
- power
integer
- power_type
string
- rate
string
- type
string
- chargestation
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
deleteConnector
Delete a connector
edrv.deleteConnector({
"id": ""
}, context)
Input
- input
object
- id required
string
: The connector id that needs to be deleted
- id required
Output
Output schema unknown
getConnector
Get a connector
edrv.getConnector({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of connector that needs to be fetched - include_evse
boolean
: Populate evse - include_organization
boolean
: Populate organization - include_rate
boolean
: Populate rate
- id required
Output
Output schema unknown
patchConnector
Update a connector's data
edrv.patchConnector({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of connector that needs to be updated - body required
object
- chargestation
string
- format
string
- power
integer
- power_type
string
- rate
string
- type
string
- chargestation
- id required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getDrivers
List all drivers
edrv.getDrivers({}, context)
Input
- input
object
- active
boolean
: Get a list of active drivers - paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_tokens
boolean
: Populate tokens - include_group
boolean
: Populate group - include_organization
boolean
: Populate organization
- active
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
postDrivers
Create a new driver
edrv.postDrivers({
"body": {
"firstname": "",
"lastname": "",
"source": ""
}
}, context)
Input
- input
object
- body required
object
- active
boolean
- address
object
- city
string
- country
string
- postalCode
string
- streetAndNumber
string
- city
- email
string
- firstname required
string
- lastname required
string
- phone
object
- home
string
- mobile
string
- work
string
- home
- source required
string
(values: physical, slack, telegram, sms)
- active
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
deleteDriver
Delete a driver
edrv.deleteDriver({
"id": ""
}, context)
Input
- input
object
- id required
string
: The driver id that needs to be deleted
- id required
Output
Output schema unknown
getDriver
Get a driver's data
edrv.getDriver({
"id": ""
}, context)
Input
- input
object
- id required
string
: The driver id that needs to be fetched - include_tokens
boolean
: Populate tokens - include_group
boolean
: Populate group - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
patchDriver
Update a driver's data
edrv.patchDriver({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of driver that needs to be updated - body required
object
- active
boolean
- address
object
- city
string
- country
string
- postalCode
string
- streetAndNumber
string
- city
- email
string
- firstname
string
- lastname
string
- phone
object
- home
string
- mobile
string
- work
string
- home
- source
string
- tokens
array
- active
- id required
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
deleteLocation
Delete a location
edrv.deleteLocation({
"id": ""
}, context)
Input
- input
object
- id required
string
: The location id that needs to be deleted
- id required
Output
Output schema unknown
getLocation
Get a location's data
edrv.getLocation({
"id": ""
}, context)
Input
- input
object
- id required
string
: The location id that needs to be fetched - include_chargestations
boolean
: Populate chargestations - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
patchLocation
Update a location's data
edrv.patchLocation({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of location that needs to be updated - body required
object
- active
boolean
- address
object
- city
string
- country
string
- postalCode
string
- streetAndNumber
string
- city
- chargestations
array
- coordinates
object
- latitude
number
- longitude
number
- latitude
- operatorName
string
- active
- id required
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
getLocations
Get Locations data
edrv.getLocations({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_organization
boolean
: Populate organization
- paginate_limit
Output
Output schema unknown
postLocations
Create a new location
edrv.postLocations({
"body": {
"operatorName": "",
"address": {},
"coordinates": {}
}
}, context)
Input
- input
object
- body required
object
- active
boolean
- address required
object
- city
string
- country
string
- postalCode
string
- streetAndNumber
string
- city
- chargestations
array
- coordinates required
object
- latitude
number
- longitude
number
- latitude
- operatorName required
string
- active
- body required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getOrganizations
Get an array of all Organizations
edrv.getOrganizations({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_locations
boolean
: Populate locations
- paginate_limit
Output
Output schema unknown
getOrganization
Get one organization's data by id
edrv.getOrganization({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of organization that needs to be fetched - include_locations
boolean
: Populate locations
- id required
Output
Output schema unknown
patchOrganization
Update an organization's data
edrv.patchOrganization({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of organization that needs to be updated - body required
object
- active
boolean
- address
object
- city
string
- country
string
- postalCode
string
- streetAndNumber
string
- city
- channels
object
- slack
object
- telegram
object
- slack
- configurations
object
- basicAuthEnabled
boolean
- basicAuthPassword
boolean
- basicAuthEnabled
- links
object
- about
string
- contact
string
- privacy
string
- support
string
- about
- locations
array
- logo
string
- name
string
- otp
string
- stripe_connected_account_id
string
- stripe_country
string
- stripe_currency
string
- stripe_reserve_amount
integer
- support
object
- business_hours
string
- chat
object
- type
string
- value
string
- type
- contact_number
string
- email
string
- business_hours
- supportChat
object
- id
string
- name
string
- id
- theme
object
- colors
object
- primary
string
- secondary
string
- primary
- colors
- active
- id required
Output
Output schema unknown
getRealtime
Use to request a Websockets handshake
edrv.getRealtime({
"sec-websocket-protocol": ""
}, context)
Input
- input
object
- sec-websocket-protocol required
string
: The JWT token to use for auth
- sec-websocket-protocol required
Output
Output schema unknown
getReservations
Get Reservations data
edrv.getReservations({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_chargestation
boolean
: Populate chargestation - include_organization
boolean
: Populate organization
- paginate_limit
Output
Output schema unknown
getReservation
Get one reservation data
edrv.getReservation({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of the reservation that needs to be fetched - include_chargestation
boolean
: Populate chargestation - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
updatereservation
Use to request a update an existing reservation. The request will wait for the charge station to process the command. It will timeout after 60 seconds.
edrv.updatereservation({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of the reservation that needs to be fetched - body required
object
- connector
integer
- driver
string
- endDate
string
- evse
integer
- connector
- id required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getTokens
List tokens
edrv.getTokens({}, context)
Input
- input
object
- paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_driver
boolean
: Populate driver - include_organization
boolean
: Populate organization
- paginate_limit
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
postTokens
Create a new token
edrv.postTokens({
"body": {
"active": true,
"physicalId": "",
"driver": "",
"channel": ""
}
}, context)
Input
- input
object
- body required
object
- active required
boolean
- channel required
string
(values: physical, slack, telegram, sms) - driver required
string
- physicalId required
string
- type
string
- active required
- body required
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
deleteToken
Use to delete a token
edrv.deleteToken({
"id": ""
}, context)
Input
- input
object
- id required
string
: The token id that needs to be deleted
- id required
Output
Output schema unknown
getToken
Get a single token's data
edrv.getToken({
"id": ""
}, context)
Input
- input
object
- id required
string
: The token id that needs to be fetched - include_driver
boolean
: Populate driver - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
patchToken
Update a token
edrv.patchToken({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: ID of token that needs to be updated - body required
object
- active
boolean
- channel
string
(values: physical, slack, telegram, sms) - driver
string
- physicalId
string
- type
string
- active
- id required
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
getTransactions
Get a list of transactions
edrv.getTransactions({}, context)
Input
- input
object
- status
string
(values: Started, Ended): Started to get only active transactions - paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_chargestation
boolean
: Populate chargestation - include_evse
boolean
: Populate evse - include_connector
boolean
: Populate connector - include_driver
boolean
: Populate driver - include_token
boolean
: Populate token - include_reservation
boolean
: Populate reservation - include_organization
boolean
: Populate organization - include_rate
boolean
: Populate rate
- status
Output
- output
object
- hasNext
boolean
- hasPrevious
boolean
- message
string
- ok
boolean
- result
array
- hasNext
getTransaction
Get a specific transaction
edrv.getTransaction({
"id": ""
}, context)
Input
- input
object
- id required
string
: The transaction id that needs to be fetched - include_chargestation
boolean
: Populate chargestation - include_evse
boolean
: Populate evse - include_connector
boolean
: Populate connector - include_driver
boolean
: Populate driver - include_token
boolean
: Populate token - include_reservation
boolean
: Populate reservation - include_organization
boolean
: Populate organization - include_rate
boolean
: Populate rate
- id required
Output
Output schema unknown
getTransactionCost
Get a specific transaction's cost
edrv.getTransactionCost({
"id": ""
}, context)
Input
- input
object
- id required
string
: The transaction id that needs to be fetched
- id required
Output
Output schema unknown
getVehicles
List all vehicles
edrv.getVehicles({}, context)
Input
- input
object
- active
boolean
: Get a list of active vehicles - paginate_limit
integer
: Number of results per page - paginate_page
string
: The queried page index - paginate_enabled
boolean
: Enable pagination - sort_by
string
: Sort data by this key - sort_order
string
(values: desc, asc): asc to sort ascending (default is desc - descending) - createdAt$gte
string
: Date as ISO String - createdAt$lte
string
: Date as ISO String - updatedAt$gte
string
: Date as ISO String - updatedAt$lte
string
: Date as ISO String - include_driver
boolean
: Populate driver - include_token
boolean
: Populate token - include_organization
boolean
: Populate organization
- active
Output
- output
object
- message
string
- ok
boolean
- result
array
- message
getVehicle
Get a vehicle's data
edrv.getVehicle({
"id": ""
}, context)
Input
- input
object
- id required
string
: The vehicule id that needs to be fetched - include_driver
boolean
: Populate driver - include_token
boolean
: Populate token - include_organization
boolean
: Populate organization
- id required
Output
Output schema unknown
getVehicleBattery
Get a vehicle's battery
edrv.getVehicleBattery({
"id": ""
}, context)
Input
- input
object
- id required
string
: The vehicle id that needs to be fetched
- id required
Output
Output schema unknown
getVehicleCharge
Get a vehicle's charge
edrv.getVehicleCharge({
"id": ""
}, context)
Input
- input
object
- id required
string
: The vehicle id that needs to be fetched
- id required
Output
Output schema unknown
postCharge
Change charge
edrv.postCharge({
"id": "",
"body": {
"action": ""
}
}, context)
Input
- input
object
- id required
string
: The vehicle id that needs to be fetched - body required
object
- action required
string
(values: START, STOP)
- action required
- id required
Output
- output
object
- message
string
- ok
boolean
- result
object
- message
getVehicleLocation
Get a vehicle's location
edrv.getVehicleLocation({
"id": ""
}, context)
Input
- input
object
- id required
string
: The vehicle id that needs to be fetched
- id required
Output
Output schema unknown
getVehicleOdometer
Get a vehicle's odometer
edrv.getVehicleOdometer({
"id": ""
}, context)
Input
- input
object
- id required
string
: The vehicle id that needs to be fetched
- id required
Output
Output schema unknown
Definitions
schema1
- schema1
object
- location
string
- manufacturer
string
- model
string
- protocol
string
- public
boolean
- location
4 years ago