api/pricing - single evse id ---------------------------- The single evse id endpoint creates a pricing structure for one evse id and authentication media combination. The endpoint accepts the following parameters .. list-table:: Request Parameters :widths: 25 25 50 :header-rows: 1 * - Parameter - Required - Description * - evseId - yes - Compliant with the following to calculate the stepCosts: specification for EVSE ID from “eMI3". e.g. BE-BEC-E041503001" * - tag_id, emaid, authendicationUuid - yes - Tag Id, emaid or uuid from the card/token - only one of those three can be used at once * - consumption - no - fictional consumption in Wh which will be used in the calculation. If left empty no calculation will be done * - duration, duration_in_minutes - no - total duration in seconds or minutes. If left empty no calculation will be done * - currency - no - desired currency. If left empty default settings will be used * - include_tax - no - includes the tax which would be used for this cost rate (tax field will be not present if not set to true) Response contains a `Rate `__ object. Sample Request for a single evse id =================================== .. list-table:: Request Parameters :widths: 25 25 50 :header-rows: 1 * - Parameter - Value - Description * - evseId - DE*EEE*E000001 - * - tag_id - SOMETHING - * - consumption - 90000 - in Wh which are 90KWh * - duration - 1000 - value in seconds .. code-block:: bash curl --location --request GET 'https://yourinstancename.beenergised.cloud/api/pricing/?evseId=DE*EEE*E000001&tag_id=SOMETHING&consumption=90000&duration=1000' \ --header 'x-api-token: your_token' .. code-block:: json { "rateName": "Standard-Verkaufstarif eMSP", "costId": 2206, "currency": "EUR", "localCurrency": "EUR", "costTotalLocalCurrency": 36, "currencyConversionRate": 1, "costTotal": 36, "costTime": 0, "costPower": 36, "priceStructure": { "energy": { "unit": "Wh", "elements": [ { "intervalChange": 100, "stepCosts": 0, "intervalCosts": 0 }, { "intervalChange": 101, "stepCosts": 0.0404, "intervalCosts": 40.4 }, { "intervalChange": 102, "stepCosts": 0.0004, "intervalCosts": 0.4 }, { "intervalChange": 100000, "stepCosts": 35.9592, "intervalCosts": 0.4 } ] }, "time": { "unit": "min", "elements": [] } } } Sample Request for a single evse id with a desired currency =========================================================== .. list-table:: Request Parameters :widths: 25 25 50 :header-rows: 1 * - Parameter - Value - Description * - evseId - CH*CHI*E00193 - * - tag_id - SOMETHING - * - consumption - 80000 - in Wh which are 80KWh * - duration - 1 - value in seconds * - currency - CHF - currency following the ISO standard .. code-block:: bash curl --location --request GET 'https://yourinstancename.beenergised.cloud/api/pricing/?evseId=CH*CHI*E00193&tag_id=SOMETHING&consumption=80000&duration=1¤cy=CHF' \ --header 'x-api-token: your_token' .. code-block:: json { "rateName": "Standard-Verkaufstarif eMSP", "costId": 2020, "currency": "CHF", "localCurrency": "EUR", "costTotalLocalCurrency": 48.863, "currencyConversionRate": 1.0642, "costTotal": 52, "costTime": 0, "costPower": 52, "priceStructure": { "energy": { "unit": "Wh", "elements": [ { "intervalChange": 100, "stepCosts": 0, "intervalCosts": 0 }, { "intervalChange": 101, "stepCosts": 0.06565, "intervalCosts": 65.65 }, { "intervalChange": 102, "stepCosts": 51.93435, "intervalCosts": 0.65 } ] }, "time": { "unit": "min", "elements": [] } } } How to calculate the stepCosts? .. code-block:: json { "intervalChange": 102, "stepCosts": 51.93435, "intervalCosts": 0.65 } `stepConsumption = consumption - consumptionLastStep = 80000 Wh - 101 Wh= 79899 Wh = 79,899 kWh` `intervalCost = stepConsumption * intervalCosts = 79,899 kWh * 0,65 CHF/kWh = CHF 51,93435` Sample Request for a single evse id with tax =========================================================== .. list-table:: Request Parameters :widths: 25 25 50 :header-rows: 1 * - Parameter - Value - Description * - evseId - CH*CHI*E00193 - * - tag_id - SOMETHING - * - include_tax - - add tax to price structure .. code-block:: bash curl --location --request GET 'https://yourinstancename.beenergised.cloud/api/pricing/?evseId=CH*CHI*E00193&tag_id=SOMETHING&include_tax' \ --header 'x-api-token: your_token' .. code-block:: json { "rateName": "Standard-Verkaufstarif eMSP", "costId": 2020, "currency": "CHF", "localCurrency": "EUR", "costTotalLocalCurrency": 48.863, "currencyConversionRate": 1.0642, "costTotal": 52, "costTime": 0, "costPower": 52, "priceStructure": { "energy": { "unit": "Wh", "elements": [ { "intervalChange": 100, "stepCosts": 0, "intervalCosts": 0 }, { "intervalChange": 101, "stepCosts": 0.06565, "intervalCosts": 65.65 }, { "intervalChange": 102, "stepCosts": 51.93435, "intervalCosts": 0.65 } ], "tax": 1.87 }, "time": { "unit": "min", "elements": [], "tax": 1.24 } } }