Overview

API overview and usage

This document explains the usage of the Wiser Energy API. This API allows to get Instant KWH, Historical KWH, Historical Water & Gas (depending of availability in your country) by hour , day, month for all sites such as Eco District, Multifamily Residential, Social Landlords... Please note that you need to be pre-authorized by Schneider-Electric to use this API. Contact your Schneider Electric account manager for more information. This document provides a general tutorial for users who want to consume the Wiser Energy API.

How it works

Thanks to this API, a Schneider Electric partner can remotely have access to energy & temperature data collected by different WiserEnergy. Of course, this partner must prior be granted access to the systems he wants to request the data for.

A site is a dwelling . In a site there could be one or several systems, depending of the complexity of the installation. A program is a set of sites that makes sense to be monitored as a whole for the partner. It could be a building, a set of buildings, an eco-district, … The data that can be queried through the community API are: -Energy consumption (Wh) by hour/day/month -Instant power (W)

Consent of the site occupant must be collected by the partner. When the occupant gives its consent, it means he agrees to have its energy & temperature data collected by the system. Once the partner has collected the consent from a site occupant, he must record it in through the Schneider Electric API. Only after that, the data are started to be collected & stored in our system.

Documentation

How to sign up for the API

Before you can sign up for the Wiser Energy API, you must register or login with an Exchange account. Then you can subscribe to the API product in our Shop and where you can read about terms & conditions. After subscription, you will find your API key prepopulated in the Try Out console.

  1. Select one of the endpoints and click on
  2. Select the Production as the target environment
  1. Your API key is shown in the Try Out console

Status of your API consumption will soon be available from the Exchange cockpit

Limitations

Amount of calls to the API in the SANDBOX are limited. To get a full experience and extend the thresholds, please subscribe to the API and use the production environment.

Authentication guide

This API requires 2 keys to authenticate and allow access to the API. 1. SE Exchange API Subscription Key: This key is automatically delivered once the subscription to the API has been approved. This key should be included in all API requests in the Authorization header that looks like the following:

| **Authorization:**      _your_subscription_key_



Please refer the 'How to sign up for the API' section under Developer Guide above to know how to get your subscription key.

  1. FD Technical Token: This token will be delivered by the FD technical team once subscription request to the API is accepted. This token grants the partner access to the data of the program requested from the API. There is no link between this technical token and the subscription key. This key should be included in all API requests in the apiKey header that looks like the following:

    apiKey: <**api_key**>

    Your API keys carry many privileges, so be sure to keep them secure!

Response Codes

We follow the error response format proposed in RFC 7807also known as Problem Details for HTTP APIs. As with our normal API responses, your client must be prepared to gracefully handle additional members of the response.

HTTP Status Code

Error Reason

400

Bad request
Your request could not be processed. This is a generic error. InvalidAction The action requested was not valid for this resource. This error is returned when you try to access an action that doesn't exist. For example, /campaigns/{id}/actions/send. InvalidResource The resource submitted could not be validated. For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object. JSONParseError We encountered an unspecified JSON parsing error. This error means that your JSON was formatted incorrectly or was considered invalid or incomplete.

401

APIKeyMissing
Your request did not include an API key. This error suggests that your API key was missing from your request, or that something was formatted or named improperly in your header. To learn more, check out Get Started with the WiserEnergy API. APIKeyInvalid Your API key may be invalid, or you've attempted to access the wrong data center. Check that your API key was input correctly, and verify which data center to access. To learn more, check out Get Started with the WiserEnergy API.

403

Forbidden
You are not permitted to access this resource. This is a generic error. UserDisabled This account has been disabled. The WiserEnergy account is deactivated. Contact our support team if you need more help. WrongDatacenter The API key provided is linked to a different data center. This error suggests that you tried to contact the wrong data center. It's often associated with misconfigured libraries.

404

ResourceNotFound
The requested resource could not be found.This error tells you a specific resource doesn't exist. It's possible that the resource has been moved or deleted, or that there's a typo in your request.

405

MethodNotAllowed
The requested method and resource are not compatible. See the Allow header for this resource's available methods. This error means that the requested resource does not support the HTTP method you used. Find out which methods are allowed for each resource in the API Reference.

414

ResourceNestingTooDeep
The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources.

422

InvalidMethodOverride
You can only use the X-HTTP-Method-Override header with the POST method. This error lets you know you've tried to override an incompatible method. The WiserEnergy API only permits method override with POST. RequestedFieldsInvalid The fields requested from this resource are invalid. This error suggests there is a typo in your field request or some other type of syntax error or problem that invalidates your request.

429

TooManyRequests
You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle server response. If any of your requests time out after you've reached the limit, those requests could still be considered open and continue to slow your connection. Contact the Exchange support team at exchange.support@se.com if you think this is the case.

500

InternalServerError
An unexpected internal error has occurred. Please contact Support for more information. This error lets you know our servers have experienced a problem. Although this is rare, please contact exchange.support@se.com to let us know that you've encountered this error.

503

ComplianceRelated
This method has been disabled.
400 Bad request
Your request could not be processed. This is a generic error. InvalidAction The action requested was not valid for this resource. This error is returned when you try to access an action that doesn't exist. For example, /campaigns/{id}/actions/send. InvalidResource The resource submitted could not be validated. For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object. JSONParseError We encountered an unspecified JSON parsing error. This error means that your JSON was formatted incorrectly or was considered invalid or incomplete.
401 APIKeyMissing
Your request did not include an API key. This error suggests that your API key was missing from your request, or that something was formatted or named improperly in your header. To learn more, check out Get Started with the WiserEnergy API. APIKeyInvalid Your API key may be invalid, or you've attempted to access the wrong data center. Check that your API key was input correctly, and verify which data center to access. To learn more, check out Get Started with the WiserEnergy API.
403 Forbidden
You are not permitted to access this resource. This is a generic error. UserDisabled This account has been disabled. The WiserEnergy account is deactivated. Contact our support team if you need more help. WrongDatacenter The API key provided is linked to a different data center. This error suggests that you tried to contact the wrong data center. It's often associated with misconfigured libraries.
404 ResourceNotFound
The requested resource could not be found.This error tells you a specific resource doesn't exist. It's possible that the resource has been moved or deleted, or that there's a typo in your request.
405 MethodNotAllowed
The requested method and resource are not compatible. See the Allow header for this resource's available methods. This error means that the requested resource does not support the HTTP method you used. Find out which methods are allowed for each resource in the API Reference.
414 ResourceNestingTooDeep
The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources.
422 InvalidMethodOverride
You can only use the X-HTTP-Method-Override header with the POST method. This error lets you know you've tried to override an incompatible method. The WiserEnergy API only permits method override with POST. RequestedFieldsInvalid The fields requested from this resource are invalid. This error suggests there is a typo in your field request or some other type of syntax error or problem that invalidates your request.
429 TooManyRequests
You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle server response. If any of your requests time out after you've reached the limit, those requests could still be considered open and continue to slow your connection. Contact the Exchange support team at exchange.support@se.com if you think this is the case.
500 InternalServerError
An unexpected internal error has occurred. Please contact Support for more information. This error lets you know our servers have experienced a problem. Although this is rare, please contact exchange.support@se.com to let us know that you've encountered this error.
503 ComplianceRelated
This method has been disabled.

Support

Contact the Exchange support team at exchange.support@se.com. In your request please :

- mention the involved endpoint

- give the request that generate the error

- copy past any error message you received

- add some screen shot

Authentication

Authentication is the act of proving an assertion, such as the identify of a computer system user.

Security scheme type API Key
Header parameter name Authorization

In contrast with identification, the act of indicating a person or thing's identity, authentication is the process of verifying that identify.