From 7cb2f3b5e6cc286f9b050f590dcb45456373d802 Mon Sep 17 00:00:00 2001 From: shenoyninad Date: Thu, 31 Aug 2023 21:46:04 +0530 Subject: [PATCH 01/16] Examples and implementation guide for EV Charging --- api/dent.yaml | 375 +- docs/5_Implementation_Guide.md | 2072 ++++++++++- .../ev-charging-and-battery-swapping.md | 1296 ------- docs/example-implementations/ev-charging.md | 3053 +++++++++++++++++ .../general-energy-transaction-1.md | 841 ----- .../general-energy-transaction-2.md | 281 -- .../ev-charging/cancel/cancel-request.json | 2 +- .../on_cancel-request-charger-breakdown.json | 200 ++ .../ev-charging/cancel/on_cancel-request.json | 22 +- .../confirm/on_confirm-request.json | 39 +- .../ev-charging/init/on_init-request.json | 30 +- .../rating/on_rating-request.json} | 15 +- .../rating/rating-request.json} | 16 +- .../ev-charging/search/on_search-request.json | 48 +- .../ev-charging/search/search-request.json | 2 +- .../ev-charging/select/on_select-request.json | 34 +- .../ev-charging/status/on_status-request.json | 37 +- .../on_update-request-charging-end.json | 208 ++ .../on_update-request-charging-start.json | 208 ++ .../update/update-request-charging-end.json} | 20 +- .../update-request-charging-start.json} | 21 +- .../confirm/confirm-request.json | 101 - .../confirm/on_confirm-request.json | 154 - examples/homes-discoms/init/init-request.json | 58 - .../homes-discoms/init/on_init-request.json | 153 - .../status/on_status-request.json | 154 - .../homes-discoms/status/status-request.json | 24 - .../cancel/on_cancel-request.json | 154 - ...request-automatic-and-manual-dispatch.json | 61 - ...on_confirm-request-automatic-dispatch.json | 153 - .../on_confirm-request-manual-dispatch.json | 153 - .../init/init-request-automatic-dispatch.json | 61 - .../init/init-request-manual-dispatch.json | 38 - .../on_init-request-automatic-dispatch.json | 152 - .../init/on_init-request-manual-dispatch.json | 146 - .../on_search-request-automatic-dispatch.json | 138 - .../on_search-request-manual-dispatch.json | 138 - .../search/search-request.json | 34 - .../on_select-request-automatic-dispatch.json | 140 - .../on_select-request-manual-dispatch.json | 119 - .../on_status-request-automatic-dispatch.json | 147 - ...tatus-request-manual-dispatch-penalty.json | 154 - .../on_status-request-manual-dispatch.json | 147 - .../status/status-request.json | 24 - .../support/on_support-request.json | 29 - .../support/support-request.json | 28 - .../update/on_update-request.json | 147 - .../update/update-request.json | 40 - .../cancel/on_cancel-request.json | 153 - ...onfirm-request-automatic-dispatch-tnc.json | 75 - .../confirm/confirm-request.json | 69 - ...on_confirm-request-automatic-dispatch.json | 152 - .../on_confirm-request-manual-dispatch.json | 152 - ...it-request-automatic-dispatch-consent.json | 48 - .../init/init-request.json | 42 - ...it-request-automatic-dispatch-consent.json | 175 - ...n_init-request-automatic-dispatch-tnc.json | 175 - .../on_init-request-manual-dispatch-tnc.json | 174 - .../on_search-request-automatic-dispatch.json | 143 - .../on_search-request-manual-dispatch.json | 143 - .../search/search-request.json | 34 - .../on_select-request-automatic-dispatch.json | 145 - .../on_select-request-manual-dispatch.json | 124 - .../on_status-request-automatic-dispatch.json | 152 - ...tatus-request-manual-dispatch-penalty.json | 159 - .../on_status-request-manual-dispatch.json | 152 - .../status/status-request.json | 24 - .../support/on_support-request.json | 29 - .../support/support-request.json | 28 - .../update/on_update-request.json | 147 - .../update/update-request.json | 40 - 71 files changed, 5940 insertions(+), 8262 deletions(-) delete mode 100644 docs/example-implementations/ev-charging-and-battery-swapping.md create mode 100644 docs/example-implementations/ev-charging.md delete mode 100644 docs/example-implementations/general-energy-transaction-1.md delete mode 100644 docs/example-implementations/general-energy-transaction-2.md create mode 100644 examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json rename examples/{microgrids/individuals-to-aggregator/cancel/cancel-request.json => ev-charging/rating/on_rating-request.json} (69%) rename examples/{microgrids/aggregator-to-individuals/cancel/cancel-request.json => ev-charging/rating/rating-request.json} (73%) create mode 100644 examples/ev-charging/update/on_update-request-charging-end.json create mode 100644 examples/ev-charging/update/on_update-request-charging-start.json rename examples/{microgrids/individuals-to-aggregator/select/select-request.json => ev-charging/update/update-request-charging-end.json} (70%) rename examples/{microgrids/aggregator-to-individuals/select/select-request.json => ev-charging/update/update-request-charging-start.json} (68%) delete mode 100644 examples/homes-discoms/confirm/confirm-request.json delete mode 100644 examples/homes-discoms/confirm/on_confirm-request.json delete mode 100644 examples/homes-discoms/init/init-request.json delete mode 100644 examples/homes-discoms/init/on_init-request.json delete mode 100644 examples/homes-discoms/status/on_status-request.json delete mode 100644 examples/homes-discoms/status/status-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/search/search-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json delete mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json delete mode 100644 examples/microgrids/aggregator-to-individuals/status/status-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/support/on_support-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/support/support-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/update/on_update-request.json delete mode 100644 examples/microgrids/aggregator-to-individuals/update/update-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json delete mode 100644 examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json delete mode 100644 examples/microgrids/individuals-to-aggregator/init/init-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json delete mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json delete mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json delete mode 100644 examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/search/search-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json delete mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json delete mode 100644 examples/microgrids/individuals-to-aggregator/status/status-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/support/on_support-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/support/support-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/update/on_update-request.json delete mode 100644 examples/microgrids/individuals-to-aggregator/update/update-request.json diff --git a/api/dent.yaml b/api/dent.yaml index 2823d1f..19a41a6 100644 --- a/api/dent.yaml +++ b/api/dent.yaml @@ -1,4 +1,3 @@ - openapi: 3.0.0 info: title: Beckn Energy API Specification @@ -34,134 +33,6 @@ paths: required: - context - message - examples: - Search for charging stations based on location and vehicle make: - value: - context: - domain: uei:0.1.0 - location: - country: - name: India - code: IND - timestamp: '2023-07-16T04:41:16Z' - bap_id: example-bap.com - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - city: std:080 - core_version: 1.1.0 - action: search - bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 - message: - intent: - location: - descriptor: - name: user location - circle: - gps: 12.923608703179461, 77.61462964117527 - radius: - type: CONSTANT - value: '5' - unit: km - fulfillment: - vehicle: - category: car - make: Tata - model: Nexon EV - variant: ZX+ - wheels_count: '4' - energy_type: electric - Search for charging stations based on location, vehicle make and tariff: - value: - context: - domain: uei:0.1.0 - location: - country: - name: India - code: IND - timestamp: '2023-07-16T04:41:16Z' - bap_id: example-bap.com - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - city: std:080 - core_version: 1.1.0 - action: search - bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 - message: - intent: - location: - descriptor: - name: user location - circle: - gps: 12.923608703179461, 77.61462964117527 - radius: - type: CONSTANT - value: '5' - unit: km - item: - price: - currency: INR - value: 15 rupees per unit - fulfillment: - vehicle: - category: car - make: Tata - model: Nexon EV - variant: ZX+ - wheels_count: '4' - energy_type: electric - Search for charging stations based on charger details: - value: - context: - domain: uei:0.1.0 - location: - country: - name: India - code: IND - timestamp: '2023-07-16T04:41:16Z' - bap_id: example-bap.com - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - city: std:080 - core_version: 1.1.0 - action: search - bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 - message: - intent: - location: - descriptor: - name: user location - circle: - gps: 12.923608703179461, 77.61462964117527 - radius: - type: CONSTANT - value: '5' - unit: km - item: - price: - currency: INR - value: 15 rupees per unit - fulfillment: - vehicle: - category: car - make: Tata - model: Nexon EV - variant: ZX+ - wheels_count: '4' - energy_type: electric - tags: - - descriptor: - name: Charger requirements - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Charger power rating - value: greater than 50kW - display: true responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -725,236 +596,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - Charging service providers return a catalog with their services: - value: - context: - country: IND - location: - country: - name: India - code: IND - domain: uei:0.1.0 - timestamp: '2023-07-16T04:41:16Z' - bap_id: example-bap.com - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - city: std:080 - core_version: 1.1.0 - action: on_search - bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 - message: - catalog: - descriptor: - name: Alpha Charging Solutions - providers: - - descriptor: - name: Spark Charging Station, Outer Ring Road - images: - - url: https://alphachargers.com/images/logo.png - id: '14325' - locations: - - gps: 12.925087, 77.6132964 - map_url: https://goo.gl/maps/5A432HSHfcd2 - city: Bangalore - area_code: '540045' - items: - - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc - descriptor: - name: Spark Charger Point 1 - price: - currency: INR - value: 11 rupees per unit - tags: - - descriptor: - name: Charger Connector 1 Details - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - - id: 993def7f-9f73-4914-b999-5249285e0d5a - descriptor: - name: Spark Charger Point 2 - price: - currency: INR - value: 13 rupees per unit - tags: - - descriptor: - name: Charger Connector 1 Details - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - - descriptor: - name: Spark Charging Station, MG Road - id: '16226' - locations: - - gps: 12.925178, 77.6132901 - map_url: https://goo.gl/maps/7fds573GSSd2 - city: Bangalore - area_code: '540039' - items: - - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc - descriptor: - name: Spark Charger Point 1 - price: - currency: INR - value: 15 rupees per unit - tags: - - descriptor: - name: Charger Connector 1 Details - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - - id: 993def7f-9f73-4914-b999-5249285e0d5a - descriptor: - name: Spark Charger Point 2 - price: - currency: INR - value: 12 rupees per unit - tags: - - descriptor: - name: Charger Connector 1 Details - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - Charging service providers return a catalog with connector as items: - value: - context: - country: IND - location: - country: - name: India - code: IND - domain: uei:0.1.0 - timestamp: '2023-07-16T04:41:16Z' - bap_id: example-bap.com - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - city: std:080 - core_version: 1.1.0 - action: on_search - bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 - message: - catalog: - descriptor: - name: Alpha Charging Solutions - providers: - - id: 4235 - descriptor: - name: Alpha Charging Solutions - images: - - url: https://alphachargers.com/images/logo.png - locations: - - gps: 12.925087, 77.6132964 - map_url: https://goo.gl/maps/5A432HSHfcd2 - city: Bangalore - area_code: '540045' - items: - - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc - category_ids: - - charging-station - location_ids: - - 12.925087, 77.6132964 - descriptor: - name: Spark Charging Station, Outer Ring Road - tags: - - display: true - descriptor: - name: Attributes - code: attributes - list: - - display: true - value: 10kms - descriptor: - name: Distance - code: distance - - id: 01683e33-39c5-4523-9eef-36e8165e66cb - parent_item_id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc - category_ids: - - charge-point - descriptor: - name: Spark Charger Point 1 - price: - currency: INR - value: ₹15-20 per unit - tags: - - display: true - descriptor: - name: Available Charging Options - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - id: ede1c8b9-c5b2-4e5f-bbf3-a7421f5e1537 - parent_item_id: 01683e33-39c5-4523-9eef-36e8165e66cb - category_ids: - - connector - descriptor: - name: Charger Connector 1 Details - tags: - - display: true - descriptor: - name: Power Rating - list: - - display: true - value: 15kW - - display: true - descriptor: - name: Connector Status - list: - - descriptor: - name: Status - display: true - value: Available responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1519,7 +1160,7 @@ components: description: Describes a postal address. type: string Agent: - description: 'Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor''s name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride.' + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." properties: person: $ref: '#/components/schemas/Person' @@ -1710,7 +1351,7 @@ components: type: object description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification Context: - description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," type: object properties: domain: @@ -1831,7 +1472,7 @@ components: items: $ref: '#/components/schemas/Image' Domain: - description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." type: object properties: name: @@ -1983,7 +1624,7 @@ components: description: Height of the image in pixels type: string Intent: - description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,' + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like," type: object properties: descriptor: @@ -2260,7 +1901,7 @@ components: type: object properties: mimetype: - description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" type: string url: description: The URL of the file @@ -2431,14 +2072,14 @@ components: contact: $ref: '#/components/schemas/Contact' Payment: - description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." type: object properties: id: description: ID of the payment term that can be referred at an item or an order level in a catalog type: string collected_by: - description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." url: type: string description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' @@ -2942,4 +2583,4 @@ components: $ref: '#/components/schemas/Form' required: description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. - type: boolean \ No newline at end of file + type: boolean diff --git a/docs/5_Implementation_Guide.md b/docs/5_Implementation_Guide.md index caaa75a..cfe987c 100644 --- a/docs/5_Implementation_Guide.md +++ b/docs/5_Implementation_Guide.md @@ -1,4 +1,5 @@ # Implementation Guide + This document contains the REQUIRED and RECOMMENDED standard functionality that must be implemented by any Energy Producer Platform a.k.a BPPs and Energy Consumer Platforms a.k.a BAPs. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119](https://datatracker.ietf.org/doc/html/rfc2119) from IETF. @@ -6,6 +7,7 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S ## 5.1 Discovery of Energy Sources ### 5.1.1 Recommendations for BPPs + The following recommendations need to be considered when implementing discovery functionality for an Energy Provider BPP - REQUIRED. The BPP MUST implement the `search` endpoint to receive an `Intent` object sent by BAPs @@ -18,6 +20,7 @@ The following recommendations need to be considered when implementing discovery - RECOMMENDED. Upon receiving a `search` request, the BPP SHOULD return a catalog that best matches the intent. This can be done by indexing the catalog against the various probable paths in the `Intent` schema relevant to typical financial service use cases ### 5.1.2 Recommendations for BAPs + - REQUIRED. The BAP MUST call the `search` endpoint of the BG to discover multiple BPPs on a network - REQUIRED. The BAP MUST implement the `on_search` endpoint to consume the `Catalog` objects containing Energy Sources sent by BPPs. - REQUIRED. The BAP MUST expect multiple catalogs sent by the respective Energy Providers on the network @@ -26,54 +29,2061 @@ The following recommendations need to be considered when implementing discovery - REQUIRED. If the `catalog.providers[].items[].xinput.required` field is set to `"true"` , then the BAP MUST NOT fire a `select`, `init` or `confirm` call until the form is submitted and a successful response is received - RECOMMENDED. If the `catalog.providers[].items[].xinput.required` field is set to `"false"` , then the BAP SHOULD allow the user to skip filling the form - ### Example -A search request for energy may look like this + +The search is broadcast to all providers on the network, there will be many providers. The providers could be EV chargers, Discoms or Energy Aggregators. The search request can look something like this. + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "required": { + "value": "4.0", + "unit": "kWH" + } + } + }, + "location": { + "gps": "12.423423,77.325647", + "radius": { + "value": "5", + "unit": "km" + } + } + } + } +} ``` + +The on_search comes from all the providers, The providers have to be mapped to the provider schema. The `on_search` would look like this. + +```json { - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "code": "IND" + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "providers": [ + { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + }, + "categories": [ + { + "id": "1", + "descriptor": { + "code": "green-tariff", + "name": "green tariff" + } } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" + ], + "locations": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWH" + } + } + }, + "category_ids": ["1"], + "location_ids": ["1", "2"], + "fulfillment_ids": ["1", "2"], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } }, - "quantity": { - "required": { - "value": "4.0", - "unit": "kWH" + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Charger type", + "code": "charger-type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type", + "code": "connector-type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + }, + { + "id": "2", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" } + ], + "display": true + } + ] + } + ] + }, + { + "id": "log9.in", + "descriptor": { + "name": "Log9 Inc" + }, + "categories": [ + { + "id": "1", + "descriptor": { + "code": "green-tariff", + "name": "green tariff" + } + } + ], + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "10", + "currency": "INR / kWH" + }, + "quantity": { + "available": "1000" + }, + "category_ids": ["1"], + "fulfillment_ids": ["3", "4"], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free tyre pressure check" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + ], + "fulfillments": [ + { + "id": "3", + "type": "BATTERY-SWAP", + "stops": [ + { + "location": { + "gps": "12.745675, 77.987393" + } } + ] }, - "location": { - "gps": "12.423423,77.325647", - "radius": { - "value": "5", - "unit": "km" + { + "id": "4", + "type": "MOBILE-BATTERY-SWAP", + "stops": [ + { + "location": { + "url": "https://log9.in/track/bswap/3234242" + } } + ] } + ] } + ] } + } } ``` ## Ordering +This section provides recommendations for implementing the APIs related to creating an order for energy. + +### 5.2.1 Recommendations for BPPs + +#### 5.2.1.1 Selecting a service from the catalog + +- REQUIRED. The BPP MUST implement the `select` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry +- REQUIRED. The BPP MUST check for a form submission at the URL specified on the `xinput.form.url` before acknowledging a `select` request. +- REQUIRED. If the energy service provider has successfully received the information submitted by the energy service consumer, the BPP must return an acknowledgement with `ack.status` set to `ACK` in response to the `select` request +- REQUIRED. If the energy service provider has returned a successful acknowledgement to a `select` request, it MUST send the offer encapsulated in an `Order` object + +#### 5.2.1.2 Initializing an order for an energy related service + +- REQUIRED. The BPP MUST implement the `init` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +#### 5.2.1.3 Confirming an order for an energy related service + +- REQUIRED. The BPP MUST implement the `confirm` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +### 5.2.2 Recommendations for BAPs + +#### 5.2.2.1 Selecting a financial service from the catalog + +#### 5.2.2.2 Initializing an order for a energy service + +#### 5.2.2.3 Confirming the order for the energy service + +### 5.2.3 Example Workflow + +### 5.2.3 Example Requests + +An example of `select` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01", + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + } + ] + } + } +} +``` + +An example of `on_select` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "code": "add-on-item", + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Charger type", + "code": "charger-type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type", + "code": "connector-type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + }, + { + "item": { + "descriptor": { + "name": "Free car wash" + } + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +An example of `init` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "name": "John Doe", + "email": "abc@example.com", + "phone": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ] + } + } +} +``` + +An example of `on_init` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-initiated" + } + }, + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "url": "https://payment.gateway.in", + "type": "PRE-ORDER", + "status": "NOT-PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +An example of `confirm` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "name": "John Doe", + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ], + "payments": [ + { + "collected_by": "BPP", + "params": { + "amount": "40", + "currency": "INR" + }, + "status": "PAID", + "type": "PRE-ORDER" + } + ], + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +An example of `on_confirm` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "payment-completed" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + }, + "instructions": { + "name": "Charging instructions", + "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + ## Fulfillment +This section contains recommendations for implementing the APIs related to fulfilling a energy service order + +### 5.3.1 Recommendations for BPPs + +#### 5.3.1.1 Sending status updates + +- REQUIRED. The BPP MUST implement the `status` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +#### 5.3.1.2 Updating an order for energy service + +- REQUIRED. The BPP MUST implement the `update` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +#### 5.3.1.3 Cancelling a energy service order + +- REQUIRED. The BPP MUST implement the `cancel` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry +- REQUIRED. The BPP MUST implement the `get_cancellation_reasons` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +### 5.3.2 Recommendations for BAPs + +#### 5.3.2.1 Sending status updates + +#### 5.3.2.2 Updating an order for energy service + +#### 5.3.2.3 Cancelling a energy service aporderplication + +#### 5.3.2.4 Real-time tracking + +### 5.3.3 Example Workflow + +### 5.3.4 Example Requests + +An example of `status` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "6743e9e2-4fb5-487c-92b7" + } +} +``` + +An example of `on_status` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "name": "vehicle 65% charged" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +An example of `cancel` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "cancellation_reason_id": "5", + "descriptor": { + "short_desc": "can't attend booking" + }, + "order_id": "6743e9e2-4fb5-487c-92b7" + } + } +} +``` + +An example of `on_cancel` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "status": "CANCELLED", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-cancelled" + } + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "-32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "payment refund" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +An example of `update` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "update_target": "order.fulfillments[0].state", + "order": { + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "code": "start-charging" + } + } + } + ] + } + } +} +``` + +An example of `on_update` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charging-started" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + ## Post-fulfillment + +This section contains recommendations for implementing the APIs after fulfilling a energy service + +### 5.4.1 Recommendations for BPPs + +#### 5.4.1.1 Rating and Feedback + +- REQUIRED. The BPP MUST implement the `rating` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry +- REQUIRED. The BPP MUST implement the `get_rating_categories` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +#### 5.4.1.2 Providing Support + +- REQUIRED. The BPP MUST implement the `support` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry + +### 5.4.2 Recommendations for BAPs + +#### 5.4.2.1 Rating and Feedback + +#### 5.4.2.2 Providing Support + +### 5.4.3 Example Workflow + +### 5.4.4 Example Requests + +An example of `rating` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "rating", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "ratings": [ + { + "id": "6743e9e2-4fb5-487c-92b7", + "rating_category": "charger", + "value": "5" + } + ] + } +} +``` + +An example of `on_rating` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_rating", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "feedback_form": { + "xinput": { + "form": { + "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" + }, + "required": "false" + } + } + } +} +``` + +An example of `support` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "+919876543210", + "email": "john.doe@gmail.com" + } + } +} +``` + +An example of `on_support` request + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "1800 1080", + "email": "customer.care@chargezone.com", + "url": "https://www.chargezone.com/helpdesk" + } + } +} +``` diff --git a/docs/example-implementations/ev-charging-and-battery-swapping.md b/docs/example-implementations/ev-charging-and-battery-swapping.md deleted file mode 100644 index d941405..0000000 --- a/docs/example-implementations/ev-charging-and-battery-swapping.md +++ /dev/null @@ -1,1296 +0,0 @@ -# EV Charging and Battery Swapping Application Workflow #1 - -## Overview - -This document outlines the workflow for Electric Vehicle (EV) Charging and Battery Swapping using the DENT Protocol. The workflow includes interactions between the provider and the User for search, select, block, and completing the session. - -Bear in mind that this is just an example workflow for a simple EV Charing and Battery swap workflow between a `User` and a `Provider`. -(Note: Here, User -> Electric Vehicle Owner/User and Provider -> EV Chraging Provider or Battery Swapping Service Provider) - -A typical workflow for EV Charging & Battery Swapping consists of the following steps: - -#### Step 1: User searches for EV Chargers - -The user provides current location and specific requirements (These requirements will act as filters for EV Charging Providers such as amount of energy user needs in kwh) to find the nearest EV Chargers to charge his/her EV - -#### Step 2: Provider sends catalogs of EV Chargers nearby - -The provider platform (BPP) sends all the nearby Providers and their catalogs to the user. -The catalog will consist of all the services provided by the providers, such as charging types, connector types and battery swapping services etc., - -#### Step 3: User selects EV Charger or Battery Swapping Service - -Selects the provider which satisfies user requirements. -In this stage, the user may select additional features such as: - -1. User can select his required services (such as EV Charging or Battery Swapping) from the catalog of provider -2. User selects the vehicle type of his EV (2-wheeler/3-wheeler/4-wheeler), selects the battery type (such as log9 battery), and also provides the EV's information. -3. User can block/reserve the charger/swap service for a certain time slot, along with the start and duration times of the session. -4. User can select the charger type he wants to use such as A.C. or D.C. and Connector types like CCS2 etc., -5. User can select quantity of energy required in units of kwh. - -#### Step 4: Provider sends quoted price - -The provider will receive the order based on the user requirements. -The user gets the quoted price, including the breakdown of the price details. -The breakdown should include: - -- Tariff per unit (i.e., INR/KWh), the tariff per unit might change by the service type, charger type and location of Energy Charger Provider -- (or) Price for Battery Swapping -- Price for reservation -- Taxes - -#### Step 5: User initiates the order - -User initializes the order by providing billing details. -Here, the user will provide their `Name`, `Email ID` and `Phone Number` and updates the payment details - -#### Step 6: Provider sends draft order - -The provider sends the draft order with the payment and fulfilment terms to the user-side. -Based on how much units of Electrical Energy user used during charging as tariff_per_unit as already mentioned above in INR/KWh or the Price for Battery Swapping Service -If the user also done the reservation/block the transaction includes the price for block/use-up price as well -The tariff_per_unit might change with the charger type as we know that A.C. charger type has different price compared to D.C. charger type. - -#### Step 7: User confirms the order - -User sees the draft order and confirms it by agreeing to the payment and fulfilment terms and conditions -The confirm status will sent to the provider saying that user has paid the price and satisfied the fulfillment terms - -#### Step 8: Provider sends the order activation - -The provider will activates the order and informs user that the order is activated - -#### Step 9: User checks the status of the order - -The user requests to check the updates/status of his/her order - -#### Step 10: Provider sends the status of the order - -The provider will send the order updates with current status to the user - -## Search (Searching for EV Chargers) - -1. The user declares the intent for EV Charging/Battery Swap to the providers -2. Providers publish the catalog of their services - -### User-side Actions - -A EV user can declare their intent for charging their EV in many ways like: - -- Searching for EV Charging/Battery Swap Providers based on current location of user -- Searching for EV Charging Providers based on quantity required -- Searching for Battery Swap Providers based on battery type -- Searching for EV Charging/Battery Swap Providers based on Name/Code of provider -- Searching for EV Charging/Battery Swap Providers based on ratings -- View list of energy sources, such as EV chargers, Solar Farms providing EV charging, Houses providing EV charging, Battery Swap Providers etc. -- Viewing the catalog/details of services provided by a particular charging/Battery Swap provider - -### Provider-side Actions - -In this interaction, the Provider publishes their catalog of services and products. A Provider can publish various types of catalogs like - -- Publish list of energy sources and EV chargers including Solar Farms providing EV charging, Houses, Battery Swap Providers etc. -- Publish list of provders in 5Km radius of user -- Publish list of provders with the requested Charing types/Connector types/Battery types -- Publish catalog/details of services provided by providers -- Publish catalog of services provided by a particular provider - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Declare Intent to EV Charging / Battery swapping - Provider->>User: Publish Catalog of services available -``` - -### Beckn Protocol API Workflow - -In beckn protocol, the search intent generated by the EV User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs return their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. - -```mermaid - sequenceDiagram - User Platform (BAP)->>Gateway (BG): Declare Intent to charge EV / swap battery ( search ) - Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) - Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kwh energy quantity required (200 OK) - Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to charge EV or Swap Battery (search) - Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to charge EV or Swap Battery (search) - Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to charge EV or Swap Battery(search) - Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) - Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) - Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) -``` - -#### Example `search` api Json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "required": { - "value": "4.0", - "unit": "kWH" - } - }, - "category": { - "descriptor": { - "code": "green-tariff" - } - } - }, - "location": { - "gps": "12.423423,77.325647", - "radius": { - "type": "CONSTANT", - "value": "5", - "unit": "km" - } - } - } - } -} -``` - -#### Example `on_search` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "providers": [ - { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - }, - "locations": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWH" - } - } - }, - "locations": ["1", "2"], - "fulfillments": ["1", "2"] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Charger type", - "code": "charger-type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type", - "code": "connector-type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - }, - { - "id": "2", - "type": "CHARGING", - "stops": [ - { - "time": { - "range": { - "start": "10:30", - "end": "11:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - }, - { - "id": "log9.in", - "descriptor": { - "name": "Log9 Inc" - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "10", - "currency": "INR / kWH" - }, - "quantity": { - "available": "1000" - }, - "fulfillments": ["3", "4"] - } - ], - "fulfillments": [ - { - "id": "3", - "type": "BATTERY-SWAP", - "stops": [ - { - "location": { - "gps": "12.745675, 77.987393" - } - } - ] - }, - { - "id": "4", - "type": "MOBILE-BATTERY-SWAP", - "stops": [ - { - "location": { - "url": "https://pulseenergy.in/track/bswap/3234242" - } - } - ] - } - ] - } - ] - } - } -} -``` - -## Select and Book Charging - -1. User selects a EV Charge/ Battery Swap Provider from the list which satisfies the requirements -2. The provider sends the draft order with the quoted price to the User - -### User-side Actions - -- Selecting EV Charge/Battery Swap Provider(s) after viewing catalogs -- Selecting to block/use-up charger (or) not. (Y/N) -- Selecting start and end time for block/use-up of charger/swap service -- Selecting charger type (A.C./D.C.) and connector type -- Selecting vehicle type (2-wheeler, 3-wheeler, 4-wheeler) and its battery type - -### Provider-side Actions - -- Receive user's selection -- Requesting for block/use-up charger (Y/N) -- Requesting for time slot -- Requesting for charger type, connecter type, vehicle type and battery type -- Provider sends draft order for the selected EV charge with quoted price -- The price includes with a breakdown of `tariff_per_unit` (or) `price for battery swap`, `Reservation Price`, `taxes` - -### Logical Workflow - -The below diagram illustrates the logical interactions between a EV user and Provider during the Selecting service/product stage - -```mermaid - sequenceDiagram - User->>Provider: Selects a EV charger/battery swap provider - Provider->>User: Request for block/use-up (Y/N) - User->>Provider: Selects for block/use-up (Y/N) - Provider->>User: Request for time slot - start & end - User->>Provider: Selects start & end time slot - Provider->>User: Requesting for charger type, vehicle type & battery type - User->>Provider: Selects charger, vehicle and battery type - Provider->>User: Sends the draft order with quoted price -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): Select EV charge/Battery swap Provider after seeing catalogs of all providers (select) - Provider 1 (BPP)->>User Platform (BAP): Publish Provider 1 catalog (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select one from EV charging & Battery Swap as a service from Provider 1 (select) - Provider 1 (BPP)->>User Platform (BAP): Request block/use-up (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select block/use-up (select) - Provider 1 (BPP)->>User Platform (BAP): Request time slot to block, charging type, vehicle type and battery type of EV (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select time slot to block and charging type, vehicle type and battery type of EV (select) - Provider 1 (BPP)->>User Platform (BAP): Send draft order with quoted price and breakdown (on_select) -``` - -#### Example `select` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01", - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - } - ] - } - } -} -``` - -#### Example `on_select` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - } - ], - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -## Order Initialization - -In this stage, the User provides the required information and initiates the order - -### User-side Actions - -- User provides the billing details `Name`, `Email ID` and `Phone Number` -- User updates the payment details and initiates the order - -### Provider-side Actions - -- Request for billing details -- Receive billing details from the user -- Send draft order with payment and fulfillment terms - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Provides billing details and initates the order - Provider->>User: Send draft order with payment transcript and fulfillment terms -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP updates billing details and initiates the order(init) - Provider 1 (BPP)->>User Platform (BAP): BPP sends draft order with breakdown and fulfillment terms (on_init) -``` - -#### Example `init` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "name": "John Doe", - "email": "abc@example.com", - "phone": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ] - } - } -} -``` - -#### Example `on_init` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "pulse-energy", - "descriptor": { - "name": "Pulse Energy", - "short_desc": "Pulse Energy Technologies Pvt Ltd", - "images": [ - { - "url": "https://pulseenergy.io/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "ee" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": "100" - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-initiated" - } - }, - "vehicle": { - "category": "car", - "make": "Tata", - "model": "Nexon EV", - "variant": "ZX+", - "wheels_count": "4", - "energy_type": "electric" - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "title": "units consumed", - "price": { "value": "40", "currency": "INR" } - }, - { - "title": "charging fees", - "price": { "value": "10", "currency": "INR" } - }, - { - "title": "cgst", - "price": { "value": "4", "currency": "INR" } - }, - { - "title": "sgst", - "price": { "value": "4", "currency": "INR" } - } - ] - }, - "payments": [ - { - "url": "https://payment.gateway.in", - "type": "PRE-ORDER", - "status": "NOT-PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ] - } - } -} -``` - -## Fulfillment (Payment and Order Confirmation) - -User will check the order details and confirms the order with payment (might also update the order) -Post payment user will activates the confirmed order - -### User-side Actions - -- Confirms(\updates) the order by agreeing to fulfillment terms - -### Provider-side Actions - -- Receive order confirmation from the user -- Send active confirmed order to the user - -## Status Updates and Monitoring - -### User-side Actions - -- Request to fetch the latest status of the order - -#### Provider-side Actions - -- Provide the latest status of the order to the user - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Confirms (\Updates) the order and pays the the price - Provider->>User: Send active confirmed order - User->>Provider: Request for latest status of order - Provider->>User: Sends the latest status of order -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP updates the payment and confirms the order and fulfillment terms(confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP sends active confirmation of order (on_confirm) - User Platform (BAP)->> Provider 1 (BPP): BAP request to fetch the status of the order (status) - Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) -``` - -#### Example `confirm` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "pulse-energy" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1" - }, - { - "vehicle": { - "category": "car", - "make": "Tata", - "model": "Nexon EV", - "variant": "ZX+", - "wheels_count": "4", - "energy_type": "electric" - } - } - ] - } - } -} -``` - -#### Example `on_confirm` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "pulse-energy", - "descriptor": { - "name": "Pulse Energy", - "short_desc": "Pulse Energy Technologies Pvt Ltd", - "images": [ - { - "url": "https://pulseenergy.io/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "ee" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": "100" - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "code": "payment-completed" - } - }, - "vehicle": { - "category": "car", - "make": "Tata", - "model": "Nexon EV", - "variant": "ZX+", - "wheels_count": "4", - "energy_type": "electric" - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "title": "charging cost", - "price": { "value": "32", "currency": "INR" } - }, - { - "title": "cgst", - "price": { "value": "4", "currency": "INR" } - }, - { - "title": "sgst", - "price": { "value": "4", "currency": "INR" } - } - ] - }, - "payments": [ - { - "type": "PRE-FULFILLMENT", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ] - } - } -} -``` - -#### #### Example `status` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "6743e9e2-4fb5-487c-92b7" - } -} -``` - -#### #### Example `status` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "pulse-energy-bpp.com", - "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "pulse-energy", - "descriptor": { - "name": "Pulse Energy", - "short_desc": "Pulse Energy Technologies Pvt Ltd", - "images": [ - { - "url": "https://pulseenergy.io/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "ee" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": "100" - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "name": "vehicle 65% charged" - } - }, - "vehicle": { - "category": "car", - "make": "Tata", - "model": "Nexon EV", - "variant": "ZX+", - "wheels_count": "4", - "energy_type": "electric" - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "title": "charging cost", - "price": { "value": "32", "currency": "INR" } - }, - { - "title": "cgst", - "price": { "value": "4", "currency": "INR" } - }, - { - "title": "sgst", - "price": { "value": "4", "currency": "INR" } - } - ] - }, - "payments": [ - { - "type": "PRE-FULFILLMENT", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ] - } - } -} -``` diff --git a/docs/example-implementations/ev-charging.md b/docs/example-implementations/ev-charging.md new file mode 100644 index 0000000..8e68141 --- /dev/null +++ b/docs/example-implementations/ev-charging.md @@ -0,0 +1,3053 @@ +# EV Charging Application Workflow #1 + +## Overview + +This document outlines the workflow for Electric Vehicle (EV) Charging using the DENT Protocol. The workflow includes interactions between the charging point operator (BPP) and the BAP for search, select, block, and completing the session. + +Bear in mind that this is just an example workflow for a simple EV Charing and Battery swap workflow between a `User` and a `Provider`. +(Note: Here, User -> Electric Vehicle Owner/User and Provider -> EV Charging Provider) + +A typical workflow for EV Charging consists of the following steps: + +#### Step 1: The BAP searches for EV Chargers + +The BAP provides specific requirements to find the nearest EV Chargers to charge their EV +The search can be based on the location, location and the energy requirements or location, energy requirements and charger details. + +#### Step 2: Provider sends catalogs of EV Chargers nearby + +The provider platform (BPP) sends the catalogs of all nearby charging providers to the BAP. +The catalog will consist of various charging stations with their respective attributes such as charging types, connector types, power rating. + +> **Note**: The BPP is not expected to run an inventory check before it sends out their catalogs. They are free to send out their entire catalogs, but if a BAP has a request with specific timing, they can send the appropraite catalogs. The BPP can also choose to send add ons in their catalogs that the BAP can avail. + +#### Step 3: The BAP selects a EV Charger Service + +Selects the provider which satisfies user requirements. +In this stage, The BAP may select additional features such as: + +1. The BAP can select his required services (such as EV Charging) from the catalog of provider +2. The BAP can block/reserve the charger/swap service for a certain time slot, along with the start and duration times of the session. +3. The BAP can select the charger type he wants to use such as A.C. or D.C. and Connector types like CCS2 etc., +4. The BAP can select quantity of energy required in units of kwh. +5. The BAP can select the provider based on a location that helps them fulfill their intent. + +#### Step 4: Provider sends quoted price + +The provider will receive the order based on the BAP's requirements. +The user gets the quoted price, including the breakdown of the price details. +The breakdown should include: + +- Tariff per unit (i.e., INR/KWh), the tariff per unit might change by the service type, charger type and location of Energy Charger Provider +- Price for reservation + +Apart from this, the provider can include add ons to the items for the BAP, these add ons can be services that can be availed in that location. In the case of EV charging it could be free car wash, free tyre pressure check etc. + +Providers can also include discounts to the items based on partnerships or subscriptions. + +#### Step 5: The BAP initiates the order + +The BAP initializes the order by providing billing details, apart from the details of the items chosen. +Here, the BAP will provide their `Name`, `Email ID` and `Phone Number` and updates the payment details + +The BAP can send vehicle details to avail add ons and offers for that particular vehicle type or company. + +#### Step 6: Provider sends draft order + +The provider sends the draft order with the payment and fulfilment terms to the user-side. +Based on how much units of Electrical Energy user used during charging as tariff_per_unit as already mentioned above in INR/KWh +If the user also done the reservation/block the transaction includes the price for block/use-up price as well +The tariff_per_unit might change with the charger type as we know that A.C. charger type has different price compared to D.C. charger type. + +During this interaction, the BPP can block the charger for the specified amount of time at that particular price and wait for a confirm call. The quote will no longer be valid after a certain amount of time. The quote would have to be re-calculated for a new order. +The BPP sends the payment link, the BAP uses the link to complete the payment. + +#### Step 7: The BAP confirms the order + +The BAP sees the draft order and confirms it by agreeing to the payment and fulfilment terms and conditions +The confirm status will sent to the provider saying that user has paid the price and satisfied the fulfillment terms, the order will also have instructions on how to connect to the charger. + +#### Step 8: Provider sends the order activation + +The provider will activate the order when the user updates the provider to start the charging. + +#### Step 9: User checks the status of the order + +The BAP requests to check the updates/status of their order, this can include the percentage of charge completed. + +#### Step 10: Provider sends the status of the order + +The provider will send the order updates with current status to the BAP + +#### Step 11: The BAP or the provider cancels the order. + +The BAP or the provider can cancel the order for various reasons. The provider can cancel the order if there is failure on their side, in which case the appropriate refund will be processed. + +## Search (Searching for EV Chargers) + +1. The user declares the intent for EV Charging to the providers +2. Providers publish the catalog of their services + +### User-side Actions + +A EV user can declare their intent for charging their EV in many ways like: + +- Searching for EV Charging Providers based on current location of user +- Searching for EV Charging Providers based on quantity required +- Searching for EV Charging based on Name/Code of provider +- Searching for EV Charging Providers based on ratings +- View list of energy sources, such as EV chargers, Solar Farms providing EV charging, Houses providing EV charging, Battery Swap Providers etc. + +### Provider-side Actions + +In this interaction, the Provider publishes their catalog of services and products. A Provider can publish various types of catalogs like + +- Publish list of energy sources and EV chargers including Solar Farms providing EV charging, Houses, Battery Swap Providers etc. +- Publish list of provders in 5Km radius of user +- Publish list of provders with the requested Charing types/Connector types/Battery types +- Publish catalog/details of services provided by providers +- Publish catalog of services provided by a particular provider + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Declare Intent to EV Charging + Provider->>User: Publish Catalog of services available +``` + +### Beckn Protocol API Workflow + +In beckn protocol, the search intent generated by the EV User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs return their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. + +```mermaid + sequenceDiagram + User Platform (BAP)->> Gateway (BG): Declare Intent to charge EV ( search ) + Gateway (BG)->> Registry: Lookup Provider Platforms (lookup) + Registry ->> Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kwh energy quantity required (200 OK) + Gateway (BG)->> Provider Platform 1 (BPP1): Declare Intent to charge EV (search) + Gateway (BG)->> Provider Platform 2 (BPP2): Declare Intent to charge EV (search) + Gateway (BG)->> Provider Platform n (BPPn): Declare Intent to charge EV (search) + Provider Platform 1 (BPP1)->> User Platform (BAP): Publish Catalog of Provider 1 (on_search) + Provider Platform 2 (BPP2)->> User Platform (BAP): Publish Catalog of Provider 2 (on_search) + Provider Platform n (BPPn)->> User Platform (BAP): Publish Catalog of Provider n (on_search) +``` + +#### Example `search` api Json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "required": { + "value": "4.0", + "unit": "kWH" + } + }, + "category": { + "descriptor": { + "code": "green-tariff" + } + } + }, + "location": { + "gps": "12.423423,77.325647", + "radius": { + "type": "CONSTANT", + "value": "5", + "unit": "km" + } + } + } + } +} +``` + +#### Example `on_search` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "providers": [ + { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + }, + "categories": [ + { + "id": "1", + "descriptor": { + "code": "green-tariff", + "name": "green tariff" + } + } + ], + "locations": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWH" + } + } + }, + "category_ids": ["1"], + "location_ids": ["1", "2"], + "fulfillment_ids": ["1", "2"], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Charger type", + "code": "charger-type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type", + "code": "connector-type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + }, + { + "id": "2", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + }, + { + "id": "log9.in", + "descriptor": { + "name": "Log9 Inc" + }, + "categories": [ + { + "id": "1", + "descriptor": { + "code": "green-tariff", + "name": "green tariff" + } + } + ], + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "10", + "currency": "INR / kWH" + }, + "quantity": { + "available": "1000" + }, + "category_ids": ["1"], + "fulfillment_ids": ["3", "4"], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free tyre pressure check" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + ], + "fulfillments": [ + { + "id": "3", + "type": "BATTERY-SWAP", + "stops": [ + { + "location": { + "gps": "12.745675, 77.987393" + } + } + ] + }, + { + "id": "4", + "type": "MOBILE-BATTERY-SWAP", + "stops": [ + { + "location": { + "url": "https://log9.in/track/bswap/3234242" + } + } + ] + } + ] + } + ] + } + } +} +``` + +## Select and Book Charging + +1. User selects a EV Charge Provider from the list which satisfies the requirements +2. The provider sends the draft order with the quoted price to the User + +### User-side Actions + +- Selecting EV Charge Provider(s) after viewing catalogs +- Selecting to block/use-up charger (or) not. (Y/N) +- Selecting start and end time for block/use-up of charger service +- Selecting charger type (A.C./D.C.) and connector type + +### Provider-side Actions + +- Receive user's selection +- Requesting for block/use-up charger (Y/N) +- Requesting for time slot +- Requesting for charger type, connecter type, vehicle type and battery type +- Provider sends draft order for the selected EV charge with quoted price +- The price includes with a breakdown of `tariff_per_unit` , `Reservation Price`, `taxes` + +### Logical Workflow + +The below diagram illustrates the logical interactions between a EV user and Provider during the Selecting service/product stage + +```mermaid + sequenceDiagram + User->>Provider: Selects a EV charger provider + Provider->>User: Request for block/use-up (Y/N) + User->>Provider: Selects for block/use-up (Y/N) + Provider->>User: Request for time slot - start & end + User->>Provider: Selects start & end time slot + Provider->>User: Requesting for charger type, vehicle type & battery type + User->>Provider: Selects charger, vehicle and battery type + Provider->>User: Sends the draft order with quoted price +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): Select EV charge Provider after seeing catalogs of all providers (select) + Provider 1 (BPP)->>User Platform (BAP): Publish Provider 1 catalog (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select one from EV charging & Battery Swap as a service from Provider 1 (select) + Provider 1 (BPP)->>User Platform (BAP): Request block/use-up (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select block/use-up (select) + Provider 1 (BPP)->>User Platform (BAP): Request time slot to block, charging type, vehicle type and battery type of EV (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select time slot to block and charging type, vehicle type and battery type of EV (select) + Provider 1 (BPP)->>User Platform (BAP): Send draft order with quoted price and breakdown (on_select) +``` + +#### Example `select` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01", + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + } + ] + } + } +} +``` + +#### Example `on_select` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "code": "add-on-item", + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Charger type", + "code": "charger-type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type", + "code": "connector-type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + }, + { + "item": { + "descriptor": { + "name": "Free car wash" + } + }, + "price": { + "value": "0", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +## Order Initialization + +In this stage, the User provides the required information and initiates the order + +### User-side Actions + +- User provides the billing details `Name`, `Email ID` and `Phone Number` +- User updates the payment details and initiates the order + +### Provider-side Actions + +- Request for billing details +- Receive billing details from the user +- Send draft order with payment and fulfillment terms + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Provides billing details and initates the order + Provider->>User: Send draft order with payment transcript and fulfillment terms +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP updates billing details and initiates the order(init) + Provider 1 (BPP)->>User Platform (BAP): BPP sends draft order with breakdown and fulfillment terms (on_init) +``` + +#### Example `init` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "name": "John Doe", + "email": "abc@example.com", + "phone": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ] + } + } +} +``` + +#### Example `on_init` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-initiated" + } + }, + "stops": [ + { + "type": "start", + "time": { + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "url": "https://payment.gateway.in", + "type": "PRE-ORDER", + "status": "NOT-PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +## Fulfillment (Payment and Order Confirmation and Cancellation) + +User will check the order details and confirms the order with payment (might also update the order) +Post payment user will activates the confirmed order + +### User-side Actions + +- Confirms(\updates) the order by agreeing to fulfillment terms + +### Provider-side Actions + +- Receive order confirmation from the user +- Send active confirmed order to the user + +## Status Updates and Monitoring + +### User-side Actions + +- Request to fetch the latest status of the order + +#### Provider-side Actions + +- Provide the latest status of the order to the user + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Confirms (\Updates) the order and pays the the price + Provider->>User: Send active confirmed order + User->>Provider: Request for latest status of order + Provider->>User: Sends the latest status of order +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP updates the payment and confirms the order and fulfillment terms(confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP sends active confirmation of order (on_confirm) + User Platform (BAP)->> Provider 1 (BPP): BAP request to start the charging (update) + Provider 1 (BPP)->>User Platform (BAP): BPP starts the charging and sends an update (on_update) + User Platform (BAP)->> Provider 1 (BPP): BAP request to fetch the status of the order (status) + Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) + User Platform (BAP)->> Provider 1 (BPP): BAP request to start the charging (update) + Provider 1 (BPP)->>User Platform (BAP): BPP stops the charging and sends an update (on_update) +``` + +#### Example `confirm` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "name": "John Doe", + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ], + "payments": [ + { + "collected_by": "BPP", + "params": { + "amount": "40", + "currency": "INR" + }, + "status": "PAID", + "type": "PRE-ORDER" + } + ], + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +#### Example `on_confirm` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "payment-completed" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + }, + "instructions": { + "name": "Charging instructions", + "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +#### Example `update` api json to start charging: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "update_target": "order.fulfillments[0].state", + "order": { + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "code": "start-charging" + } + } + } + ] + } + } +} +``` + +#### Example `on_update` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charging-started" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +#### Example `update` api json to stop charging: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "update_target": "order.fulfillments[0].state", + "order": { + "fulfillments": [ + { + "id": "1", + "state": { + "descriptor": { + "code": "end-charging" + } + } + } + ] + } + } +} +``` + +#### Example `on_update` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charging-ended" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +#### Example `status` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "6743e9e2-4fb5-487c-92b7" + } +} +``` + +#### Example `on_status` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "name": "vehicle 65% charged" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +#### Example `cancel` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "cancellation_reason_id": "5", + "descriptor": { + "short_desc": "Can't make it on time" + }, + "order_id": "6743e9e2-4fb5-487c-92b7" + } + } +} +``` + +#### Example `on_cancel` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "status": "CANCELLED", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-cancelled" + } + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ] + } + } +} +``` + +#### example for `support` call + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "+919876543210", + "email": "john.doe@gmail.com" + } + } +} +``` + +#### example for `on_support` call + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "1800 1080", + "email": "customer.care@chargezone.com", + "url": "https://www.chargezone.com/helpdesk" + } + } +} +``` + +## Order cancel + +### User-side Actions + +- Request to cancel the order + +#### Provider-side Actions + +- Cancels the order of the BAP + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Cancels the order + Provider->>User: Sends cancellation confirmation +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP cancels the order (cancel) + Provider 1 (BPP)->>User Platform (BAP): BPP sends cancellation of order (on_cancel) +``` + +#### example `cancel` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "cancellation_reason_id": "5", + "descriptor": { + "short_desc": "can't attend booking" + }, + "order_id": "6743e9e2-4fb5-487c-92b7" + } + } +} +``` + +#### example `on_cancel` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "status": "CANCELLED", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-cancelled" + } + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "-32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "payment refund" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +#### example `on_cancel` JSON triggered by BPP + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "status": "CANCELLED", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + }, + "allocated": { + "measure": { + "value": "2", + "unit": "kWh" + } + } + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charger-error" + } + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "-12", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "payment refund" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-12", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} +``` + +## Order rating + +### User-side Actions + +- Request to rate the order + +#### Provider-side Actions + +- Rates the order of the BAP + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Rates the order + Provider->>User: Sends rating confirmation +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP rates the order (rating) + Provider 1 (BPP)->>User Platform (BAP): BPP sends rating of order (on_rating) +``` + +#### example `rating` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "rating", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "ratings": [ + { + "id": "6743e9e2-4fb5-487c-92b7", + "rating_category": "charger", + "value": "5" + } + ] + } +} +``` + +#### example `on_rating` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_rating", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "feedback_form": { + "xinput": { + "form": { + "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" + }, + "required": "false" + } + } + } +} +``` + +## Order support + +### User-side Actions + +- Request to get support for the order + +#### Provider-side Actions + +- Provides support to the BAP + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Request to get support for the order + Provider->>User: Sends support to the BAP +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP requests to get support for the order (cancel) + Provider 1 (BPP)->>User Platform (BAP): BPP sends support of order (on_cancel) +``` + +#### example `support` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "+919876543210", + "email": "john.doe@gmail.com" + } + } +} +``` + +#### example `on_support` JSON + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "chargezone-energy-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "1800 1080", + "email": "customer.care@chargezone.com", + "url": "https://www.chargezone.com/helpdesk" + } + } +} +``` diff --git a/docs/example-implementations/general-energy-transaction-1.md b/docs/example-implementations/general-energy-transaction-1.md deleted file mode 100644 index 1773e05..0000000 --- a/docs/example-implementations/general-energy-transaction-1.md +++ /dev/null @@ -1,841 +0,0 @@ -# General Energy Transaction Workflow #1 - -## Overview - -This implementation guide outlines the energy transaction process where Sheru (Energy Aggregator) purchases energy from individuals or crowds using the Beckn Protocol. The guide provides step-by-step instructions on how Sheru interacts with the Unified Energy Interface (UEI) to discover energy sources, select providers, initiate transactions, confirm orders, and monitor status updates. - -## Important NOTE : - -- During Auto-Discharge, the provider will sign a consent form such that upon the initiation of the energy transaction, access to discharging/dischargeing the energy from the battery or source of energy is completely given to UEI, until the transaction is completed. -- Since, only UEI has the control/access to discharge the battery or energy source, there is no need of penalty. -- During Manual Discharge, the control/access are not given to UEI; rather, the provider him/herself will discharge/discharge the energy. -- In this case, if the provider has not satisfied the terms he/she agreed upon during the transaction, then the provider has to pay the penalty for the amount of energy he/she was not able to provide. -- The form of energy discharging, either through Auto-Discharging or Manual-Discharging is completely the provider's choice, which is a `pre-select` feature for the provider. - -Bear in mind that this is just an example workflow for a simple Energy transaction where Sheru buys the Energy from the individuals/crowd using UEI. - -(Note: Here, User -> Sheru and Provider -> Individual/Crowd who is providing energy and UEI -> Unified Energy Interface) - -A typical workflow for EV Charging & Battery Swapping consists of the following steps: - -#### Step 1: Discovery of Electricity - -- The user searches providers who agree to Auto-Discharge or else Manual-Discharge (which will act as a filter for search) - 1. Automatic discharge - - Complete control of discharge is given to the UEI. - 2. Manual Discharge - - Commit to providing the required energy; penalties for non-compliance are applicable. -- The user searches for providers who provides the greater than equal to amount of energy needed in kWH (which will act as a filter for the search). - -#### Step 2: Provider platform sends catalogs of Individuals nearby - -The UEI sends all the catalogs to the user. -The list of catalogs consists of: - -- Individuals/Crowds from whom energy can be bought (Name, Phone Number, Email ID) -- Mode of Energy discharge provider has agreed upon (i.e, Automatic discharge / Manual Discharge) -- Available areas/locations for energy purchases -- Available amount of energy (in kWH) -- Tariff per unit (in INR/kWH) - -#### Step 3: Sheru selects a Provider - -The user selects a suitable individual/crowd provider from the list of provided catalogs, from either Automatic Discharge or else Manual Discharge -The user selects the required amount of energy (in kWH) -The UEI notifies the chosen individual that Sheru intends to buy energy - -#### Step 4: Provider sends the draft order with quoted price - -The provider acknowledges the notification sent by UEI for selling energy -The provider will receive the order based on the user's requirements. The user gets the quoted price, including the breakdown of the price details. The breakdown should include: - -1. Tariff per unit (i.e., INR/kWH), might change based on location of Energy Provider -2. Amount of energy requested (in kWH) -3. Price for energy (in INR) : (Amount of energy requested) x (Tariff per unit) -4. Taxes: CGST & SGST - -#### Step 5: Initiating the transaction - -The user initializes the order by providing the billing details such as (Name, Phone Number, Email ID) -The UEI requests the provider to accept the consent form (i.e., a check box) to take control/access to discharging the battery/energy source during Auto Discharge (in the case of Auto-Discharge Providers) - -#### Step 6: Provider sends draft order - -[In case of Auto-discharge.] The provider signs the consent letter (i.e., ticks the check box), that implies the provider is giving control to UEI for discharging their battery or energy source. -The provider sends the draft order with the payment link and fulfillment terms to the user's side. -A payment link is sent to user to complete the payment - -#### Step 7: Provider accepts the terms and conditions - -Provider confirms to satisfy the fulfillment terms and conditions (confirm) -If Provider selects Automatic discharge, no additional confirmation is needed. -If Provider selects Manual Discharge: - -- Provider confirms commitment to fulfillment terms. -- If energy provision fails, a penalty is applicable. - -#### Step 8: User confirms the order by payment fulfillment - -User sees the confirmation of the provider for the fulfillment terms and conditions. (on_confirm) -Upon that, the user pays the quoted price for the draft order and activates the order by agreeing to the payment -The confirmation will sent to the provider through UEI, saying that user has paid the price and satisfies the fulfillment terms (confirm) -The UEI will activate the order after fulfillment of payment and confirmation of user and provider, respectively. (on_confirm) - -#### Step 9: User checks the status of the order - -The user requests to fetch the order status/amount of discharged energy - -#### Step 10: UEI sends the status of the order - -UEI provides status updates for the order (i.e., the amount of energy has been discharged so far). -UEI can send reminders to the provider for upcoming energy discharges (manual or automatic). - -## Search (Searching for Provider) - -1. The user declares the intent to buying energy to the providers -2. Providers publish the catalogs - -### User-side Actions - -A user can declare their intent to buy energy in many ways, like: - -- Searching for Providers based on location -- Searching for Providers based on mode fo discharge (Automatic/Manual) -- Searching for Providers based on quantity required energy (in kWH) -- Searching for Providers based on tariff per unit (in INR/kWH) -- Searching for Providers based on Name or Code of provider -- Searching for Providers based on ratings -- Viewing the catalog/details of services provided by a particular providers - -### Provider-side Actions - -In this interaction, the Provider publishes their catalog. The catalog mainly consits of : - -- Individuals or crowds from whom energy can be bought. -- Full Name, Phone Number, Email-ID -- Locations where energy can be purchased (Address) -- Mode of discharge (Automatic Discharge or Manual Discharge) -- Tariff per unit and available amount of energy - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Declare Intent to buy energy - Provider->>User: Publish Catalog of providers -``` - -### Beckn Protocol API Workflow - -In beckn protocol, the search intent generated by the User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs returns their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. - -```mermaid - sequenceDiagram - User Platform (BAP)->>Gateway (BG): Declare Intent to buy charging ( search ) - Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) - Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kWH energy quantity required (200 OK) - Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to buy energy (search) - Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to buy energy (search) - Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to buy energy (search) - Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) - Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) - Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) -``` - -### Example json for `search` api: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "required": { - "value": "315.0", - "unit": "kWH" - } - } - } - } - } -} -``` - -### Example json for `on_search` api - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "providers": [ - { - "id": "individual_1", - "descriptor": { - "name": "individual_name", - "images": [ - { - "url": "https://individual1.in/images/logo.png" - } - ] - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "provider": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "500", - "unit": "kWH" - } - } - }, - "locations": ["1", "2"], - "fulfillments": ["1", "2"] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "stops": [ - { - "quantity": { - "measure": { - "value": "315.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - }, - { - "id": "2", - "type": "Automatic Dispatch", - "stops": [ - { - "quantity": { - "required": { - "value": "315.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - } - ] - } - } -} -``` - -## Select and On_Select - -1. User selects a Provider from the list which satisfies the requirements -2. User selects the required amount of energy (in kWH) -3. The BAP notifies the chosen Provider, so then provider sends the draft order with quoted price - -### User-side Actions - -- Selecting Provider after viewing catalogs and -- Selecting the required amount of energy -- BAP notifies the provider - -### Provider-side Actions - -- Receive user's selection -- Provider (BPP) will send quoted price along with breakdown for payment to the user for the service requested -- Breakdown: - 1. Tariff per unit (i.e., INR/kWH) - 2. Amount of energy requested (in kWH) - 3. Price for energy (in INR) - 4. Taxes: CGST & SGST - -### Logical Workflow - -The below diagram illustrates the logical interactions between a User and Provider during the Selection stage - -```mermaid - sequenceDiagram - User->>Provider: Selects a provider and required amount of energy (in kWH) - Provider->>User: Receives user selection and sends the draft order with quoted price and breakdown -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): Select Provider after seeing catalogs of all providers and the energy required (select) - Provider 1 (BPP)->>User Platform (BAP): BPP sends the draft order with quoted price and breakdown (on_select) -``` - -### Example json for `select` api - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "sheru-bpp.com", - "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "individual_1" - }, - "items": [ - { - "provider": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "quantity": { - "selected": { - "measure": { - "value": "315.0", - "unit": "kWh" - } - } - } - } - ] - } - } -} -``` - -### Example json for `on_select` api: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "sheru-bpp.com", - "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "individual_1", - "descriptor": { - "name": "individual_name", - "images": [ - { - "url": "https://individual1.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "provider": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "mode_selection": { - "selected_mode": "Automatic Dispatch" - }, - "price": { - "value": "8", - "currency": "INR/kWh" - }, - "quantity": { - "available": { - "measure": { - "value": "500", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "315", - "unit": "kWh" - } - } - } - } - ], - "quote": { - "price": { - "value": "2520", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units dispatched" - }, - "quantity": { - "selected": { - "measure": { - "value": "315", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "2520", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -## Order Initialization - -In this stage, the User provides the required information and initiates the order - -### User-side Actions - -- User provides the billing details `Name`, `Email ID` and `Phone Number` -- User sends the consent form to provider to accept it [In case of Auto-Discharging] -- User updates the payment details and initiates the order - -### Provider-side Actions - -- Request for billing details -- Receive billing details from the user and -- Provider accepts the consent form and sign it -- Send draft order with payment and fulfillment terms -- Sends the payment link to the user along with breakdown of price and taxes - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Provides billing details like Name, Email ID and Phone Number - User->>Provider: Sends the consent form to provider (in case of Auto-Discharging) - Provider->>User: Signs the consent and Send draft order with payment transcript and fulfillment terms - User->>Provider: Updates payment details and initiates the order - Provider->>User: Sends the payment link to the user -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP sends the consent form and billing details (init) - Provider 1 (BPP)->>User Platform (BAP): BPP accepts the consent form and sends draft order with breakdown and fulfillment terms (on_init) - User Platform (BAP)->> Provider 1 (BPP): BAP Updates payment details and initiates the order - Provider 1 (BPP)->>User Platform (BAP): BPP Sends the payment link to the BAP -``` - -### Example json for `init` api - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "sheru-bpp.com", - "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "individual_1" - }, - "items": [ - { - "id": "1", - "quantity": { - "selected": { - "measure": { - "value": "315", - "unit": "kWh" - } - } - } - } - ], - "billing": { - "name": "Sheru", - "email": "abc@example.com", - "phone": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "organization": { - "name": "Sheru" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ] - } - } -} -``` - -### Example json for `on_init` api - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "sheru-bpp.com", - "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "individual_1", - "descriptor": { - "name": "individual_1", - "images": [ - { - "url": "https://individual1.io/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "1", - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": "500" - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "mode": "Automatic Dispatch", - "state": { - "descriptor": { - "code": "order-initiated" - } - }, - "stops": [ - { - "quantity": { - "measure": { - "value": "315.0", - "unit": "kWH" - } - } - } - ] - } - ], - "billing": { - "email": "sheru@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "title": "units consumed", - "price": { "value": "40", "currency": "INR" } - }, - { - "title": "cgst", - "price": { "value": "4", "currency": "INR" } - }, - { - "title": "sgst", - "price": { "value": "4", "currency": "INR" } - } - ] - }, - "payments": [ - { - "url": "https://payment.gateway.in", - "type": "PRE-ORDER", - "status": "NOT-PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ] - } - } -} -``` - -## Fulfillment (Payment and Order Confirmation) - -Provider has to give confirmation to the fulfillment terms and conditions if he chooses Manual Discharge -Then, the User will check the order details and confirm the order with payment (might also update the order) -Post payment UEI will activate the confirmed order - -### User-side Actions - -- Confirms(\updates) the order by checking the order details and agreeing to fulfillment terms -- User pays the price after checking the confirmation of provider to the terms and conditions -- Post fulfillment provider gets notified and UEI will lock the contract and activates the order - -### Provider-side Actions - -- If provider chosen Manual Discharge: Provider has to confirm that he accepts the terms and conditions upon that only user can confirm the order and satisfy the fulfillment terms. -- Receive order confirmation from the user -- Send active confirmed order to the user - -## Status Updates and Monitoring - -### User-side Actions - -- Request to fetch the latest order status or amount of discharged energy. -- Sends remainders to the provider for upcoming energy discharge (manual or automatic) - -#### Provider-side Actions - -- Provide the latest status of the order to the user - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Request to accept the terms and conditions - Provider->>User: Confirms the agreement to the terms and conditions. - User->>Provider: Confirms the order and pays the the quoted price and activates the order - Provider->>User: Send active confirmed order - User->>Provider: Request for latest status of order / amount of energy discharged - Provider->>User: Sends the latest status of order - User->>Provider: Sends remainders to the provider for upcoming energy discharge -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->>Provider 1 (BPP): BAP requests confirmation to terms and conditions - Provider 1 (BPP)->>User Platform (BAP): BPP confirms to the terms and conditions (confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP requests for order confirmation and payment update (on_confirm) - User Platform (BAP)->>Provider 1 (BPP): BAP confirms the order by fulfillment (confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP sends activation of confirmed order (on_confirm) - User Platform (BAP)->>Provider 1 (BPP): Request for updates on status of order / amount of energy discharged (status) - Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) - User Platform (BAP)->>Provider 1 (BPP): Remainder to the BPP of an upcoming discharge of energy (status) - Provider 1 (BPP)->>User Platform (BAP): BPP acknowledges the remainder from BAP (on_status) -``` - -### Example Scenarios for entire workflow - -#### Example 1 - -- Sheru searches for 100 kWH of energy and automatic discharge. (search) -- UEI Protocol provides a list of catalogs including individuals/crowds which falls under the search category. (on_search) -- Sheru selects an individual for energy purchase and selects the amount of energy required. (select) -- Individual sends the draft order and quoted price with breakdown. (on_select) -- Sheru provides the billing details and consent form (init). -- Individual accepts to consent and sends the payment amount with payment link (on_init). -- Sheru confirms the order (confirm). -- UEI notifies Sheru about order confirmation and activates the order (on_confirm). -- Energy is discharged after confirmation. -- Sheru checks the status of the amount of discharged energy (status). - -#### Example 2 - -- Sheru needs 200 kWH of energy and manual discharge. -- UEI provides a list of catalogs including individuals/crowds. -- Sheru selects an individual for energy purchase. -- Individual sends the quoted price with breakdown -- Sheru provides the billing deetails (init). -- BPP calculates the quote and sends the payment amount and payment link (on_init). -- Individual confirms commitment to fulfillment terms and conditions (confirm). -- UEI notifies Sheru about individual's confirmation (on_confirm). -- Sheru pays the bill and confirms the payment (confirm). -- UEI BPP confirms fulfillment and payment (on_confirm). -- Energy discharging starts -- Sheru checks the status of the discharged energy (status). diff --git a/docs/example-implementations/general-energy-transaction-2.md b/docs/example-implementations/general-energy-transaction-2.md deleted file mode 100644 index e3c9ead..0000000 --- a/docs/example-implementations/general-energy-transaction-2.md +++ /dev/null @@ -1,281 +0,0 @@ -# General Energy Transaction Workflow #2 - -## Overview - -This implementation guide outlines the energy transaction process where Sheru (Energy Aggregator) borrows energy storage devices or batteries from individuals or crowds to store and use up the energy when required, using the Beckn Protocol. The guide provides step-by-step instructions on how Sheru interacts with the Unified Energy Interface (UEI) to discover energy storage devices/batteries, select providers, initiate transactions, confirm orders, and monitor status updates. - -## Important NOTE : - -- During Automatic, the provider will sign a consent form such that upon the initiation of the energy transaction, access to both charging and discharging the energy from the battery or energy storage devices is completely given to UEI, until the transaction is completed. -- Since, only UEI has the control/access to charge and discharge the battery or energy storage devices, there is no need to use penalties. -- During Manual, the control/access is not given to UEI; rather, the provider him/herself will charge or discharge the energy. -- In this case, if the provider has not satisfied the terms and conditions he/she agreed upon during the transaction, then the provider has to pay the penalty for the amount of energy he/she was not able to provide. -- The form of energy charging and discharging, either automatic or manual, is completely the provider's choice, which is a `pre-select` feature for the provider. - -Bear in mind that this is just an example workflow for a simple Energy transaction where Sheru borrows the Energy Storage from the individuals/crowd using UEI. - -(Note: Here, User -> Sheru and Provider -> Individual/Crowd who is providing energy storage device or batteries and UEI -> Unified Energy Interface) - -A typical workflow for EV Charging & Battery Swapping consists of the following steps: - -#### Step 1: Discovery of Electricity - -- The user searches providers who agree to the mode of Automatic or else Manual (which will act as a filter for search) - 1. Automatic - - Complete control of ?charge and discharge is given to the UEI. - 2. Manual - - Commit to providing the required energy storage for charging and return the stored energy while discharging; penalties for non-compliance are applicable. -- The user searches for providers who provides the greater than equal to amount of energy needed to be stored and used in kWH (which will act as a filter for the search). - -#### Step 2: Provider platform sends catalogs of Individuals nearby - -The UEI sends all the catalogs to the user. -The list of catalogs consists of: - -- Individuals/Crowds from whom energy can be bought (Name, Phone Number, Email ID) -- Mode of Energy storage, provider has agreed upon (i.e, Automatic discharge / Manual Discharge) -- Available areas/locations for energy purchases -- Available amount of energy storage space (in kWH) -- Tariff per unit (in INR/kWH) -- Time of storage - -#### Step 3: Sheru selects a Provider - -The user selects a suitable individual/crowd provider from the list of provided catalogs, from either Automatic or else Manual -The user selects the required amount of energy storage space (in kWH) -The UEI notifies the chosen individual that Sheru intends to store energy - -#### Step 4: Provider sends the draft order with quoted price - -The provider acknowledges the notification sent by UEI for selling energy -The provider will receive the order based on the user's requirements. The user gets the quoted price, including the breakdown of the price details. The breakdown should include: - -1. Tariff per unit (i.e., INR/kWH), might change based on location of Energy Provider -2. Amount of energy storage requested (in kWH) -3. Price for energy (in INR) : (Amount of energy storage requested) x (Tariff per unit) -4. Taxes: CGST & SGST - -#### Step 5: Initiating the transaction - -The user initializes the order by providing the billing details such as (Name, Phone Number, Email ID) -(in the case of Automatic Providers) The UEI requests the provider to accept the consent form (i.e., a check box) to take control/access to charge and discharging the battery/energy storage during Automatic - -#### Step 6: Provider sends draft order - -(In case of Automatic) The provider signs the consent letter (i.e., ticks the check box), which implies the provider is giving control to UEI for charging and discharging their battery or energy storage. -The provider sends the draft order with the payment link and fulfillment terms to the user's side. -A payment link is sent to user to complete the payment - -#### Step 7: Provider accepts the terms and conditions - -Provider confirms to satisfy the fulfillment terms and conditions (confirm) -If Provider selects Automatic discharge, no additional confirmation is needed. -If Provider selects Manual Discharge: - -- Provider confirms commitment to fulfillment terms. -- If energy storage provision fails, a penalty is applicable. - -#### Step 8: User confirms the order by payment fulfillment - -User sees the confirmation of the provider for the fulfillment terms and conditions. (on_confirm) -Upon that, the user pays the quoted price for the draft order and activates the order by agreeing to the payment -The confirmation will sent to the provider through UEI, saying that user has paid the price and satisfies the fulfillment terms (confirm) -The UEI will activate the order after fulfillment of payment and confirmation of the user and provider, respectively. (on_confirm) - -#### Step 9: User checks the status of the order - -The user requests to fetch the order status/amount of charged/discharged energy in the battery - -#### Step 10: UEI sends the status of the order - -UEI provides status updates for the order (i.e., the amount of energy that has been charged/discharged so far). -UEI can send reminders to the provider for upcoming energy charging / discharging (manual or automatic). - -## Search (Searching for Provider) - -1. The user declares the intent to store and use up energy when required, to the providers -2. Providers publish the catalogs - -### User-side Actions - -A user can declare their intent to buy energy in many ways, like: - -- Searching for Providers based on location -- Searching for Providers based on mode (Automatic/Manual) -- Searching for Providers based on quantity of energy storage space required (in kWH) -- Searching for Providers based on tariff per unit (in INR/kWH) -- Searching for Providers based on Name or Code of provider -- Searching for Providers based on ratings -- Viewing the catalog/details of services provided by a particular provider - -### Provider-side Actions - -In this interaction, the Provider publishes their catalog. The catalog mainly consits of : - -- Individuals or crowds from whom energy can be bought. -- Full Name, Phone Number, Email-ID -- Locations where energy can be purchased (Address) -- Mode of charge and discharge (Automatic or Manual) -- Available amount of energy storage space (in kWH) -- Tariff per unit and available amount of energy - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Declare Intent to buy energy - Provider->>User: Publish Catalog of providers -``` - -### Beckn Protocol API Workflow - -In beckn protocol, the search intent generated by the User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs returns their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. - -```mermaid - sequenceDiagram - User Platform (BAP)->>Gateway (BG): Declare Intent to store energy ( search ) - Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) - Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kWH energy storagr space required (200 OK) - Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to store energy (search) - Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to store energy (search) - Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to store energy (search) - Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) - Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) - Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) -``` - -## Select and On_Select - -1. User selects a Provider from the list which satisfies the requirements -2. User selects the required amount of energy they want to store (in kWH) -3. The BAP notifies the chosen Provider, so the provider sends the draft order with quoted price - -### User-side Actions - -- Selecting Provider after viewing catalogs and -- Selecting the required amount of energy needs to be stored -- BAP notifies the provider - -### Provider-side Actions - -- Receive user's selection -- Provider (BPP) will send quoted price along with breakdown for payment to the user for the service requested -- Breakdown: - 1. Tariff per unit (i.e., INR/kWH) - 2. Amount of energy storage space requested (in kWH) - 3. Price for energy (in INR) - 4. Taxes: CGST & SGST - -### Logical Workflow - -The below diagram illustrates the logical interactions between a User and Provider during the Selection stage - -```mermaid - sequenceDiagram - User->>Provider: Selects a provider and required amount of energy storage (in kWH) - Provider->>User: Receives user selection and sends the draft order with quoted price and breakdown -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): Select Provider after seeing catalogs of all providers and the energy storage required (select) - Provider 1 (BPP)->>User Platform (BAP): BPP sends the draft order with quoted price and breakdown (on_select) -``` - -## Order Initialization - -In this stage, the User provides the required information and initiates the order - -### User-side Actions - -- User provides the billing details `Name`, `Email ID` and `Phone Number` -- (In the case of Automatic) The user sends the consent form to the provider for acceptance. -- User updates the payment details and initiates the order - -### Provider-side Actions - -- Request for billing details -- Receive billing details from the user and -- Provider accepts the consent form and signs it -- Send draft order with payment and fulfillment terms -- Sends the payment link to the user along with breakdown of price and taxes - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Provides billing details like Name, Email ID and Phone Number - User->>Provider: Sends the consent form to provider (in case of Automatic) - Provider->>User: Signs the consent and sends draft order with payment transcript and fulfillment terms - User->>Provider: Updates payment details and initiates the order - Provider->>User: Sends the payment link to the user -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP sends the consent form and billing details (init) - Provider 1 (BPP)->>User Platform (BAP): BPP accepts the consent form and sends draft order with breakdown and fulfillment terms (on_init) - User Platform (BAP)->> Provider 1 (BPP): BAP Updates payment details and initiates the order - Provider 1 (BPP)->>User Platform (BAP): BPP Sends the payment link to the BAP -``` - -## Fulfillment (Payment and Order Confirmation) - -The provider has to confirm the fulfillment terms and conditions if he chooses Manual -Then, the User will check the order details and confirm the order with payment (might also update the order) -Post-payment, UEI will activate the confirmed order - -### User-side Actions - -- Confirms(\updates) the order by checking the order details and agreeing to fulfillment terms -- User pays the price after checking the confirmation of provider's terms and conditions -- Post fulfillment provider gets notified and UEI will lock the contract and activate the order - -### Provider-side Actions - -- If provider chosen Manual discharge, the provider has to confirm that he accepts the terms and conditions upon that only user can confirm the order and satisfy the fulfillment terms. -- Receive order confirmation from the user -- Send active, confirmed order to the user - -## Status Updates and Monitoring - -### User-side Actions - -- Request to fetch the latest order status or amount of charged/discharged energy in the storage. -- Sends remainders to the provider for upcoming energy chagre/discharge (manual or automatic) - -#### Provider-side Actions - -- Provide the latest status of the order to the user - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Request to accept the terms and conditions - Provider->>User: Confirms the agreement to the terms and conditions. - User->>Provider: Confirms the order and pays the the quoted price and activates the order - Provider->>User: Send active confirmed order - User->>Provider: Request for latest status of order / amount of energy charged/discharged - Provider->>User: Sends the latest status of order - User->>Provider: Sends remainders to the provider for upcoming energy charge/discharge -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->>Provider 1 (BPP): BAP requests confirmation of terms and conditions - Provider 1 (BPP)->>User Platform (BAP): BPP confirms to the terms and conditions (confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP requests for order confirmation and payment update (on_confirm) - User Platform (BAP)->>Provider 1 (BPP): BAP confirms the order by fulfillment (confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP sends activation of confirmed order (on_confirm) - User Platform (BAP)->>Provider 1 (BPP): Request for updates on status of order or amount of energy charged/discharged (status) - Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) - User Platform (BAP)->>Provider 1 (BPP): Remainder to the BPP of an upcoming charge/discharge of energy (status) - Provider 1 (BPP)->>User Platform (BAP): BPP acknowledges the remainder from BAP (on_status) -``` diff --git a/examples/ev-charging/cancel/cancel-request.json b/examples/ev-charging/cancel/cancel-request.json index 4435910..69d56f0 100644 --- a/examples/ev-charging/cancel/cancel-request.json +++ b/examples/ev-charging/cancel/cancel-request.json @@ -22,7 +22,7 @@ "order": { "cancellation_reason_id": "5", "descriptor": { - "short_desc": "Can't make it on time" + "short_desc": "can't attend booking" }, "order_id": "6743e9e2-4fb5-487c-92b7" } diff --git a/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json b/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json new file mode 100644 index 0000000..2b68b00 --- /dev/null +++ b/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json @@ -0,0 +1,200 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "status": "CANCELLED", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + }, + "allocated": { + "measure": { + "value": "2", + "unit": "kWh" + } + } + }, + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charger-error" + } + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "-12", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "payment refund" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-12", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} \ No newline at end of file diff --git a/examples/ev-charging/cancel/on_cancel-request.json b/examples/ev-charging/cancel/on_cancel-request.json index 055b12a..2922a84 100644 --- a/examples/ev-charging/cancel/on_cancel-request.json +++ b/examples/ev-charging/cancel/on_cancel-request.json @@ -132,14 +132,14 @@ }, "quote": { "price": { - "value": "40", + "value": "-32", "currency": "INR" }, "breakup": [ { "item": { "descriptor": { - "name": "Estimated units consumed" + "name": "payment refund" }, "quantity": { "selected": { @@ -151,7 +151,7 @@ } }, "price": { - "value": "32", + "value": "-32", "currency": "INR" } } @@ -172,6 +172,22 @@ } } } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } ] } } diff --git a/examples/ev-charging/confirm/on_confirm-request.json b/examples/ev-charging/confirm/on_confirm-request.json index cf7249d..b2b3f57 100644 --- a/examples/ev-charging/confirm/on_confirm-request.json +++ b/examples/ev-charging/confirm/on_confirm-request.json @@ -81,10 +81,29 @@ }, "stops": [ { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + }, + "instructions": { + "name": "Charging instructions", + "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" + } + }, + { + "type": "end", "time": { + "timestamp": "01-06-2023 10:30:00", "range": { - "start": "10:00", - "end": "10:30" + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" } } } @@ -171,6 +190,22 @@ } } } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } ] } } diff --git a/examples/ev-charging/init/on_init-request.json b/examples/ev-charging/init/on_init-request.json index 1ea303d..e6f6f29 100644 --- a/examples/ev-charging/init/on_init-request.json +++ b/examples/ev-charging/init/on_init-request.json @@ -80,11 +80,15 @@ }, "stops": [ { + "type": "start", "time": { - "range": { - "start": "10:00", - "end": "10:30" - } + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" } } ], @@ -130,7 +134,7 @@ }, "quote": { "price": { - "value": "40", + "value": "32", "currency": "INR" }, "breakup": [ @@ -171,6 +175,22 @@ } } } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } ] } } diff --git a/examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json b/examples/ev-charging/rating/on_rating-request.json similarity index 69% rename from examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json rename to examples/ev-charging/rating/on_rating-request.json index 8e376eb..3386df8 100644 --- a/examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json +++ b/examples/ev-charging/rating/on_rating-request.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "on_cancel", + "action": "on_rating", "location": { "country": { "name": "India", @@ -12,18 +12,19 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", + "bpp_id": "chargezone-energy-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "order": { - "id": "5f0acfd5", - "cancellation_reason_id": "5", - "descriptor": { - "code": "grid-down" + "feedback_form": { + "xinput": { + "form": { + "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" + }, + "required": "false" } } } diff --git a/examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json b/examples/ev-charging/rating/rating-request.json similarity index 73% rename from examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json rename to examples/ev-charging/rating/rating-request.json index 8e376eb..5d947d1 100644 --- a/examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json +++ b/examples/ev-charging/rating/rating-request.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "on_cancel", + "action": "rating", "location": { "country": { "name": "India", @@ -12,19 +12,19 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", + "bpp_id": "chargezone-energy-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "order": { - "id": "5f0acfd5", - "cancellation_reason_id": "5", - "descriptor": { - "code": "grid-down" + "ratings": [ + { + "id": "6743e9e2-4fb5-487c-92b7", + "rating_category": "charger", + "value": "5" } - } + ] } } \ No newline at end of file diff --git a/examples/ev-charging/search/on_search-request.json b/examples/ev-charging/search/on_search-request.json index 93f2d31..87f598f 100644 --- a/examples/ev-charging/search/on_search-request.json +++ b/examples/ev-charging/search/on_search-request.json @@ -79,6 +79,18 @@ "fulfillment_ids": [ "1", "2" + ], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } + } ] } ], @@ -88,11 +100,15 @@ "type": "CHARGING", "stops": [ { + "type": "start", "time": { - "range": { - "start": "10:00", - "end": "10:30" - } + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" } } ], @@ -138,11 +154,15 @@ "type": "CHARGING", "stops": [ { + "type": "start", "time": { - "range": { - "start": "10:30", - "end": "11:00" - } + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" } } ], @@ -216,6 +236,18 @@ "fulfillment_ids": [ "3", "4" + ], + "add_ons": [ + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "name": "Free tyre pressure check" + }, + "price": { + "value": "0", + "currency": "INR" + } + } ] } ], diff --git a/examples/ev-charging/search/search-request.json b/examples/ev-charging/search/search-request.json index a9adf5b..a678d60 100644 --- a/examples/ev-charging/search/search-request.json +++ b/examples/ev-charging/search/search-request.json @@ -44,4 +44,4 @@ } } } -} +} \ No newline at end of file diff --git a/examples/ev-charging/select/on_select-request.json b/examples/ev-charging/select/on_select-request.json index ba6ec49..e21497a 100644 --- a/examples/ev-charging/select/on_select-request.json +++ b/examples/ev-charging/select/on_select-request.json @@ -56,6 +56,17 @@ } } } + }, + { + "id": "pe-charging-01-addon-1", + "descriptor": { + "code": "add-on-item", + "name": "Free car wash" + }, + "price": { + "value": "0", + "currency": "INR" + } } ], "fulfillments": [ @@ -64,11 +75,15 @@ "type": "CHARGING", "stops": [ { + "type": "start", "time": { - "range": { - "start": "10:00", - "end": "10:30" - } + "timestamp": "01-06-2023 10:00:00" + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00" } } ], @@ -134,6 +149,17 @@ "value": "32", "currency": "INR" } + }, + { + "item": { + "descriptor": { + "name": "Free car wash" + } + }, + "price": { + "value": "0", + "currency": "INR" + } } ] } diff --git a/examples/ev-charging/status/on_status-request.json b/examples/ev-charging/status/on_status-request.json index 0760214..f2ac2a1 100644 --- a/examples/ev-charging/status/on_status-request.json +++ b/examples/ev-charging/status/on_status-request.json @@ -81,10 +81,25 @@ }, "stops": [ { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", "time": { + "timestamp": "01-06-2023 10:30:00", "range": { - "start": "10:00", - "end": "10:30" + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" } } } @@ -131,7 +146,7 @@ }, "quote": { "price": { - "value": "40", + "value": "32", "currency": "INR" }, "breakup": [ @@ -171,6 +186,22 @@ } } } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } ] } } diff --git a/examples/ev-charging/update/on_update-request-charging-end.json b/examples/ev-charging/update/on_update-request-charging-end.json new file mode 100644 index 0000000..a188fed --- /dev/null +++ b/examples/ev-charging/update/on_update-request-charging-end.json @@ -0,0 +1,208 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charging-ended" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} \ No newline at end of file diff --git a/examples/ev-charging/update/on_update-request-charging-start.json b/examples/ev-charging/update/on_update-request-charging-start.json new file mode 100644 index 0000000..2c5b86d --- /dev/null +++ b/examples/ev-charging/update/on_update-request-charging-start.json @@ -0,0 +1,208 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + }, + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + }, + "type": "CHARGING", + "state": { + "descriptor": { + "code": "charging-started" + } + }, + "stops": [ + { + "type": "start", + "location": { + "gps": "12.423423,77.325647" + }, + "time": { + "timestamp": "01-06-2023 10:00:00", + "range": { + "start": "01-06-2023 10:00:00", + "end": "01-06-2023 10:10:00" + } + } + }, + { + "type": "end", + "time": { + "timestamp": "01-06-2023 10:30:00", + "range": { + "start": "01-06-2023 10:30:00", + "end": "01-06-2023 10:40:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + }, + "payments": [ + { + "type": "PRE-ORDER", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ], + "cancellation_terms": [ + { + "fulfillment_state": { + "descriptor": { + "code": "charging-start" + } + }, + "cancellation_fee": { + "percentage": "30%" + }, + "external_ref": { + "mimetype": "text/html", + "url": "https://chargezone.in/charge/tnc.html" + } + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/select-request.json b/examples/ev-charging/update/update-request-charging-end.json similarity index 70% rename from examples/microgrids/individuals-to-aggregator/select/select-request.json rename to examples/ev-charging/update/update-request-charging-end.json index 54d26ba..4ec9c50 100644 --- a/examples/microgrids/individuals-to-aggregator/select/select-request.json +++ b/examples/ev-charging/update/update-request-charging-end.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "select", + "action": "update", "location": { "country": { "name": "India", @@ -12,25 +12,23 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", + "bpp_id": "chargezone-energy-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { + "update_target": "order.fulfillments[0].state", "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], "fulfillments": [ { - "id": "1" + "id": "1", + "state": { + "descriptor": { + "code": "end-charging" + } + } } ] } diff --git a/examples/microgrids/aggregator-to-individuals/select/select-request.json b/examples/ev-charging/update/update-request-charging-start.json similarity index 68% rename from examples/microgrids/aggregator-to-individuals/select/select-request.json rename to examples/ev-charging/update/update-request-charging-start.json index 54d26ba..f5d5747 100644 --- a/examples/microgrids/aggregator-to-individuals/select/select-request.json +++ b/examples/ev-charging/update/update-request-charging-start.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "select", + "action": "update", "location": { "country": { "name": "India", @@ -12,25 +12,24 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", + "bpp_id": "chargezone-energy-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { + "update_target": "order.fulfillments[0].state", "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], "fulfillments": [ { - "id": "1" + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "code": "start-charging" + } + } } ] } diff --git a/examples/homes-discoms/confirm/confirm-request.json b/examples/homes-discoms/confirm/confirm-request.json deleted file mode 100644 index 8879e19..0000000 --- a/examples/homes-discoms/confirm/confirm-request.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "240005" - }, - "items": [ - { - "id": "a23f2fdfbbb8ac" - } - ], - "quote": { - "breakup": [ - { - "price": { - "value": "330" - }, - "title": "Fixed Charge: 3 units, 110 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "80" - }, - "title": "FAC Charge: 200 units, 0.4 rupees per unit" - }, - { - "price": { - "value": "126" - }, - "title": "Tax" - } - ], - "price": { - "currency": "INR", - "value": "1936" - } - }, - "payments": [ - { - "collected_by": "BPP", - "params": { - "amount": "1936", - "currency": "INR" - }, - "status": "PAID", - "type": "PRE-FULFILLMENT" - } - ], - "fulfillments": [ - { - "customer": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - } - } - ], - "billing": { - "name": "H.No 4323", - "address": "3rd main, 4th cross, ABC Apartments", - "city": "udupi" - } - } - } -} diff --git a/examples/homes-discoms/confirm/on_confirm-request.json b/examples/homes-discoms/confirm/on_confirm-request.json deleted file mode 100644 index 213eb85..0000000 --- a/examples/homes-discoms/confirm/on_confirm-request.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "a23f2fdfbbb8ac", - "status": "COMPLETE", - "provider": { - "descriptor": { - "code": "MESCOM", - "name": "Mangalore Electricity Supply Company Ltd", - "short_desc": "MESCOM Ltd", - "images": [ - { - "url": "https://www.mescom.gov/content/assets/images/header/logo.png" - } - ] - }, - "id": "240005" - }, - "items": [ - { - "id": "a23f2fdfbbb8ac", - "descriptor": { - "code": "energy" - }, - "tags": [ - { - "descriptor": { - "name": "energy tariff" - }, - "list": [ - { - "descriptor": { - "name": "Fixed charges" - }, - "value": "110 rupees for 3 units" - }, - { - "descriptor": { - "name": "Energy charges" - }, - "value": "7 rupees per unit" - }, - { - "descriptor": { - "name": "FAC charges" - }, - "value": "0.4 per unit" - } - ] - } - ] - } - ], - "fulfillments": [ - { - "customer": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "state": { - "descriptor": { - "name": "bill has been paid" - } - } - } - ], - "billing": { - "name": "H.No 4323", - "address": "3rd main, 4th cross, ABC Apartments", - "city": "udupi" - }, - "quote": { - "breakup": [ - { - "price": { - "value": "330" - }, - "title": "Fixed Charge: 3 units, 110 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "80" - }, - "title": "FAC Charge: 200 units, 0.4 rupees per unit" - }, - { - "price": { - "value": "126" - }, - "title": "Tax" - } - ], - "price": { - "currency": "INR", - "value": "1936" - } - }, - "payments": [ - { - "collected_by": "BPP", - "params": { - "amount": "1936", - "currency": "INR" - }, - "status": "PAID", - "type": "PRE-FULFILLMENT", - "time": { - "range": { - "start": "14-06-2023 00:00:00", - "end": "30-06-2023 23:59:59" - } - } - } - ] - } - } -} diff --git a/examples/homes-discoms/init/init-request.json b/examples/homes-discoms/init/init-request.json deleted file mode 100644 index dc99ef4..0000000 --- a/examples/homes-discoms/init/init-request.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "240005" - }, - "items": [ - { - "id": "a23f2fdfbbb8ac", - "quantity": { - "required": { - "value": "315", - "unit": "kWH" - } - } - } - ], - "fulfillments": [ - { - "customer": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - } - } - ], - "billing": { - "name": "H.No 4323", - "address": "3rd main, 4th cross, ABC Apartments", - "city": "udupi" - } - } - } -} diff --git a/examples/homes-discoms/init/on_init-request.json b/examples/homes-discoms/init/on_init-request.json deleted file mode 100644 index 9d45aa4..0000000 --- a/examples/homes-discoms/init/on_init-request.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "descriptor": { - "code": "MESCOM", - "name": "Mangalore Electricity Supply Company Ltd", - "short_desc": "MESCOM Ltd", - "images": [ - { - "url": "https://www.mescom.gov/content/assets/images/header/logo.png" - } - ] - }, - "id": "240005" - }, - "items": [ - { - "id": "a23f2fdfbbb8ac", - "descriptor": { - "code": "energy" - }, - "tags": [ - { - "descriptor": { - "name": "energy tariff" - }, - "list": [ - { - "descriptor": { - "name": "Fixed charges" - }, - "value": "110 rupees for 3 units" - }, - { - "descriptor": { - "name": "Energy charges" - }, - "value": "7 rupees per unit" - }, - { - "descriptor": { - "name": "FAC charges" - }, - "value": "0.4 per unit" - } - ] - } - ] - } - ], - "fulfillments": [ - { - "customer": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "state": { - "descriptor": { - "name": "bill has been generated" - } - } - } - ], - "billing": { - "name": "H.No 4323", - "address": "3rd main, 4th cross, ABC Apartments", - "city": "udupi" - }, - "quote": { - "breakup": [ - { - "price": { - "value": "330" - }, - "title": "Fixed Charge: 3 units, 110 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "80" - }, - "title": "FAC Charge: 200 units, 0.4 rupees per unit" - }, - { - "price": { - "value": "126" - }, - "title": "Tax" - } - ], - "price": { - "currency": "INR", - "value": "1936" - } - }, - "payments": [ - { - "collected_by": "BPP", - "url": "https://gateway.mescom.gov", - "params": { - "amount": "1936", - "currency": "INR" - }, - "status": "NOT-PAID", - "type": "PRE-FULFILLMENT", - "time": { - "range": { - "start": "14-06-2023 00:00:00", - "end": "30-06-2023 23:59:59" - } - } - } - ] - } - } -} diff --git a/examples/homes-discoms/status/on_status-request.json b/examples/homes-discoms/status/on_status-request.json deleted file mode 100644 index 82d3a81..0000000 --- a/examples/homes-discoms/status/on_status-request.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "a23f2fdfbbb8ac", - "provider": { - "descriptor": { - "code": "MESCOM", - "name": "Mangalore Electricity Supply Company Ltd", - "short_desc": "MESCOM Ltd", - "images": [ - { - "url": "https://www.mescom.gov/content/assets/images/header/logo.png" - } - ] - }, - "id": "240005" - }, - "items": [ - { - "id": "a23f2fdfbbb8ac", - "descriptor": { - "code": "energy" - }, - "tags": [ - { - "descriptor": { - "name": "energy tariff" - }, - "list": [ - { - "descriptor": { - "name": "Fixed charges" - }, - "value": "110 rupees for 3 units" - }, - { - "descriptor": { - "name": "Energy charges" - }, - "value": "7 rupees per unit" - }, - { - "descriptor": { - "name": "FAC charges" - }, - "value": "0.4 per unit" - } - ] - } - ] - } - ], - "fulfillments": [ - { - "customer": { - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "person": { - "id": "0065716000", - "name": "Joe Adam" - } - }, - "state": { - "descriptor": { - "name": "bill overdue" - } - } - } - ], - "billing": { - "name": "H.No 4323", - "address": "3rd main, 4th cross, ABC Apartments", - "city": "udupi" - }, - "quote": { - "breakup": [ - { - "price": { - "value": "330" - }, - "title": "Fixed Charge: 3 units, 110 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "700" - }, - "title": "Energy Charges: 100 units, 7 rupees per unit" - }, - { - "price": { - "value": "80" - }, - "title": "FAC Charge: 200 units, 0.4 rupees per unit" - }, - { - "price": { - "value": "126" - }, - "title": "Tax" - } - ], - "price": { - "currency": "INR", - "value": "1936" - } - }, - "payments": [ - { - "collected_by": "BPP", - "url": "https://gateway.mescom.gov", - "params": { - "amount": "1936", - "currency": "INR" - }, - "status": "NOT-PAID", - "type": "PRE-FULFILLMENT", - "time": { - "range": { - "start": "14-06-2023 00:00:00", - "end": "30-06-2023 23:59:59" - } - } - } - ] - } - } -} diff --git a/examples/homes-discoms/status/status-request.json b/examples/homes-discoms/status/status-request.json deleted file mode 100644 index 5668b1f..0000000 --- a/examples/homes-discoms/status/status-request.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "bescom-bpp.com", - "bpp_uri": "https://api.bescom-bpp.com/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "a23f2fdfbbb8ac" - } -} diff --git a/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json b/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json deleted file mode 100644 index f3578e8..0000000 --- a/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "status": "CANCELLED", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-cancelled", - "name": "energy transaction cancelled" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json deleted file mode 100644 index 2d3eae2..0000000 --- a/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "xinput": { - "head": { - "descriptor": { - "name": "Terms and Conditions" - }, - "index": { - "min": 0, - "cur": 0, - "max": 0 - }, - "headings": [ - "Terms and Conditions" - ] - }, - "form": { - "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", - "mime_type": "text/html", - "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", - "resubmit": false, - "multiple_sumbissions": false - }, - "required": true - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json deleted file mode 100644 index ea5e78c..0000000 --- a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-confirmed", - "name": "energy transaction confirmed" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json deleted file mode 100644 index f3d78a1..0000000 --- a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-confirmed", - "name": "energy transaction confirmed" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json deleted file mode 100644 index 5745d89..0000000 --- a/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "xinput": { - "head": { - "descriptor": { - "name": "Dispatch Consent" - }, - "index": { - "min": 0, - "cur": 0, - "max": 0 - }, - "headings": [ - "Dispatch Consent" - ] - }, - "form": { - "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", - "mime_type": "text/html", - "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", - "resubmit": false, - "multiple_sumbissions": false - }, - "required": true - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json deleted file mode 100644 index 11e573a..0000000 --- a/examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ] - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json deleted file mode 100644 index af1600b..0000000 --- a/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-initiated", - "name": "energy transaction initiated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json deleted file mode 100644 index 9003a30..0000000 --- a/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-initiated", - "name": "energy transaction initiated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json deleted file mode 100644 index 6628fe5..0000000 --- a/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "descriptor": { - "code": "energy" - }, - "providers": [ - { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - }, - { - "id": "5f0acfd5-grid-2", - "descriptor": { - "name": "Storage Grid 2" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "350", - "unit": "kWH" - } - } - }, - "locations": [ - "2" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "315.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json deleted file mode 100644 index 4b34407..0000000 --- a/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "descriptor": { - "code": "energy" - }, - "providers": [ - { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - }, - { - "id": "5f0acfd5-grid-2", - "descriptor": { - "name": "Storage Grid 2" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "350", - "unit": "kWH" - } - } - }, - "locations": [ - "2" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "315.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/search-request.json b/examples/microgrids/aggregator-to-individuals/search/search-request.json deleted file mode 100644 index ae048fc..0000000 --- a/examples/microgrids/aggregator-to-individuals/search/search-request.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "available": { - "value": "300.0", - "unit": "kWH" - } - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json deleted file mode 100644 index dc5f71b..0000000 --- a/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json deleted file mode 100644 index 1e355cc..0000000 --- a/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "315.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json deleted file mode 100644 index badf39a..0000000 --- a/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-in-progress", - "name": "200 out of 300 kWH transferred" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json deleted file mode 100644 index 3943afe..0000000 --- a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-not-started", - "name": "Manual dispatch hasn't begun yet" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - }, - { - "title": "Penalty for late manual dispatch of energy", - "price": { - "value": "2000", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json deleted file mode 100644 index 6efb284..0000000 --- a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-in-progress", - "name": "200 out of 300 kWH transferred" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/status-request.json b/examples/microgrids/aggregator-to-individuals/status/status-request.json deleted file mode 100644 index 2897f11..0000000 --- a/examples/microgrids/aggregator-to-individuals/status/status-request.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "5f0acfd5" - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/support/on_support-request.json b/examples/microgrids/aggregator-to-individuals/support/on_support-request.json deleted file mode 100644 index a32c58b..0000000 --- a/examples/microgrids/aggregator-to-individuals/support/on_support-request.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "1800 1080", - "email": "customer.care@sheru.com", - "url": "https://www.sheru.com/helpdesk" - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/support/support-request.json b/examples/microgrids/aggregator-to-individuals/support/support-request.json deleted file mode 100644 index 6587a17..0000000 --- a/examples/microgrids/aggregator-to-individuals/support/support-request.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "+919876543210", - "email": "support@sheru.com" - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/update/on_update-request.json b/examples/microgrids/aggregator-to-individuals/update/on_update-request.json deleted file mode 100644 index 73882b5..0000000 --- a/examples/microgrids/aggregator-to-individuals/update/on_update-request.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "200.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-updated", - "name": "energy transaction updated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-1600" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "200", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-1600", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/update/update-request.json b/examples/microgrids/aggregator-to-individuals/update/update-request.json deleted file mode 100644 index 20274fa..0000000 --- a/examples/microgrids/aggregator-to-individuals/update/update-request.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "items": [ - { - "descriptor": { - "code": "energy" - }, - "quantity": { - "available": { - "value": "200.0", - "unit": "kWH" - } - } - } - ] - }, - "updated_target": "order.items[0].quantity.available.value" - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json b/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json deleted file mode 100644 index 4f99bce..0000000 --- a/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "status": "CANCELLED", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-cancelled", - "name": "energy transaction cancelled" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json deleted file mode 100644 index 9a052c3..0000000 --- a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be given" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json deleted file mode 100644 index 3169216..0000000 --- a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be given" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json deleted file mode 100644 index d2de883..0000000 --- a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-confirmed", - "name": "energy transaction confirmed" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json deleted file mode 100644 index 487d0a5..0000000 --- a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-confirmed", - "name": "energy transaction confirmed" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json b/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json deleted file mode 100644 index bf1fa18..0000000 --- a/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "xinput": { - "form_response": { - "status": true, - "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/init-request.json b/examples/microgrids/individuals-to-aggregator/init/init-request.json deleted file mode 100644 index 1b04d44..0000000 --- a/examples/microgrids/individuals-to-aggregator/init/init-request.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5" - }, - "items": [ - { - "id": "5f0acfd5-grid-1" - } - ], - "fulfillments": [ - { - "id": "1" - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json deleted file mode 100644 index 3de7bd0..0000000 --- a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-initiated", - "name": "energy transaction initiated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be given" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "head": { - "descriptor": { - "name": "Dispatch Consent" - }, - "index": { - "min": 0, - "cur": 0, - "max": 1 - }, - "headings": [ - "Dispatch Consent", - "Terms and Conditions" - ] - }, - "form": { - "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", - "mime_type": "text/html", - "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", - "resubmit": false, - "multiple_sumbissions": false - }, - "required": true - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json deleted file mode 100644 index c6c74ec..0000000 --- a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-initiated", - "name": "energy transaction initiated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be given" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "head": { - "descriptor": { - "name": "Terms and Conditions" - }, - "index": { - "min": 0, - "cur": 1, - "max": 1 - }, - "headings": [ - "Dispatch Consent", - "Terms and Conditions" - ] - }, - "form": { - "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", - "mime_type": "text/html", - "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", - "resubmit": false, - "multiple_sumbissions": false - }, - "required": true - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json deleted file mode 100644 index fb6675b..0000000 --- a/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-initiated", - "name": "energy transaction initiated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be given" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - }, - "xinput": { - "head": { - "descriptor": { - "name": "Terms and Conditions" - }, - "index": { - "min": 0, - "cur": 0, - "max": 0 - }, - "headings": [ - "Terms and Conditions" - ] - }, - "form": { - "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", - "mime_type": "text/html", - "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", - "resubmit": false, - "multiple_sumbissions": false - }, - "required": true - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json deleted file mode 100644 index 1cf9957..0000000 --- a/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "descriptor": { - "code": "energy" - }, - "providers": [ - { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - }, - { - "id": "5f0acfd5-grid-2", - "descriptor": { - "name": "Storage Grid 2" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "350", - "unit": "kWH" - } - } - }, - "locations": [ - "2" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json deleted file mode 100644 index 7ba5924..0000000 --- a/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "descriptor": { - "code": "energy" - }, - "providers": [ - { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - }, - { - "id": "5f0acfd5-grid-2", - "descriptor": { - "name": "Storage Grid 2" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "350", - "unit": "kWH" - } - } - }, - "locations": [ - "2" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/search-request.json b/examples/microgrids/individuals-to-aggregator/search/search-request.json deleted file mode 100644 index 675d41b..0000000 --- a/examples/microgrids/individuals-to-aggregator/search/search-request.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json deleted file mode 100644 index fe7829d..0000000 --- a/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json deleted file mode 100644 index da9eaa8..0000000 --- a/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - } - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json deleted file mode 100644 index 4d40b8f..0000000 --- a/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-in-progress", - "name": "200 out of 300 kWH transferred" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json deleted file mode 100644 index e5eacd5..0000000 --- a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-not-started", - "name": "Manual dispatch hasn't begun yet" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - }, - { - "title": "Penalty for late manual dispatch of energy", - "price": { - "value": "2000", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json deleted file mode 100644 index 765da10..0000000 --- a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Energy Storage Solutions" - }, - "images": [ - { - "url": "https://energystoragesolutions.in/images/logo.png" - } - ], - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Manual Dispatch", - "contact": { - "email": "energystoragesolutions@org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "300.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-in-progress", - "name": "200 out of 300 kWH transferred" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-2400" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "300", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-2400", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/status-request.json b/examples/microgrids/individuals-to-aggregator/status/status-request.json deleted file mode 100644 index 2897f11..0000000 --- a/examples/microgrids/individuals-to-aggregator/status/status-request.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "5f0acfd5" - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/support/on_support-request.json b/examples/microgrids/individuals-to-aggregator/support/on_support-request.json deleted file mode 100644 index a32c58b..0000000 --- a/examples/microgrids/individuals-to-aggregator/support/on_support-request.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "1800 1080", - "email": "customer.care@sheru.com", - "url": "https://www.sheru.com/helpdesk" - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/support/support-request.json b/examples/microgrids/individuals-to-aggregator/support/support-request.json deleted file mode 100644 index 6587a17..0000000 --- a/examples/microgrids/individuals-to-aggregator/support/support-request.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "+919876543210", - "email": "support@sheru.com" - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/update/on_update-request.json b/examples/microgrids/individuals-to-aggregator/update/on_update-request.json deleted file mode 100644 index 73882b5..0000000 --- a/examples/microgrids/individuals-to-aggregator/update/on_update-request.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "provider": { - "id": "5f0acfd5", - "descriptor": { - "name": "Joe Adam" - }, - "location": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ] - }, - "items": [ - { - "id": "5f0acfd5-grid-1", - "descriptor": { - "name": "Storage Grid 1" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "400", - "unit": "kWH" - } - } - }, - "locations": [ - "1" - ], - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "Automatic Dispatch", - "contact": { - "email": "joe.adam@abc.org", - "phone": "+91-9999999999" - }, - "stops": [ - { - "quantity": { - "required": { - "value": "200.0", - "unit": "kWH" - } - } - } - ], - "state": { - "descriptor": { - "code": "transaction-updated", - "name": "energy transaction updated" - } - }, - "tags": [ - { - "descriptor": { - "name": "Energy Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "joe.adam@abc.org", - "name": "Joe Adam" - }, - "quote": { - "price": { - "currency": "INR", - "value": "-1600" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units to be stored" - }, - "quantity": { - "selected": { - "measure": { - "value": "200", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-1600", - "currency": "INR" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/update/update-request.json b/examples/microgrids/individuals-to-aggregator/update/update-request.json deleted file mode 100644 index 20274fa..0000000 --- a/examples/microgrids/individuals-to-aggregator/update/update-request.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "5f0acfd5", - "items": [ - { - "descriptor": { - "code": "energy" - }, - "quantity": { - "available": { - "value": "200.0", - "unit": "kWH" - } - } - } - ] - }, - "updated_target": "order.items[0].quantity.available.value" - } -} \ No newline at end of file From 5ae30dbeeb4bf57b8ac74840f5fdb8356ec567d3 Mon Sep 17 00:00:00 2001 From: shenoyninad Date: Thu, 31 Aug 2023 23:12:56 +0530 Subject: [PATCH 02/16] Updating examples in the yaml file --- api/dent.yaml | 1630 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 1506 insertions(+), 124 deletions(-) diff --git a/api/dent.yaml b/api/dent.yaml index 19a41a6..08acbbd 100644 --- a/api/dent.yaml +++ b/api/dent.yaml @@ -11,7 +11,7 @@ paths: tags: - Beckn Provider Platform (BPP) - Beckn Gateway (BG) - description: This allows the customer to search for energy related services. + description: This allows the customer to search for energy service providers. requestBody: content: application/json: @@ -33,6 +33,41 @@ paths: required: - context - message + examples: + The BAP looks for EV charging providers: + value: + context: + domain: dent:0.1.0 + action: search + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + intent: + item: + descriptor: + code: energy + quantity: + required: + value: '4.0' + unit: kWH + category: + descriptor: + code: green-tariff + location: + gps: 12.423423,77.325647 + radius: + type: CONSTANT + value: '5' + unit: km responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -62,7 +97,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + description: BAP selects a provider and their energy service. requestBody: content: application/json: @@ -88,6 +123,36 @@ paths: required: - context - message + examples: + The BAP selects an EV charging service from a provider: + value: + context: + domain: dent:0.1.0 + action: select + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + provider: + id: chargezone.in + items: + - id: pe-charging-01 + quantity: + selected: + measure: + value: '4' + unit: kWh responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -117,7 +182,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Initialize an order by providing billing and/or shipping details + description: Initialize an order by providing billing and/or shipping details to the energy service provider requestBody: content: application/json: @@ -143,6 +208,42 @@ paths: required: - context - message + examples: + The BAP initiates an order for the EV charging service from a provider: + value: + context: + domain: dent:0.1.0 + action: init + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + provider: + id: chargezone.in + items: + - id: pe-charging-01 + billing: + name: John Doe + email: abc@example.com + phone: +91-9876522222 + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -172,7 +273,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Initialize an order by providing billing and/or shipping details + description: Confirms the order, completes the payment and waits for order confirmation. requestBody: content: application/json: @@ -198,6 +299,65 @@ paths: required: - context - message + examples: + The BAP confirms the order to charge the EV: + value: + context: + domain: dent:0.1.0 + action: confirm + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + items: + - id: pe-charging-01 + billing: + name: John Doe + email: abc@example.com + number: +91-9876522222 + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + payments: + - collected_by: BPP + params: + amount: '40' + currency: INR + status: PAID + type: PRE-ORDER + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -227,7 +387,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Fetch the latest order object + description: Fetch the latest order object status requestBody: content: application/json: @@ -253,64 +413,27 @@ paths: required: - context - message - responses: - '200': - description: Acknowledgement of message received after successful validation of schema and signature - content: - application/json: - schema: - type: object - properties: + examples: + The BAP checks for the status of the charging: + value: + context: + domain: dent:0.1.0 + action: status + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' message: - type: object - properties: - ack: - allOf: - - $ref: '#/components/schemas/Ack' - - properties: - status: - enum: - - ACK - - NACK - required: - - ack - error: - $ref: '#/components/schemas/Error' - required: - - message - /track: - post: - tags: - - Beckn Provider Platform (BPP) - description: Track an active order - requestBody: - content: - application/json: - schema: - type: object - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - track - required: - - action - message: - type: object - properties: - order_id: - $ref: '#/components/schemas/Order/properties/id' - callback_url: - type: string - format: uri - required: - - order_id - required: - - context - - message + order_id: 6743e9e2-4fb5-487c-92b7 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -370,6 +493,31 @@ paths: required: - context - message + examples: + The BAP cancels the order for the EV charging: + value: + context: + domain: dent:0.1.0 + action: cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + cancellation_reason_id: '5' + descriptor: + short_desc: can't attend booking + order_id: 6743e9e2-4fb5-487c-92b7 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -399,7 +547,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Remove object + description: Update a criteria of the order requestBody: content: application/json: @@ -431,6 +579,61 @@ paths: required: - context - message + examples: + The BAP sends an update to start charging the EV: + value: + context: + domain: dent:0.1.0 + action: update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + update_target: order.fulfillments[0].state + order: + fulfillments: + - id: '1' + type: CHARGING + state: + descriptor: + code: start-charging + The BAP sends an update to stop charging the EV: + value: + context: + domain: dent:0.1.0 + action: update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + update_target: order.fulfillments[0].state + order: + fulfillments: + - id: '1' + type: CHARGING + state: + descriptor: + code: end-charging responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -486,6 +689,30 @@ paths: required: - context - message + examples: + The BAP rates the service provided: + value: + context: + domain: dent:0.1.0 + action: rating + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + ratings: + - id: 6743e9e2-4fb5-487c-92b7 + rating_category: charger + value: '5' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -539,6 +766,30 @@ paths: required: - context - message + examples: + The BAP wants to contact support: + value: + context: + domain: dent:0.1.0 + action: support + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + support: + order_id: 6743e9e2-4fb5-487c-92b7 + phone: '+919876543210' + email: john.doe@gmail.com responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -569,7 +820,7 @@ paths: tags: - Beckn Application Platform (BAP) - Beckn Gateway (BG) - description: BPP sends its catalog in response to a search request. + description: The BPP sends its energy catalog in response to a search request. requestBody: content: application/json: @@ -596,6 +847,166 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider returns a list of catalogs: + value: + context: + domain: dent:0.1.0 + action: on_search + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + catalog: + providers: + - id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + categories: + - id: '1' + descriptor: + code: green-tariff + name: green tariff + locations: + - id: '1' + gps: 12.345345,77.389754 + - id: '2' + gps: 12.247934,77.876987 + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR / kWH + quantity: + available: + measure: + value: '100' + unit: kWH + category_ids: + - '1' + location_ids: + - '1' + - '2' + fulfillment_ids: + - '1' + - '2' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free car wash + price: + value: '0' + currency: INR + fulfillments: + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: '2' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: log9.in + descriptor: + name: Log9 Inc + categories: + - id: '1' + descriptor: + code: green-tariff + name: green tariff + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '10' + currency: INR / kWH + quantity: + available: '1000' + category_ids: + - '1' + fulfillment_ids: + - '3' + - '4' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free tyre pressure check + price: + value: '0' + currency: INR + fulfillments: + - id: '3' + type: BATTERY-SWAP + stops: + - location: + gps: 12.745675, 77.987393 + - id: '4' + type: MOBILE-BATTERY-SWAP + stops: + - location: + url: https://log9.in/track/bswap/3234242 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -625,7 +1036,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Send draft order object with quoted price for selected items + description: Send details along with quoted price for selected items requestBody: content: application/json: @@ -650,6 +1061,108 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider sends the details of the item selected, along with a quote: + value: + context: + domain: dent:0.1.0 + action: on_select + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + - id: pe-charging-01-addon-1 + descriptor: + code: add-on-item + name: Free car wash + price: + value: '0' + currency: INR + fulfillments: + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + - item: + descriptor: + name: Free car wash + price: + value: '0' + currency: INR responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -679,7 +1192,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Send order object with payment details updated + description: Send draft order object with payment details updated for the service. requestBody: content: application/json: @@ -706,6 +1219,126 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The BPP intiates the order, sends the payment link: + value: + context: + domain: dent:0.1.0 + action: on_init + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: order-initiated + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - url: https://payment.gateway.in + type: PRE-ORDER + status: NOT-PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -735,7 +1368,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Send active order object + description: Send active order object with the confirmed order ID requestBody: content: application/json: @@ -762,62 +1395,137 @@ paths: $ref: '#/components/schemas/Error' required: - context - responses: - '200': - description: Acknowledgement of message received after successful validation of schema and signature - content: - application/json: - schema: - type: object - properties: + examples: + The BAP sends an order confirmation: + value: + context: + domain: dent:0.1.0 + action: on_confirm + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' message: - type: object - properties: - ack: - allOf: - - $ref: '#/components/schemas/Ack' - - properties: - status: - enum: - - ACK - - NACK - required: - - ack - error: - $ref: '#/components/schemas/Error' - required: - - message - /on_track: - post: - tags: - - Beckn Application Platform (BAP) - description: Send tracking details of an active order - requestBody: - content: - application/json: - schema: - type: object - properties: - context: - allOf: - - $ref: '#/components/schemas/Context' - - properties: - action: - enum: - - on_track - required: - - action - message: - type: object - properties: - tracking: - $ref: '#/components/schemas/Tracking' - required: - - tracking - error: - $ref: '#/components/schemas/Error' - required: - - context + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: payment-completed + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + instructions: + name: Charging instructions + short_desc: To start your charging, go to charger number 987, and click on 'start' on your app + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -847,7 +1555,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + description: Sends cancelled order object with the reason. requestBody: content: application/json: @@ -874,6 +1582,247 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider cancels the order after the BAP requested for a cancellation: + value: + context: + domain: dent:0.1.0 + action: on_cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + status: CANCELLED + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: order-cancelled + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '-32' + currency: INR + breakup: + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '-32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider cancels the order after the there was an error in the charger: + value: + context: + domain: dent:0.1.0 + action: on_cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + status: CANCELLED + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + allocated: + measure: + value: '2' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charger-error + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '-12' + currency: INR + breakup: + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '-12' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -930,6 +1879,261 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider sends an updated object to start charging: + value: + context: + domain: dent:0.1.0 + action: on_update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charging-started + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider sends an updated object to stop charging: + value: + context: + domain: dent:0.1.0 + action: on_update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charging-ended + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -959,7 +2163,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Fetch the status of a Service + description: Fetch the status of a service requestBody: content: application/json: @@ -986,6 +2190,134 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider sends status of the charging: + value: + context: + domain: dent:0.1.0 + action: on_status + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + name: vehicle 65% charged + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1043,6 +2375,31 @@ paths: required: - context - message + examples: + The provider responds with a form URL for rating: + value: + context: + domain: dent:0.1.0 + action: on_rating + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + feedback_form: + xinput: + form: + url: https://api.example-bpp.com/pilot/bpp/feedback/portal + required: 'false' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1097,6 +2454,31 @@ paths: $ref: '#/components/schemas/Error' required: - context + examples: + The provider returns support details: + value: + context: + domain: dent:0.1.0 + action: on_support + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + support: + order_id: 6743e9e2-4fb5-487c-92b7 + phone: 1800 1080 + email: customer.care@chargezone.com + url: https://www.chargezone.com/helpdesk responses: '200': description: Acknowledgement of message received after successful validation of schema and signature From 04d0c33b372ff2468ff690dc0f56f604eba61da2 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 1 Sep 2023 12:31:27 +0530 Subject: [PATCH 03/16] Update README.md - Added release version in "Release History" - Added new contributors in "Acknowledements" - Added hyperlink to implementation guide in "Implementing the specification" --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd806a1..984cc3b 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ The Decentralized Energy Transaction (DENT) Protocol is an adaptation of beckn p ## Release History -| Version | Release Date | Adaptation to Core Spec Version | Authors | -|:-------:|-----------------|---------------------------------|--------------| -| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | +| Version | Release Date | Adaptation to Core Spec Version | Authors | +|:-------:|---------------------|---------------------------------|--------------| +| 0.2.0 | 1st September, 2023 | 1.1.0 | Ravi Prakash, Akhil Jayaprakash | +| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | ## Working Group Members @@ -32,16 +33,19 @@ Just like physical goods can be consumed or stored, energy can _also_ be _consum ## Implementing the specification -To understanding how to implement the specification click here +To understanding how to implement the specification click [here](./docs/5_Implementation_Guide.md) ## Acknowledgements The author(s) of this specification would like to thank the following volunteers for their contribution to the development of this specification -### Version 0.1.0 +### Version 0.2.0 - Akhil Jayaprakash - Pulse Energy (pulseenergy.io) -- Devang Mistry - Pulse Energy (pulseenergy.io) - Ankit Mittal - Sheru (sheru.se) +- Ninad Shenoy - Enterprise Minds (ninad.shenoy@eminds.ai) +- Sudheesh Kumar Potla - IIT Kharagpur ([@Sudheesh2609](https://github.com/Sudheesh2609)) +- Sujith Nair - FIDE (fide.org) +- Pramod Varma - FIDE (fide.org) ## References 1. Energy Transactions - https://www.dentons.com/en/find-your-dentons-team/industry-sectors/energy/energy-trading-marketing-and-derivatives/energy-transactions From d876b713bb58f5e23d44fef91d8128d8f86fc0f1 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 1 Sep 2023 12:32:10 +0530 Subject: [PATCH 04/16] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 984cc3b..5cd40a6 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ The author(s) of this specification would like to thank the following volunteers ### Version 0.2.0 - Akhil Jayaprakash - Pulse Energy (pulseenergy.io) - Ankit Mittal - Sheru (sheru.se) -- Ninad Shenoy - Enterprise Minds (ninad.shenoy@eminds.ai) - Sudheesh Kumar Potla - IIT Kharagpur ([@Sudheesh2609](https://github.com/Sudheesh2609)) - Sujith Nair - FIDE (fide.org) - Pramod Varma - FIDE (fide.org) From fcc1c902a439b056cfecae0159a7ab20de8e8ac0 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 1 Sep 2023 12:33:49 +0530 Subject: [PATCH 05/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5cd40a6..c98d704 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Decentralized Energy Transaction Protocol (DENT) -The Decentralized Energy Transaction (DENT) Protocol is an adaptation of beckn protocol for transactional use cases in the energy sector. +The Decentralized Energy Transaction (DENT) Protocol is an adaptation of [beckn protocol](https://github.com/beckn/protocol-specifications) for transactional use cases in the energy sector. ## Release History From 8d0dfdd0718aa5708b25d61aa011441a0b80cbea Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Mon, 25 Sep 2023 20:24:55 +0530 Subject: [PATCH 06/16] Update README.md Updated release date --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c98d704..547f35a 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ The Decentralized Energy Transaction (DENT) Protocol is an adaptation of [beckn ## Release History -| Version | Release Date | Adaptation to Core Spec Version | Authors | -|:-------:|---------------------|---------------------------------|--------------| -| 0.2.0 | 1st September, 2023 | 1.1.0 | Ravi Prakash, Akhil Jayaprakash | -| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | +| Version | Release Date | Adaptation to Core Spec Version | Authors | +|:-------:|----------------------|---------------------------------|--------------| +| 0.2.0 | 25th September, 2023 | 1.1.0 | Ravi Prakash, Akhil Jayaprakash | +| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | ## Working Group Members From 5647343365297424a9e9298c2501d5566f8faf7e Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Mon, 25 Sep 2023 20:50:38 +0530 Subject: [PATCH 07/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 547f35a..758c780 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The Decentralized Energy Transaction (DENT) Protocol is an adaptation of [beckn | Pramod Varma | Maintainer, Reviewer | @pramodkvarma | | Sujith Nair | Reviewer | @sjthnrk | | Akhil Jayaprakash | Subject Matter Expert | @pulse-aj | -| Ankit Mittal | Subject Matter Expert | | +| Ankit Mittal | Subject Matter Expert | @ankitmttl | ## Introduction From 37c64a3f16742393aee4d15a364c87069b939a20 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Tue, 10 Oct 2023 03:10:25 +0530 Subject: [PATCH 08/16] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 758c780..57bf975 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Decentralized Energy Transaction Protocol (DENT) -The Decentralized Energy Transaction (DENT) Protocol is an adaptation of [beckn protocol](https://github.com/beckn/protocol-specifications) for transactional use cases in the energy sector. +# Unified Energy Interface (UEI) +The Unified Energy Interface (UEI) Protocol is an adaptation of [beckn protocol](https://github.com/beckn/protocol-specifications) for transactional use cases in the energy sector. ## Release History @@ -25,11 +25,11 @@ The energy sector is of prime, global importance and is highly regulated. A core DENT Protocol (or simply DENT) enables the creation of a decentralized / federated network of platforms that perform interoperable commercial transactions that result in the transfer of energy from a energy producer to an energy provider. The energy producer isn't necessarily the energy generator, rather an entity that represents the energy supply. Similarly, an energy consumer isn't necessarily an appliance or a household, but more like a consumer that represents the energy demand. For example, an energy producer can be a Charging Point Operator that supplies energy to electric vehicles, or a Distribution Company that supplies energy to homes. Similarly, an energy consumer can be a vehicle that needs charging; a home appliance that needs electricity to run; or even the distribution company than needs energy from the power generation companies (like power plants). -An important thing to note here is that when it comes to electrical energy, the energy transfer is not always from power plants to the appliances. In many cases, simple households with an energy surplus can also feed it back to the electricity grid and avail commercial benefits like reduced electricity bills. DENT Protocol enables creation of such contracts as well. +An important thing to note here is that when it comes to electrical energy, the energy transfer is not always from power plants to the appliances. In many cases, simple households with an energy surplus can also feed it back to the electricity grid and avail commercial benefits like reduced electricity bills. UEI enables creation of such contracts as well. -Just like physical goods can be consumed or stored, energy can _also_ be _consumed_ or _stored_. DENT allows creation of energy contracts that not only enable the consumption of energy, but also the storage of energy (in batteries, capacitors, etc). +Just like physical goods can be consumed or stored, energy can _also_ be _consumed_ or _stored_. UEI allows creation of energy contracts that not only enable the consumption of energy, but also the storage of energy (in batteries, capacitors, etc). -> **Note :** DENT Protocol does NOT transfer "Energy" in its physical form. Enery transfer is still done via physical infrastructures like Generators, transmission lines, transformers, inverters, adaptors etc. DENT only facilites the creation of the energy transfer contract (order) that ultimately results in the physical transfer (fulfillment). +> **Note :** UEI does NOT transfer "Energy" in its physical form. Enery transfer is still done via physical infrastructures like Generators, transmission lines, transformers, inverters, adaptors etc. UEI only facilites the creation of the energy transfer contract (order) that ultimately results in the physical transfer (fulfillment). ## Implementing the specification From c2e16220d26e7400f62fd263a961f396b424f78d Mon Sep 17 00:00:00 2001 From: vishi24 <69658165+vishi24@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:23:54 +0530 Subject: [PATCH 09/16] Update issue templates --- .../ISSUE_TEMPLATE/simple-issue-template.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/simple-issue-template.md diff --git a/.github/ISSUE_TEMPLATE/simple-issue-template.md b/.github/ISSUE_TEMPLATE/simple-issue-template.md new file mode 100644 index 0000000..7bc4d0d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/simple-issue-template.md @@ -0,0 +1,101 @@ +--- +name: Simple issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + +--- +name: 'Simple Issue template ' +about: Simple template for raising issue +title: '' +labels: '' +assignees: '' + +--- + +--- +name: Issue simple +about: Used to standard issue in simple format. +title: '' +labels: '' +assignees: '' + +--- + +--- +name: BOC +about: BOC Community Issues Template +title: "[BOC] Button for likes" +labels: BOC +--- + +## Description + +[Provide a brief description of the feature, including why it is needed and what it will accomplish. You can skip any of Goals, Expected Outcome, Implementation Details, Mockups / Wireframes if they are irrelevant. Please note that this section of the ticket is suggestive & you can structure it as per your prerogative.] + +## Goals + +- [ ] [Goal 1] +- [ ] [Goal 2] +- [ ] [Goal 3] +- [ ] [Goal 4] +- [ ] [Goal 5] + +## Expected Outcome + +[Describe in detail what the final product or result should look like and how it should behave.] + +## Acceptance Criteria + +- [ ] [Criteria 1] +- [ ] [Criteria 2] +- [ ] [Criteria 3] +- [ ] [Criteria 4] +- [ ] [Criteria 5] + +## Implementation Details + +[List any technical details about the proposed implementation, including any specific technologies that will be used.] + +## Mockups / Wireframes + +[Include links to any visual aids, mockups, wireframes, or diagrams that help illustrate what the final product should look like. This is not always necessary, but can be very helpful in many cases.] + +--- + +[Please note that the below section of the ticket ****has to be in the format as mentioned as it is key to enabling proper listing of the project.**** Please only choose the options mentioned under the headings wherever applicable.] + +### Product Name + +[Product Name: For eg: Beckn, Sunbird Obsrv etc] + +### Project Name + +[Project Name: Descriptive of the ticket] + +### Organization Name: + +[Organization Name] + +### Domain + +[Area of governance] + +### Tech Skills Needed: + +[Required technical skills for the project] + +### Complexity + +Pick one of [High]/[Medium]/[Low] + +### Category + +Pick one or more of [CI/CD], [Integrations], [Performance Improvement], [Security], [UI/UX/Design], [Bug], [Feature], [Documentation], [Deployment], [Test], [PoC] + +### Sub Category + +Pick one or more of [API], [Database], [Analytics], [Refactoring], [Data Science], [Machine Learning], [Accessibility], [Internationalization], [Localization], [Frontend], [Backend], [Mobile], [SEO], [Configuration], [Deprecation], [Breaking Change], [Maintenance], [Support], [Question], [Technical Debt], [Beginner friendly], [Research], [Reproducible], [Needs Reproduction]. From e2ddd01d2462734f407948beed55c45c63da6b5f Mon Sep 17 00:00:00 2001 From: vishi24 <69658165+vishi24@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:26:20 +0530 Subject: [PATCH 10/16] Update issue templates --- .github/ISSUE_TEMPLATE/simple-issue-template.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/simple-issue-template.md b/.github/ISSUE_TEMPLATE/simple-issue-template.md index 7bc4d0d..dcf2eeb 100644 --- a/.github/ISSUE_TEMPLATE/simple-issue-template.md +++ b/.github/ISSUE_TEMPLATE/simple-issue-template.md @@ -7,15 +7,6 @@ assignees: '' --- ---- -name: 'Simple Issue template ' -about: Simple template for raising issue -title: '' -labels: '' -assignees: '' - ---- - --- name: Issue simple about: Used to standard issue in simple format. From 9979e55ff885925f471de621adc3d609c06908b4 Mon Sep 17 00:00:00 2001 From: rajaneeshk90 <62893115+rajaneeshk90@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:06:03 +0530 Subject: [PATCH 11/16] Revert "Merging main into draft" --- README.md | 27 +- api/dent.yaml | 1881 +++------- docs/5_Implementation_Guide.md | 2072 +---------- .../ev-charging-and-battery-swapping.md | 1296 +++++++ docs/example-implementations/ev-charging.md | 3053 ----------------- .../general-energy-transaction-1.md | 841 +++++ .../general-energy-transaction-2.md | 281 ++ .../ev-charging/cancel/cancel-request.json | 2 +- .../on_cancel-request-charger-breakdown.json | 200 -- .../ev-charging/cancel/on_cancel-request.json | 22 +- .../confirm/on_confirm-request.json | 39 +- .../ev-charging/init/on_init-request.json | 30 +- .../ev-charging/search/on_search-request.json | 48 +- .../ev-charging/search/search-request.json | 2 +- .../ev-charging/select/on_select-request.json | 34 +- .../ev-charging/status/on_status-request.json | 37 +- .../on_update-request-charging-end.json | 208 -- .../on_update-request-charging-start.json | 208 -- .../confirm/confirm-request.json | 101 + .../confirm/on_confirm-request.json | 154 + examples/homes-discoms/init/init-request.json | 58 + .../homes-discoms/init/on_init-request.json | 153 + .../status/on_status-request.json | 154 + .../homes-discoms/status/status-request.json | 24 + .../cancel/cancel-request.json} | 16 +- .../cancel/on_cancel-request.json | 154 + ...request-automatic-and-manual-dispatch.json | 61 + ...on_confirm-request-automatic-dispatch.json | 153 + .../on_confirm-request-manual-dispatch.json | 153 + .../init/init-request-automatic-dispatch.json | 61 + .../init/init-request-manual-dispatch.json} | 20 +- .../on_init-request-automatic-dispatch.json | 152 + .../init/on_init-request-manual-dispatch.json | 146 + .../on_search-request-automatic-dispatch.json | 138 + .../on_search-request-manual-dispatch.json | 138 + .../search/search-request.json | 34 + .../on_select-request-automatic-dispatch.json | 140 + .../on_select-request-manual-dispatch.json | 119 + .../select/select-request.json} | 21 +- .../on_status-request-automatic-dispatch.json | 147 + ...tatus-request-manual-dispatch-penalty.json | 154 + .../on_status-request-manual-dispatch.json | 147 + .../status/status-request.json | 24 + .../support/on_support-request.json | 29 + .../support/support-request.json | 28 + .../update/on_update-request.json | 147 + .../update/update-request.json | 40 + .../cancel/cancel-request.json} | 15 +- .../cancel/on_cancel-request.json | 153 + ...onfirm-request-automatic-dispatch-tnc.json | 75 + .../confirm/confirm-request.json | 69 + ...on_confirm-request-automatic-dispatch.json | 152 + .../on_confirm-request-manual-dispatch.json | 152 + ...it-request-automatic-dispatch-consent.json | 48 + .../init/init-request.json | 42 + ...it-request-automatic-dispatch-consent.json | 175 + ...n_init-request-automatic-dispatch-tnc.json | 175 + .../on_init-request-manual-dispatch-tnc.json | 174 + .../on_search-request-automatic-dispatch.json | 143 + .../on_search-request-manual-dispatch.json | 143 + .../search/search-request.json | 34 + .../on_select-request-automatic-dispatch.json | 145 + .../on_select-request-manual-dispatch.json | 124 + .../select/select-request.json | 38 + .../on_status-request-automatic-dispatch.json | 152 + ...tatus-request-manual-dispatch-penalty.json | 159 + .../on_status-request-manual-dispatch.json | 152 + .../status/status-request.json | 24 + .../support/on_support-request.json | 29 + .../support/support-request.json | 28 + .../update/on_update-request.json | 147 + .../update/update-request.json | 40 + 72 files changed, 8336 insertions(+), 7399 deletions(-) create mode 100644 docs/example-implementations/ev-charging-and-battery-swapping.md delete mode 100644 docs/example-implementations/ev-charging.md create mode 100644 docs/example-implementations/general-energy-transaction-1.md create mode 100644 docs/example-implementations/general-energy-transaction-2.md delete mode 100644 examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json delete mode 100644 examples/ev-charging/update/on_update-request-charging-end.json delete mode 100644 examples/ev-charging/update/on_update-request-charging-start.json create mode 100644 examples/homes-discoms/confirm/confirm-request.json create mode 100644 examples/homes-discoms/confirm/on_confirm-request.json create mode 100644 examples/homes-discoms/init/init-request.json create mode 100644 examples/homes-discoms/init/on_init-request.json create mode 100644 examples/homes-discoms/status/on_status-request.json create mode 100644 examples/homes-discoms/status/status-request.json rename examples/{ev-charging/rating/rating-request.json => microgrids/aggregator-to-individuals/cancel/cancel-request.json} (73%) create mode 100644 examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json rename examples/{ev-charging/update/update-request-charging-end.json => microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json} (70%) create mode 100644 examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/search/search-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json rename examples/{ev-charging/update/update-request-charging-start.json => microgrids/aggregator-to-individuals/select/select-request.json} (68%) create mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json create mode 100644 examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json create mode 100644 examples/microgrids/aggregator-to-individuals/status/status-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/support/on_support-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/support/support-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/update/on_update-request.json create mode 100644 examples/microgrids/aggregator-to-individuals/update/update-request.json rename examples/{ev-charging/rating/on_rating-request.json => microgrids/individuals-to-aggregator/cancel/cancel-request.json} (69%) create mode 100644 examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json create mode 100644 examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json create mode 100644 examples/microgrids/individuals-to-aggregator/init/init-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json create mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json create mode 100644 examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json create mode 100644 examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/search/search-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/select/select-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json create mode 100644 examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json create mode 100644 examples/microgrids/individuals-to-aggregator/status/status-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/support/on_support-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/support/support-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/update/on_update-request.json create mode 100644 examples/microgrids/individuals-to-aggregator/update/update-request.json diff --git a/README.md b/README.md index 57bf975..bd806a1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -# Unified Energy Interface (UEI) -The Unified Energy Interface (UEI) Protocol is an adaptation of [beckn protocol](https://github.com/beckn/protocol-specifications) for transactional use cases in the energy sector. +# Decentralized Energy Transaction Protocol (DENT) +The Decentralized Energy Transaction (DENT) Protocol is an adaptation of beckn protocol for transactional use cases in the energy sector. ## Release History -| Version | Release Date | Adaptation to Core Spec Version | Authors | -|:-------:|----------------------|---------------------------------|--------------| -| 0.2.0 | 25th September, 2023 | 1.1.0 | Ravi Prakash, Akhil Jayaprakash | -| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | +| Version | Release Date | Adaptation to Core Spec Version | Authors | +|:-------:|-----------------|---------------------------------|--------------| +| 0.1.0 | 24th June, 2023 | 1.1.0 | Ravi Prakash | ## Working Group Members @@ -16,7 +15,7 @@ The Unified Energy Interface (UEI) Protocol is an adaptation of [beckn protocol] | Pramod Varma | Maintainer, Reviewer | @pramodkvarma | | Sujith Nair | Reviewer | @sjthnrk | | Akhil Jayaprakash | Subject Matter Expert | @pulse-aj | -| Ankit Mittal | Subject Matter Expert | @ankitmttl | +| Ankit Mittal | Subject Matter Expert | | ## Introduction @@ -25,26 +24,24 @@ The energy sector is of prime, global importance and is highly regulated. A core DENT Protocol (or simply DENT) enables the creation of a decentralized / federated network of platforms that perform interoperable commercial transactions that result in the transfer of energy from a energy producer to an energy provider. The energy producer isn't necessarily the energy generator, rather an entity that represents the energy supply. Similarly, an energy consumer isn't necessarily an appliance or a household, but more like a consumer that represents the energy demand. For example, an energy producer can be a Charging Point Operator that supplies energy to electric vehicles, or a Distribution Company that supplies energy to homes. Similarly, an energy consumer can be a vehicle that needs charging; a home appliance that needs electricity to run; or even the distribution company than needs energy from the power generation companies (like power plants). -An important thing to note here is that when it comes to electrical energy, the energy transfer is not always from power plants to the appliances. In many cases, simple households with an energy surplus can also feed it back to the electricity grid and avail commercial benefits like reduced electricity bills. UEI enables creation of such contracts as well. +An important thing to note here is that when it comes to electrical energy, the energy transfer is not always from power plants to the appliances. In many cases, simple households with an energy surplus can also feed it back to the electricity grid and avail commercial benefits like reduced electricity bills. DENT Protocol enables creation of such contracts as well. -Just like physical goods can be consumed or stored, energy can _also_ be _consumed_ or _stored_. UEI allows creation of energy contracts that not only enable the consumption of energy, but also the storage of energy (in batteries, capacitors, etc). +Just like physical goods can be consumed or stored, energy can _also_ be _consumed_ or _stored_. DENT allows creation of energy contracts that not only enable the consumption of energy, but also the storage of energy (in batteries, capacitors, etc). -> **Note :** UEI does NOT transfer "Energy" in its physical form. Enery transfer is still done via physical infrastructures like Generators, transmission lines, transformers, inverters, adaptors etc. UEI only facilites the creation of the energy transfer contract (order) that ultimately results in the physical transfer (fulfillment). +> **Note :** DENT Protocol does NOT transfer "Energy" in its physical form. Enery transfer is still done via physical infrastructures like Generators, transmission lines, transformers, inverters, adaptors etc. DENT only facilites the creation of the energy transfer contract (order) that ultimately results in the physical transfer (fulfillment). ## Implementing the specification -To understanding how to implement the specification click [here](./docs/5_Implementation_Guide.md) +To understanding how to implement the specification click here ## Acknowledgements The author(s) of this specification would like to thank the following volunteers for their contribution to the development of this specification -### Version 0.2.0 +### Version 0.1.0 - Akhil Jayaprakash - Pulse Energy (pulseenergy.io) +- Devang Mistry - Pulse Energy (pulseenergy.io) - Ankit Mittal - Sheru (sheru.se) -- Sudheesh Kumar Potla - IIT Kharagpur ([@Sudheesh2609](https://github.com/Sudheesh2609)) -- Sujith Nair - FIDE (fide.org) -- Pramod Varma - FIDE (fide.org) ## References 1. Energy Transactions - https://www.dentons.com/en/find-your-dentons-team/industry-sectors/energy/energy-trading-marketing-and-derivatives/energy-transactions diff --git a/api/dent.yaml b/api/dent.yaml index 08acbbd..2823d1f 100644 --- a/api/dent.yaml +++ b/api/dent.yaml @@ -1,3 +1,4 @@ + openapi: 3.0.0 info: title: Beckn Energy API Specification @@ -11,7 +12,7 @@ paths: tags: - Beckn Provider Platform (BPP) - Beckn Gateway (BG) - description: This allows the customer to search for energy service providers. + description: This allows the customer to search for energy related services. requestBody: content: application/json: @@ -34,40 +35,133 @@ paths: - context - message examples: - The BAP looks for EV charging providers: + Search for charging stations based on location and vehicle make: value: context: - domain: dent:0.1.0 - action: search + domain: uei:0.1.0 location: country: name: India code: IND - city: std:080 - version: 1.1.0 + timestamp: '2023-07-16T04:41:16Z' bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + city: std:080 + core_version: 1.1.0 + action: search + bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 + message: + intent: + location: + descriptor: + name: user location + circle: + gps: 12.923608703179461, 77.61462964117527 + radius: + type: CONSTANT + value: '5' + unit: km + fulfillment: + vehicle: + category: car + make: Tata + model: Nexon EV + variant: ZX+ + wheels_count: '4' + energy_type: electric + Search for charging stations based on location, vehicle make and tariff: + value: + context: + domain: uei:0.1.0 + location: + country: + name: India + code: IND timestamp: '2023-07-16T04:41:16Z' + bap_id: example-bap.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + city: std:080 + core_version: 1.1.0 + action: search + bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 message: intent: - item: + location: descriptor: - code: energy - quantity: - required: - value: '4.0' - unit: kWH - category: - descriptor: - code: green-tariff + name: user location + circle: + gps: 12.923608703179461, 77.61462964117527 + radius: + type: CONSTANT + value: '5' + unit: km + item: + price: + currency: INR + value: 15 rupees per unit + fulfillment: + vehicle: + category: car + make: Tata + model: Nexon EV + variant: ZX+ + wheels_count: '4' + energy_type: electric + Search for charging stations based on charger details: + value: + context: + domain: uei:0.1.0 + location: + country: + name: India + code: IND + timestamp: '2023-07-16T04:41:16Z' + bap_id: example-bap.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + city: std:080 + core_version: 1.1.0 + action: search + bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 + message: + intent: location: - gps: 12.423423,77.325647 - radius: - type: CONSTANT - value: '5' - unit: km + descriptor: + name: user location + circle: + gps: 12.923608703179461, 77.61462964117527 + radius: + type: CONSTANT + value: '5' + unit: km + item: + price: + currency: INR + value: 15 rupees per unit + fulfillment: + vehicle: + category: car + make: Tata + model: Nexon EV + variant: ZX+ + wheels_count: '4' + energy_type: electric + tags: + - descriptor: + name: Charger requirements + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Charger power rating + value: greater than 50kW + display: true responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -97,7 +191,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: BAP selects a provider and their energy service. + description: BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog requestBody: content: application/json: @@ -123,36 +217,6 @@ paths: required: - context - message - examples: - The BAP selects an EV charging service from a provider: - value: - context: - domain: dent:0.1.0 - action: select - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - provider: - id: chargezone.in - items: - - id: pe-charging-01 - quantity: - selected: - measure: - value: '4' - unit: kWh responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -182,7 +246,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Initialize an order by providing billing and/or shipping details to the energy service provider + description: Initialize an order by providing billing and/or shipping details requestBody: content: application/json: @@ -208,42 +272,6 @@ paths: required: - context - message - examples: - The BAP initiates an order for the EV charging service from a provider: - value: - context: - domain: dent:0.1.0 - action: init - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - provider: - id: chargezone.in - items: - - id: pe-charging-01 - billing: - name: John Doe - email: abc@example.com - phone: +91-9876522222 - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -273,7 +301,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Confirms the order, completes the payment and waits for order confirmation. + description: Initialize an order by providing billing and/or shipping details requestBody: content: application/json: @@ -299,65 +327,6 @@ paths: required: - context - message - examples: - The BAP confirms the order to charge the EV: - value: - context: - domain: dent:0.1.0 - action: confirm - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - providers: - id: chargezone.in - items: - - id: pe-charging-01 - billing: - name: John Doe - email: abc@example.com - number: +91-9876522222 - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - payments: - - collected_by: BPP - params: - amount: '40' - currency: INR - status: PAID - type: PRE-ORDER - quote: - price: - value: '40' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -387,7 +356,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Fetch the latest order object status + description: Fetch the latest order object requestBody: content: application/json: @@ -413,27 +382,64 @@ paths: required: - context - message - examples: - The BAP checks for the status of the charging: - value: - context: - domain: dent:0.1.0 - action: status - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: message: - order_id: 6743e9e2-4fb5-487c-92b7 + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /track: + post: + tags: + - Beckn Provider Platform (BPP) + description: Track an active order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - track + required: + - action + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + callback_url: + type: string + format: uri + required: + - order_id + required: + - context + - message responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -493,31 +499,6 @@ paths: required: - context - message - examples: - The BAP cancels the order for the EV charging: - value: - context: - domain: dent:0.1.0 - action: cancel - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - cancellation_reason_id: '5' - descriptor: - short_desc: can't attend booking - order_id: 6743e9e2-4fb5-487c-92b7 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -547,7 +528,7 @@ paths: post: tags: - Beckn Provider Platform (BPP) - description: Update a criteria of the order + description: Remove object requestBody: content: application/json: @@ -579,61 +560,6 @@ paths: required: - context - message - examples: - The BAP sends an update to start charging the EV: - value: - context: - domain: dent:0.1.0 - action: update - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - update_target: order.fulfillments[0].state - order: - fulfillments: - - id: '1' - type: CHARGING - state: - descriptor: - code: start-charging - The BAP sends an update to stop charging the EV: - value: - context: - domain: dent:0.1.0 - action: update - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - update_target: order.fulfillments[0].state - order: - fulfillments: - - id: '1' - type: CHARGING - state: - descriptor: - code: end-charging responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -689,30 +615,6 @@ paths: required: - context - message - examples: - The BAP rates the service provided: - value: - context: - domain: dent:0.1.0 - action: rating - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - ratings: - - id: 6743e9e2-4fb5-487c-92b7 - rating_category: charger - value: '5' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -766,30 +668,6 @@ paths: required: - context - message - examples: - The BAP wants to contact support: - value: - context: - domain: dent:0.1.0 - action: support - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - support: - order_id: 6743e9e2-4fb5-487c-92b7 - phone: '+919876543210' - email: john.doe@gmail.com responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -820,7 +698,7 @@ paths: tags: - Beckn Application Platform (BAP) - Beckn Gateway (BG) - description: The BPP sends its energy catalog in response to a search request. + description: BPP sends its catalog in response to a search request. requestBody: content: application/json: @@ -848,91 +726,109 @@ paths: required: - context examples: - The provider returns a list of catalogs: + Charging service providers return a catalog with their services: value: context: - domain: dent:0.1.0 - action: on_search + country: IND location: country: name: India code: IND - city: std:080 - version: 1.1.0 + domain: uei:0.1.0 + timestamp: '2023-07-16T04:41:16Z' bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' + city: std:080 + core_version: 1.1.0 + action: on_search + bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 message: catalog: + descriptor: + name: Alpha Charging Solutions providers: - - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd + - descriptor: + name: Spark Charging Station, Outer Ring Road images: - - url: https://chargezone.in/images/logo.png - categories: - - id: '1' + - url: https://alphachargers.com/images/logo.png + id: '14325' + locations: + - gps: 12.925087, 77.6132964 + map_url: https://goo.gl/maps/5A432HSHfcd2 + city: Bangalore + area_code: '540045' + items: + - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc descriptor: - code: green-tariff - name: green tariff + name: Spark Charger Point 1 + price: + currency: INR + value: 11 rupees per unit + tags: + - descriptor: + name: Charger Connector 1 Details + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: 993def7f-9f73-4914-b999-5249285e0d5a + descriptor: + name: Spark Charger Point 2 + price: + currency: INR + value: 13 rupees per unit + tags: + - descriptor: + name: Charger Connector 1 Details + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - descriptor: + name: Spark Charging Station, MG Road + id: '16226' locations: - - id: '1' - gps: 12.345345,77.389754 - - id: '2' - gps: 12.247934,77.876987 + - gps: 12.925178, 77.6132901 + map_url: https://goo.gl/maps/7fds573GSSd2 + city: Bangalore + area_code: '540039' items: - - id: pe-charging-01 + - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc descriptor: - code: energy + name: Spark Charger Point 1 price: - value: '8' - currency: INR / kWH - quantity: - available: - measure: - value: '100' - unit: kWH - category_ids: - - '1' - location_ids: - - '1' - - '2' - fulfillment_ids: - - '1' - - '2' - add_ons: - - id: pe-charging-01-addon-1 - descriptor: - name: Free car wash - price: - value: '0' - currency: INR - fulfillments: - - id: '1' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 + currency: INR + value: 15 rupees per unit tags: - descriptor: - name: Charging Point Specifications + name: Charger Connector 1 Details list: - descriptor: name: Charger type - code: charger-type value: AC - descriptor: name: Connector type - code: connector-type value: CCS2 - descriptor: name: Power Rating @@ -941,18 +837,15 @@ paths: name: Availability value: Available display: true - - id: '2' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 + - id: 993def7f-9f73-4914-b999-5249285e0d5a + descriptor: + name: Spark Charger Point 2 + price: + currency: INR + value: 12 rupees per unit tags: - descriptor: - name: Charging Point + name: Charger Connector 1 Details list: - descriptor: name: Charger type @@ -967,46 +860,155 @@ paths: name: Availability value: Available display: true - - id: log9.in + Charging service providers return a catalog with connector as items: + value: + context: + country: IND + location: + country: + name: India + code: IND + domain: uei:0.1.0 + timestamp: '2023-07-16T04:41:16Z' + bap_id: example-bap.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + city: std:080 + core_version: 1.1.0 + action: on_search + bap_uri: https://api.example-bap.com/pilot/bap/charge/v1 + message: + catalog: + descriptor: + name: Alpha Charging Solutions + providers: + - id: 4235 descriptor: - name: Log9 Inc - categories: - - id: '1' - descriptor: - code: green-tariff - name: green tariff + name: Alpha Charging Solutions + images: + - url: https://alphachargers.com/images/logo.png + locations: + - gps: 12.925087, 77.6132964 + map_url: https://goo.gl/maps/5A432HSHfcd2 + city: Bangalore + area_code: '540045' items: - - id: pe-charging-01 + - id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc + category_ids: + - charging-station + location_ids: + - 12.925087, 77.6132964 + descriptor: + name: Spark Charging Station, Outer Ring Road + tags: + - display: true + descriptor: + name: Attributes + code: attributes + list: + - display: true + value: 10kms + descriptor: + name: Distance + code: distance + - id: 01683e33-39c5-4523-9eef-36e8165e66cb + parent_item_id: 686d2a8b-0e0b-4bcb-b629-5e7208c9cbfc + category_ids: + - charge-point descriptor: - code: energy + name: Spark Charger Point 1 price: - value: '10' - currency: INR / kWH - quantity: - available: '1000' + currency: INR + value: ₹15-20 per unit + tags: + - display: true + descriptor: + name: Available Charging Options + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - id: ede1c8b9-c5b2-4e5f-bbf3-a7421f5e1537 + parent_item_id: 01683e33-39c5-4523-9eef-36e8165e66cb category_ids: - - '1' - fulfillment_ids: - - '3' - - '4' - add_ons: - - id: pe-charging-01-addon-1 + - connector + descriptor: + name: Charger Connector 1 Details + tags: + - display: true + descriptor: + name: Power Rating + list: + - display: true + value: 15kW + - display: true descriptor: - name: Free tyre pressure check - price: - value: '0' - currency: INR - fulfillments: - - id: '3' - type: BATTERY-SWAP - stops: - - location: - gps: 12.745675, 77.987393 - - id: '4' - type: MOBILE-BATTERY-SWAP - stops: - - location: - url: https://log9.in/track/bswap/3234242 + name: Connector Status + list: + - descriptor: + name: Status + display: true + value: Available + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + error: + $ref: '#/components/schemas/Error' + required: + - context responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1032,11 +1034,11 @@ paths: $ref: '#/components/schemas/Error' required: - message - /on_select: + /on_init: post: tags: - Beckn Application Platform (BAP) - description: Send details along with quoted price for selected items + description: Send order object with payment details updated requestBody: content: application/json: @@ -1049,7 +1051,7 @@ paths: - properties: action: enum: - - on_select + - on_init required: - action message: @@ -1057,112 +1059,12 @@ paths: properties: order: $ref: '#/components/schemas/Order' + required: + - order error: $ref: '#/components/schemas/Error' required: - context - examples: - The provider sends the details of the item selected, along with a quote: - value: - context: - domain: dent:0.1.0 - action: on_select - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - - id: pe-charging-01-addon-1 - descriptor: - code: add-on-item - name: Free car wash - price: - value: '0' - currency: INR - fulfillments: - - id: '1' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point Specifications - list: - - descriptor: - name: Charger type - code: charger-type - value: AC - - descriptor: - name: Connector type - code: connector-type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - quote: - price: - value: '32' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - - item: - descriptor: - name: Free car wash - price: - value: '0' - currency: INR responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1188,11 +1090,11 @@ paths: $ref: '#/components/schemas/Error' required: - message - /on_init: + /on_confirm: post: tags: - Beckn Application Platform (BAP) - description: Send draft order object with payment details updated for the service. + description: Send active order object requestBody: content: application/json: @@ -1205,7 +1107,7 @@ paths: - properties: action: enum: - - on_init + - on_confirm required: - action message: @@ -1219,126 +1121,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - The BPP intiates the order, sends the payment link: - value: - context: - domain: dent:0.1.0 - action: on_init - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: order-initiated - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '32' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - url: https://payment.gateway.in - type: PRE-ORDER - status: NOT-PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1364,11 +1146,11 @@ paths: $ref: '#/components/schemas/Error' required: - message - /on_confirm: + /on_track: post: tags: - Beckn Application Platform (BAP) - description: Send active order object with the confirmed order ID + description: Send tracking details of an active order requestBody: content: application/json: @@ -1381,151 +1163,20 @@ paths: - properties: action: enum: - - on_confirm + - on_track required: - action message: type: object properties: - order: - $ref: '#/components/schemas/Order' + tracking: + $ref: '#/components/schemas/Tracking' required: - - order + - tracking error: $ref: '#/components/schemas/Error' required: - context - examples: - The BAP sends an order confirmation: - value: - context: - domain: dent:0.1.0 - action: on_confirm - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: payment-completed - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - instructions: - name: Charging instructions - short_desc: To start your charging, go to charger number 987, and click on 'start' on your app - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '40' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1555,7 +1206,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Sends cancelled order object with the reason. + description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object requestBody: content: application/json: @@ -1582,247 +1233,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - The provider cancels the order after the BAP requested for a cancellation: - value: - context: - domain: dent:0.1.0 - action: on_cancel - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - status: CANCELLED - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: order-cancelled - stops: - - time: - range: - start: '10:00' - end: '10:30' - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '-32' - currency: INR - breakup: - - item: - descriptor: - name: payment refund - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '-32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html - The provider cancels the order after the there was an error in the charger: - value: - context: - domain: dent:0.1.0 - action: on_cancel - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - status: CANCELLED - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - allocated: - measure: - value: '2' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charger-error - stops: - - time: - range: - start: '10:00' - end: '10:30' - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '-12' - currency: INR - breakup: - - item: - descriptor: - name: payment refund - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '-12' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1879,261 +1289,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - The provider sends an updated object to start charging: - value: - context: - domain: dent:0.1.0 - action: on_update - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charging-started - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '40' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html - The provider sends an updated object to stop charging: - value: - context: - domain: dent:0.1.0 - action: on_update - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charging-ended - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '40' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2163,7 +1318,7 @@ paths: post: tags: - Beckn Application Platform (BAP) - description: Fetch the status of a service + description: Fetch the status of a Service requestBody: content: application/json: @@ -2190,134 +1345,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - The provider sends status of the charging: - value: - context: - domain: dent:0.1.0 - action: on_status - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: example-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - order: - id: 6743e9e2-4fb5-487c-92b7 - providers: - id: chargezone.in - descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' - fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - name: vehicle 65% charged - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - billing: - email: abc@example.com - number: +91-9876522222 - quote: - price: - value: '32' - currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' - currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' - cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2375,31 +1402,6 @@ paths: required: - context - message - examples: - The provider responds with a form URL for rating: - value: - context: - domain: dent:0.1.0 - action: on_rating - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - feedback_form: - xinput: - form: - url: https://api.example-bpp.com/pilot/bpp/feedback/portal - required: 'false' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2454,31 +1456,6 @@ paths: $ref: '#/components/schemas/Error' required: - context - examples: - The provider returns support details: - value: - context: - domain: dent:0.1.0 - action: on_support - location: - country: - name: India - code: IND - city: std:080 - version: 1.1.0 - bap_id: example-bap.com - bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 - bpp_id: chargezone-energy-bpp.com - bpp_uri: https://api.example-bpp.com/pilot/bpp/ - transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 - timestamp: '2023-07-16T04:41:16Z' - message: - support: - order_id: 6743e9e2-4fb5-487c-92b7 - phone: 1800 1080 - email: customer.care@chargezone.com - url: https://www.chargezone.com/helpdesk responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2542,7 +1519,7 @@ components: description: Describes a postal address. type: string Agent: - description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + description: 'Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor''s name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride.' properties: person: $ref: '#/components/schemas/Person' @@ -2733,7 +1710,7 @@ components: type: object description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification Context: - description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + description: 'Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer''s location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform''s ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver''s endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions,' type: object properties: domain: @@ -2854,7 +1831,7 @@ components: items: $ref: '#/components/schemas/Image' Domain: - description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + description: 'Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don''t have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large.' type: object properties: name: @@ -3006,7 +1983,7 @@ components: description: Height of the image in pixels type: string Intent: - description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + description: 'The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user''s search to the BPP. This will be used by the BPP to find products or services it offers that may match the user''s intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
' type: object properties: descriptor: @@ -3283,7 +2260,7 @@ components: type: object properties: mimetype: - description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + description: 'indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF''s RFC 6838' type: string url: description: The URL of the file @@ -3454,14 +2431,14 @@ components: contact: $ref: '#/components/schemas/Contact' Payment: - description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + description: 'Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider''s autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions.' type: object properties: id: description: ID of the payment term that can be referred at an item or an order level in a catalog type: string collected_by: - description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + description: 'This field indicates who is the collector of payment. The BAP can set this value to ''bap'' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value ''bpp'' if it wants the payment to be made directly.' url: type: string description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' @@ -3965,4 +2942,4 @@ components: $ref: '#/components/schemas/Form' required: description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. - type: boolean + type: boolean \ No newline at end of file diff --git a/docs/5_Implementation_Guide.md b/docs/5_Implementation_Guide.md index cfe987c..caaa75a 100644 --- a/docs/5_Implementation_Guide.md +++ b/docs/5_Implementation_Guide.md @@ -1,5 +1,4 @@ # Implementation Guide - This document contains the REQUIRED and RECOMMENDED standard functionality that must be implemented by any Energy Producer Platform a.k.a BPPs and Energy Consumer Platforms a.k.a BAPs. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119](https://datatracker.ietf.org/doc/html/rfc2119) from IETF. @@ -7,7 +6,6 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S ## 5.1 Discovery of Energy Sources ### 5.1.1 Recommendations for BPPs - The following recommendations need to be considered when implementing discovery functionality for an Energy Provider BPP - REQUIRED. The BPP MUST implement the `search` endpoint to receive an `Intent` object sent by BAPs @@ -20,7 +18,6 @@ The following recommendations need to be considered when implementing discovery - RECOMMENDED. Upon receiving a `search` request, the BPP SHOULD return a catalog that best matches the intent. This can be done by indexing the catalog against the various probable paths in the `Intent` schema relevant to typical financial service use cases ### 5.1.2 Recommendations for BAPs - - REQUIRED. The BAP MUST call the `search` endpoint of the BG to discover multiple BPPs on a network - REQUIRED. The BAP MUST implement the `on_search` endpoint to consume the `Catalog` objects containing Energy Sources sent by BPPs. - REQUIRED. The BAP MUST expect multiple catalogs sent by the respective Energy Providers on the network @@ -29,2061 +26,54 @@ The following recommendations need to be considered when implementing discovery - REQUIRED. If the `catalog.providers[].items[].xinput.required` field is set to `"true"` , then the BAP MUST NOT fire a `select`, `init` or `confirm` call until the form is submitted and a successful response is received - RECOMMENDED. If the `catalog.providers[].items[].xinput.required` field is set to `"false"` , then the BAP SHOULD allow the user to skip filling the form -### Example - -The search is broadcast to all providers on the network, there will be many providers. The providers could be EV chargers, Discoms or Energy Aggregators. The search request can look something like this. -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "required": { - "value": "4.0", - "unit": "kWH" - } - } - }, - "location": { - "gps": "12.423423,77.325647", - "radius": { - "value": "5", - "unit": "km" - } - } - } - } -} +### Example +A search request for energy may look like this ``` - -The on_search comes from all the providers, The providers have to be mapped to the provider schema. The `on_search` would look like this. - -```json { - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "providers": [ - { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - }, - "categories": [ - { - "id": "1", - "descriptor": { - "code": "green-tariff", - "name": "green tariff" - } - } - ], - "locations": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "code": "IND" } - ], - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWH" - } - } - }, - "category_ids": ["1"], - "location_ids": ["1", "2"], - "fulfillment_ids": ["1", "2"], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Charger type", - "code": "charger-type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type", - "code": "connector-type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - }, - { - "id": "2", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" + "quantity": { + "required": { + "value": "4.0", + "unit": "kWH" } - ], - "display": true - } - ] - } - ] - }, - { - "id": "log9.in", - "descriptor": { - "name": "Log9 Inc" - }, - "categories": [ - { - "id": "1", - "descriptor": { - "code": "green-tariff", - "name": "green tariff" - } - } - ], - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "10", - "currency": "INR / kWH" - }, - "quantity": { - "available": "1000" - }, - "category_ids": ["1"], - "fulfillment_ids": ["3", "4"], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free tyre pressure check" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - ], - "fulfillments": [ - { - "id": "3", - "type": "BATTERY-SWAP", - "stops": [ - { - "location": { - "gps": "12.745675, 77.987393" - } } - ] }, - { - "id": "4", - "type": "MOBILE-BATTERY-SWAP", - "stops": [ - { - "location": { - "url": "https://log9.in/track/bswap/3234242" - } + "location": { + "gps": "12.423423,77.325647", + "radius": { + "value": "5", + "unit": "km" } - ] } - ] } - ] } - } } ``` ## Ordering -This section provides recommendations for implementing the APIs related to creating an order for energy. - -### 5.2.1 Recommendations for BPPs - -#### 5.2.1.1 Selecting a service from the catalog - -- REQUIRED. The BPP MUST implement the `select` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry -- REQUIRED. The BPP MUST check for a form submission at the URL specified on the `xinput.form.url` before acknowledging a `select` request. -- REQUIRED. If the energy service provider has successfully received the information submitted by the energy service consumer, the BPP must return an acknowledgement with `ack.status` set to `ACK` in response to the `select` request -- REQUIRED. If the energy service provider has returned a successful acknowledgement to a `select` request, it MUST send the offer encapsulated in an `Order` object - -#### 5.2.1.2 Initializing an order for an energy related service - -- REQUIRED. The BPP MUST implement the `init` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -#### 5.2.1.3 Confirming an order for an energy related service - -- REQUIRED. The BPP MUST implement the `confirm` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -### 5.2.2 Recommendations for BAPs - -#### 5.2.2.1 Selecting a financial service from the catalog - -#### 5.2.2.2 Initializing an order for a energy service - -#### 5.2.2.3 Confirming the order for the energy service - -### 5.2.3 Example Workflow - -### 5.2.3 Example Requests - -An example of `select` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01", - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - } - ] - } - } -} -``` - -An example of `on_select` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "code": "add-on-item", - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Charger type", - "code": "charger-type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type", - "code": "connector-type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - }, - { - "item": { - "descriptor": { - "name": "Free car wash" - } - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -An example of `init` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "name": "John Doe", - "email": "abc@example.com", - "phone": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ] - } - } -} -``` - -An example of `on_init` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-initiated" - } - }, - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "url": "https://payment.gateway.in", - "type": "PRE-ORDER", - "status": "NOT-PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -An example of `confirm` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "name": "John Doe", - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ], - "payments": [ - { - "collected_by": "BPP", - "params": { - "amount": "40", - "currency": "INR" - }, - "status": "PAID", - "type": "PRE-ORDER" - } - ], - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -An example of `on_confirm` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "payment-completed" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - }, - "instructions": { - "name": "Charging instructions", - "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - ## Fulfillment -This section contains recommendations for implementing the APIs related to fulfilling a energy service order - -### 5.3.1 Recommendations for BPPs - -#### 5.3.1.1 Sending status updates - -- REQUIRED. The BPP MUST implement the `status` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -#### 5.3.1.2 Updating an order for energy service - -- REQUIRED. The BPP MUST implement the `update` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -#### 5.3.1.3 Cancelling a energy service order - -- REQUIRED. The BPP MUST implement the `cancel` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry -- REQUIRED. The BPP MUST implement the `get_cancellation_reasons` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -### 5.3.2 Recommendations for BAPs - -#### 5.3.2.1 Sending status updates - -#### 5.3.2.2 Updating an order for energy service - -#### 5.3.2.3 Cancelling a energy service aporderplication - -#### 5.3.2.4 Real-time tracking - -### 5.3.3 Example Workflow - -### 5.3.4 Example Requests - -An example of `status` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "6743e9e2-4fb5-487c-92b7" - } -} -``` - -An example of `on_status` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "name": "vehicle 65% charged" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -An example of `cancel` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "cancellation_reason_id": "5", - "descriptor": { - "short_desc": "can't attend booking" - }, - "order_id": "6743e9e2-4fb5-487c-92b7" - } - } -} -``` - -An example of `on_cancel` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "status": "CANCELLED", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-cancelled" - } - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "-32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "payment refund" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -An example of `update` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "update_target": "order.fulfillments[0].state", - "order": { - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "code": "start-charging" - } - } - } - ] - } - } -} -``` - -An example of `on_update` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charging-started" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - ## Post-fulfillment - -This section contains recommendations for implementing the APIs after fulfilling a energy service - -### 5.4.1 Recommendations for BPPs - -#### 5.4.1.1 Rating and Feedback - -- REQUIRED. The BPP MUST implement the `rating` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry -- REQUIRED. The BPP MUST implement the `get_rating_categories` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -#### 5.4.1.2 Providing Support - -- REQUIRED. The BPP MUST implement the `support` endpoint on the url specified in URL specified in the `context.bpp_uri` field sent during `on_search`. In case of permissioned networks, this URL MUST match the `Subscriber.url` present on the respective entry in the Network Registry - -### 5.4.2 Recommendations for BAPs - -#### 5.4.2.1 Rating and Feedback - -#### 5.4.2.2 Providing Support - -### 5.4.3 Example Workflow - -### 5.4.4 Example Requests - -An example of `rating` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "rating", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "ratings": [ - { - "id": "6743e9e2-4fb5-487c-92b7", - "rating_category": "charger", - "value": "5" - } - ] - } -} -``` - -An example of `on_rating` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_rating", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "feedback_form": { - "xinput": { - "form": { - "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" - }, - "required": "false" - } - } - } -} -``` - -An example of `support` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "+919876543210", - "email": "john.doe@gmail.com" - } - } -} -``` - -An example of `on_support` request - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "1800 1080", - "email": "customer.care@chargezone.com", - "url": "https://www.chargezone.com/helpdesk" - } - } -} -``` diff --git a/docs/example-implementations/ev-charging-and-battery-swapping.md b/docs/example-implementations/ev-charging-and-battery-swapping.md new file mode 100644 index 0000000..d941405 --- /dev/null +++ b/docs/example-implementations/ev-charging-and-battery-swapping.md @@ -0,0 +1,1296 @@ +# EV Charging and Battery Swapping Application Workflow #1 + +## Overview + +This document outlines the workflow for Electric Vehicle (EV) Charging and Battery Swapping using the DENT Protocol. The workflow includes interactions between the provider and the User for search, select, block, and completing the session. + +Bear in mind that this is just an example workflow for a simple EV Charing and Battery swap workflow between a `User` and a `Provider`. +(Note: Here, User -> Electric Vehicle Owner/User and Provider -> EV Chraging Provider or Battery Swapping Service Provider) + +A typical workflow for EV Charging & Battery Swapping consists of the following steps: + +#### Step 1: User searches for EV Chargers + +The user provides current location and specific requirements (These requirements will act as filters for EV Charging Providers such as amount of energy user needs in kwh) to find the nearest EV Chargers to charge his/her EV + +#### Step 2: Provider sends catalogs of EV Chargers nearby + +The provider platform (BPP) sends all the nearby Providers and their catalogs to the user. +The catalog will consist of all the services provided by the providers, such as charging types, connector types and battery swapping services etc., + +#### Step 3: User selects EV Charger or Battery Swapping Service + +Selects the provider which satisfies user requirements. +In this stage, the user may select additional features such as: + +1. User can select his required services (such as EV Charging or Battery Swapping) from the catalog of provider +2. User selects the vehicle type of his EV (2-wheeler/3-wheeler/4-wheeler), selects the battery type (such as log9 battery), and also provides the EV's information. +3. User can block/reserve the charger/swap service for a certain time slot, along with the start and duration times of the session. +4. User can select the charger type he wants to use such as A.C. or D.C. and Connector types like CCS2 etc., +5. User can select quantity of energy required in units of kwh. + +#### Step 4: Provider sends quoted price + +The provider will receive the order based on the user requirements. +The user gets the quoted price, including the breakdown of the price details. +The breakdown should include: + +- Tariff per unit (i.e., INR/KWh), the tariff per unit might change by the service type, charger type and location of Energy Charger Provider +- (or) Price for Battery Swapping +- Price for reservation +- Taxes + +#### Step 5: User initiates the order + +User initializes the order by providing billing details. +Here, the user will provide their `Name`, `Email ID` and `Phone Number` and updates the payment details + +#### Step 6: Provider sends draft order + +The provider sends the draft order with the payment and fulfilment terms to the user-side. +Based on how much units of Electrical Energy user used during charging as tariff_per_unit as already mentioned above in INR/KWh or the Price for Battery Swapping Service +If the user also done the reservation/block the transaction includes the price for block/use-up price as well +The tariff_per_unit might change with the charger type as we know that A.C. charger type has different price compared to D.C. charger type. + +#### Step 7: User confirms the order + +User sees the draft order and confirms it by agreeing to the payment and fulfilment terms and conditions +The confirm status will sent to the provider saying that user has paid the price and satisfied the fulfillment terms + +#### Step 8: Provider sends the order activation + +The provider will activates the order and informs user that the order is activated + +#### Step 9: User checks the status of the order + +The user requests to check the updates/status of his/her order + +#### Step 10: Provider sends the status of the order + +The provider will send the order updates with current status to the user + +## Search (Searching for EV Chargers) + +1. The user declares the intent for EV Charging/Battery Swap to the providers +2. Providers publish the catalog of their services + +### User-side Actions + +A EV user can declare their intent for charging their EV in many ways like: + +- Searching for EV Charging/Battery Swap Providers based on current location of user +- Searching for EV Charging Providers based on quantity required +- Searching for Battery Swap Providers based on battery type +- Searching for EV Charging/Battery Swap Providers based on Name/Code of provider +- Searching for EV Charging/Battery Swap Providers based on ratings +- View list of energy sources, such as EV chargers, Solar Farms providing EV charging, Houses providing EV charging, Battery Swap Providers etc. +- Viewing the catalog/details of services provided by a particular charging/Battery Swap provider + +### Provider-side Actions + +In this interaction, the Provider publishes their catalog of services and products. A Provider can publish various types of catalogs like + +- Publish list of energy sources and EV chargers including Solar Farms providing EV charging, Houses, Battery Swap Providers etc. +- Publish list of provders in 5Km radius of user +- Publish list of provders with the requested Charing types/Connector types/Battery types +- Publish catalog/details of services provided by providers +- Publish catalog of services provided by a particular provider + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Declare Intent to EV Charging / Battery swapping + Provider->>User: Publish Catalog of services available +``` + +### Beckn Protocol API Workflow + +In beckn protocol, the search intent generated by the EV User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs return their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. + +```mermaid + sequenceDiagram + User Platform (BAP)->>Gateway (BG): Declare Intent to charge EV / swap battery ( search ) + Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) + Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kwh energy quantity required (200 OK) + Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to charge EV or Swap Battery (search) + Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to charge EV or Swap Battery (search) + Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to charge EV or Swap Battery(search) + Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) + Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) + Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) +``` + +#### Example `search` api Json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "required": { + "value": "4.0", + "unit": "kWH" + } + }, + "category": { + "descriptor": { + "code": "green-tariff" + } + } + }, + "location": { + "gps": "12.423423,77.325647", + "radius": { + "type": "CONSTANT", + "value": "5", + "unit": "km" + } + } + } + } +} +``` + +#### Example `on_search` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "providers": [ + { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + }, + "locations": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWH" + } + } + }, + "locations": ["1", "2"], + "fulfillments": ["1", "2"] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Charger type", + "code": "charger-type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type", + "code": "connector-type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + }, + { + "id": "2", + "type": "CHARGING", + "stops": [ + { + "time": { + "range": { + "start": "10:30", + "end": "11:00" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + }, + { + "id": "log9.in", + "descriptor": { + "name": "Log9 Inc" + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "10", + "currency": "INR / kWH" + }, + "quantity": { + "available": "1000" + }, + "fulfillments": ["3", "4"] + } + ], + "fulfillments": [ + { + "id": "3", + "type": "BATTERY-SWAP", + "stops": [ + { + "location": { + "gps": "12.745675, 77.987393" + } + } + ] + }, + { + "id": "4", + "type": "MOBILE-BATTERY-SWAP", + "stops": [ + { + "location": { + "url": "https://pulseenergy.in/track/bswap/3234242" + } + } + ] + } + ] + } + ] + } + } +} +``` + +## Select and Book Charging + +1. User selects a EV Charge/ Battery Swap Provider from the list which satisfies the requirements +2. The provider sends the draft order with the quoted price to the User + +### User-side Actions + +- Selecting EV Charge/Battery Swap Provider(s) after viewing catalogs +- Selecting to block/use-up charger (or) not. (Y/N) +- Selecting start and end time for block/use-up of charger/swap service +- Selecting charger type (A.C./D.C.) and connector type +- Selecting vehicle type (2-wheeler, 3-wheeler, 4-wheeler) and its battery type + +### Provider-side Actions + +- Receive user's selection +- Requesting for block/use-up charger (Y/N) +- Requesting for time slot +- Requesting for charger type, connecter type, vehicle type and battery type +- Provider sends draft order for the selected EV charge with quoted price +- The price includes with a breakdown of `tariff_per_unit` (or) `price for battery swap`, `Reservation Price`, `taxes` + +### Logical Workflow + +The below diagram illustrates the logical interactions between a EV user and Provider during the Selecting service/product stage + +```mermaid + sequenceDiagram + User->>Provider: Selects a EV charger/battery swap provider + Provider->>User: Request for block/use-up (Y/N) + User->>Provider: Selects for block/use-up (Y/N) + Provider->>User: Request for time slot - start & end + User->>Provider: Selects start & end time slot + Provider->>User: Requesting for charger type, vehicle type & battery type + User->>Provider: Selects charger, vehicle and battery type + Provider->>User: Sends the draft order with quoted price +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): Select EV charge/Battery swap Provider after seeing catalogs of all providers (select) + Provider 1 (BPP)->>User Platform (BAP): Publish Provider 1 catalog (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select one from EV charging & Battery Swap as a service from Provider 1 (select) + Provider 1 (BPP)->>User Platform (BAP): Request block/use-up (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select block/use-up (select) + Provider 1 (BPP)->>User Platform (BAP): Request time slot to block, charging type, vehicle type and battery type of EV (on_select) + User Platform (BAP)->> Provider 1 (BPP): Select time slot to block and charging type, vehicle type and battery type of EV (select) + Provider 1 (BPP)->>User Platform (BAP): Send draft order with quoted price and breakdown (on_select) +``` + +#### Example `select` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01", + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + } + ] + } + } +} +``` + +#### Example `on_select` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "chargezone.in", + "descriptor": { + "name": "Chargezone", + "short_desc": "Chargezone Technologies Pvt Ltd", + "images": [ + { + "url": "https://chargezone.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "energy" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "100", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + } + ], + "quote": { + "price": { + "value": "32", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units consumed" + }, + "quantity": { + "selected": { + "measure": { + "value": "4", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "32", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +## Order Initialization + +In this stage, the User provides the required information and initiates the order + +### User-side Actions + +- User provides the billing details `Name`, `Email ID` and `Phone Number` +- User updates the payment details and initiates the order + +### Provider-side Actions + +- Request for billing details +- Receive billing details from the user +- Send draft order with payment and fulfillment terms + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Provides billing details and initates the order + Provider->>User: Send draft order with payment transcript and fulfillment terms +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP updates billing details and initiates the order(init) + Provider 1 (BPP)->>User Platform (BAP): BPP sends draft order with breakdown and fulfillment terms (on_init) +``` + +#### Example `init` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "chargezone.in" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "name": "John Doe", + "email": "abc@example.com", + "phone": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "person": { + "name": "John Doe" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ] + } + } +} +``` + +#### Example `on_init` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "pulse-energy", + "descriptor": { + "name": "Pulse Energy", + "short_desc": "Pulse Energy Technologies Pvt Ltd", + "images": [ + { + "url": "https://pulseenergy.io/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "ee" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": "100" + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "code": "order-initiated" + } + }, + "vehicle": { + "category": "car", + "make": "Tata", + "model": "Nexon EV", + "variant": "ZX+", + "wheels_count": "4", + "energy_type": "electric" + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "title": "units consumed", + "price": { "value": "40", "currency": "INR" } + }, + { + "title": "charging fees", + "price": { "value": "10", "currency": "INR" } + }, + { + "title": "cgst", + "price": { "value": "4", "currency": "INR" } + }, + { + "title": "sgst", + "price": { "value": "4", "currency": "INR" } + } + ] + }, + "payments": [ + { + "url": "https://payment.gateway.in", + "type": "PRE-ORDER", + "status": "NOT-PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ] + } + } +} +``` + +## Fulfillment (Payment and Order Confirmation) + +User will check the order details and confirms the order with payment (might also update the order) +Post payment user will activates the confirmed order + +### User-side Actions + +- Confirms(\updates) the order by agreeing to fulfillment terms + +### Provider-side Actions + +- Receive order confirmation from the user +- Send active confirmed order to the user + +## Status Updates and Monitoring + +### User-side Actions + +- Request to fetch the latest status of the order + +#### Provider-side Actions + +- Provide the latest status of the order to the user + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Confirms (\Updates) the order and pays the the price + Provider->>User: Send active confirmed order + User->>Provider: Request for latest status of order + Provider->>User: Sends the latest status of order +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP updates the payment and confirms the order and fulfillment terms(confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP sends active confirmation of order (on_confirm) + User Platform (BAP)->> Provider 1 (BPP): BAP request to fetch the status of the order (status) + Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) +``` + +#### Example `confirm` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "pulse-energy" + }, + "items": [ + { + "id": "pe-charging-01" + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1" + }, + { + "vehicle": { + "category": "car", + "make": "Tata", + "model": "Nexon EV", + "variant": "ZX+", + "wheels_count": "4", + "energy_type": "electric" + } + } + ] + } + } +} +``` + +#### Example `on_confirm` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "pulse-energy", + "descriptor": { + "name": "Pulse Energy", + "short_desc": "Pulse Energy Technologies Pvt Ltd", + "images": [ + { + "url": "https://pulseenergy.io/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "ee" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": "100" + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "code": "payment-completed" + } + }, + "vehicle": { + "category": "car", + "make": "Tata", + "model": "Nexon EV", + "variant": "ZX+", + "wheels_count": "4", + "energy_type": "electric" + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "title": "charging cost", + "price": { "value": "32", "currency": "INR" } + }, + { + "title": "cgst", + "price": { "value": "4", "currency": "INR" } + }, + { + "title": "sgst", + "price": { "value": "4", "currency": "INR" } + } + ] + }, + "payments": [ + { + "type": "PRE-FULFILLMENT", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ] + } + } +} +``` + +#### #### Example `status` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "6743e9e2-4fb5-487c-92b7" + } +} +``` + +#### #### Example `status` api json: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "pulse-energy-bpp.com", + "bpp_uri": "https://api.pulse-energy-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "6743e9e2-4fb5-487c-92b7", + "providers": { + "id": "pulse-energy", + "descriptor": { + "name": "Pulse Energy", + "short_desc": "Pulse Energy Technologies Pvt Ltd", + "images": [ + { + "url": "https://pulseenergy.io/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "pe-charging-01", + "descriptor": { + "code": "ee" + }, + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": "100" + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "CHARGING", + "state": { + "descriptor": { + "name": "vehicle 65% charged" + } + }, + "vehicle": { + "category": "car", + "make": "Tata", + "model": "Nexon EV", + "variant": "ZX+", + "wheels_count": "4", + "energy_type": "electric" + }, + "stops": [ + { + "time": { + "range": { + "start": "10:00", + "end": "10:30" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Charging Point" + }, + "list": [ + { + "descriptor": { + "name": "Charger type" + }, + "value": "AC" + }, + { + "descriptor": { + "name": "Connector type" + }, + "value": "CCS2" + }, + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "abc@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "title": "charging cost", + "price": { "value": "32", "currency": "INR" } + }, + { + "title": "cgst", + "price": { "value": "4", "currency": "INR" } + }, + { + "title": "sgst", + "price": { "value": "4", "currency": "INR" } + } + ] + }, + "payments": [ + { + "type": "PRE-FULFILLMENT", + "status": "PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ] + } + } +} +``` diff --git a/docs/example-implementations/ev-charging.md b/docs/example-implementations/ev-charging.md deleted file mode 100644 index 8e68141..0000000 --- a/docs/example-implementations/ev-charging.md +++ /dev/null @@ -1,3053 +0,0 @@ -# EV Charging Application Workflow #1 - -## Overview - -This document outlines the workflow for Electric Vehicle (EV) Charging using the DENT Protocol. The workflow includes interactions between the charging point operator (BPP) and the BAP for search, select, block, and completing the session. - -Bear in mind that this is just an example workflow for a simple EV Charing and Battery swap workflow between a `User` and a `Provider`. -(Note: Here, User -> Electric Vehicle Owner/User and Provider -> EV Charging Provider) - -A typical workflow for EV Charging consists of the following steps: - -#### Step 1: The BAP searches for EV Chargers - -The BAP provides specific requirements to find the nearest EV Chargers to charge their EV -The search can be based on the location, location and the energy requirements or location, energy requirements and charger details. - -#### Step 2: Provider sends catalogs of EV Chargers nearby - -The provider platform (BPP) sends the catalogs of all nearby charging providers to the BAP. -The catalog will consist of various charging stations with their respective attributes such as charging types, connector types, power rating. - -> **Note**: The BPP is not expected to run an inventory check before it sends out their catalogs. They are free to send out their entire catalogs, but if a BAP has a request with specific timing, they can send the appropraite catalogs. The BPP can also choose to send add ons in their catalogs that the BAP can avail. - -#### Step 3: The BAP selects a EV Charger Service - -Selects the provider which satisfies user requirements. -In this stage, The BAP may select additional features such as: - -1. The BAP can select his required services (such as EV Charging) from the catalog of provider -2. The BAP can block/reserve the charger/swap service for a certain time slot, along with the start and duration times of the session. -3. The BAP can select the charger type he wants to use such as A.C. or D.C. and Connector types like CCS2 etc., -4. The BAP can select quantity of energy required in units of kwh. -5. The BAP can select the provider based on a location that helps them fulfill their intent. - -#### Step 4: Provider sends quoted price - -The provider will receive the order based on the BAP's requirements. -The user gets the quoted price, including the breakdown of the price details. -The breakdown should include: - -- Tariff per unit (i.e., INR/KWh), the tariff per unit might change by the service type, charger type and location of Energy Charger Provider -- Price for reservation - -Apart from this, the provider can include add ons to the items for the BAP, these add ons can be services that can be availed in that location. In the case of EV charging it could be free car wash, free tyre pressure check etc. - -Providers can also include discounts to the items based on partnerships or subscriptions. - -#### Step 5: The BAP initiates the order - -The BAP initializes the order by providing billing details, apart from the details of the items chosen. -Here, the BAP will provide their `Name`, `Email ID` and `Phone Number` and updates the payment details - -The BAP can send vehicle details to avail add ons and offers for that particular vehicle type or company. - -#### Step 6: Provider sends draft order - -The provider sends the draft order with the payment and fulfilment terms to the user-side. -Based on how much units of Electrical Energy user used during charging as tariff_per_unit as already mentioned above in INR/KWh -If the user also done the reservation/block the transaction includes the price for block/use-up price as well -The tariff_per_unit might change with the charger type as we know that A.C. charger type has different price compared to D.C. charger type. - -During this interaction, the BPP can block the charger for the specified amount of time at that particular price and wait for a confirm call. The quote will no longer be valid after a certain amount of time. The quote would have to be re-calculated for a new order. -The BPP sends the payment link, the BAP uses the link to complete the payment. - -#### Step 7: The BAP confirms the order - -The BAP sees the draft order and confirms it by agreeing to the payment and fulfilment terms and conditions -The confirm status will sent to the provider saying that user has paid the price and satisfied the fulfillment terms, the order will also have instructions on how to connect to the charger. - -#### Step 8: Provider sends the order activation - -The provider will activate the order when the user updates the provider to start the charging. - -#### Step 9: User checks the status of the order - -The BAP requests to check the updates/status of their order, this can include the percentage of charge completed. - -#### Step 10: Provider sends the status of the order - -The provider will send the order updates with current status to the BAP - -#### Step 11: The BAP or the provider cancels the order. - -The BAP or the provider can cancel the order for various reasons. The provider can cancel the order if there is failure on their side, in which case the appropriate refund will be processed. - -## Search (Searching for EV Chargers) - -1. The user declares the intent for EV Charging to the providers -2. Providers publish the catalog of their services - -### User-side Actions - -A EV user can declare their intent for charging their EV in many ways like: - -- Searching for EV Charging Providers based on current location of user -- Searching for EV Charging Providers based on quantity required -- Searching for EV Charging based on Name/Code of provider -- Searching for EV Charging Providers based on ratings -- View list of energy sources, such as EV chargers, Solar Farms providing EV charging, Houses providing EV charging, Battery Swap Providers etc. - -### Provider-side Actions - -In this interaction, the Provider publishes their catalog of services and products. A Provider can publish various types of catalogs like - -- Publish list of energy sources and EV chargers including Solar Farms providing EV charging, Houses, Battery Swap Providers etc. -- Publish list of provders in 5Km radius of user -- Publish list of provders with the requested Charing types/Connector types/Battery types -- Publish catalog/details of services provided by providers -- Publish catalog of services provided by a particular provider - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Declare Intent to EV Charging - Provider->>User: Publish Catalog of services available -``` - -### Beckn Protocol API Workflow - -In beckn protocol, the search intent generated by the EV User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs return their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. - -```mermaid - sequenceDiagram - User Platform (BAP)->> Gateway (BG): Declare Intent to charge EV ( search ) - Gateway (BG)->> Registry: Lookup Provider Platforms (lookup) - Registry ->> Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kwh energy quantity required (200 OK) - Gateway (BG)->> Provider Platform 1 (BPP1): Declare Intent to charge EV (search) - Gateway (BG)->> Provider Platform 2 (BPP2): Declare Intent to charge EV (search) - Gateway (BG)->> Provider Platform n (BPPn): Declare Intent to charge EV (search) - Provider Platform 1 (BPP1)->> User Platform (BAP): Publish Catalog of Provider 1 (on_search) - Provider Platform 2 (BPP2)->> User Platform (BAP): Publish Catalog of Provider 2 (on_search) - Provider Platform n (BPPn)->> User Platform (BAP): Publish Catalog of Provider n (on_search) -``` - -#### Example `search` api Json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "intent": { - "item": { - "descriptor": { - "code": "energy" - }, - "quantity": { - "required": { - "value": "4.0", - "unit": "kWH" - } - }, - "category": { - "descriptor": { - "code": "green-tariff" - } - } - }, - "location": { - "gps": "12.423423,77.325647", - "radius": { - "type": "CONSTANT", - "value": "5", - "unit": "km" - } - } - } - } -} -``` - -#### Example `on_search` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_search", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "catalog": { - "providers": [ - { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - }, - "categories": [ - { - "id": "1", - "descriptor": { - "code": "green-tariff", - "name": "green tariff" - } - } - ], - "locations": [ - { - "id": "1", - "gps": "12.345345,77.389754" - }, - { - "id": "2", - "gps": "12.247934,77.876987" - } - ], - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR / kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWH" - } - } - }, - "category_ids": ["1"], - "location_ids": ["1", "2"], - "fulfillment_ids": ["1", "2"], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Charger type", - "code": "charger-type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type", - "code": "connector-type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - }, - { - "id": "2", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ] - }, - { - "id": "log9.in", - "descriptor": { - "name": "Log9 Inc" - }, - "categories": [ - { - "id": "1", - "descriptor": { - "code": "green-tariff", - "name": "green tariff" - } - } - ], - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "10", - "currency": "INR / kWH" - }, - "quantity": { - "available": "1000" - }, - "category_ids": ["1"], - "fulfillment_ids": ["3", "4"], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free tyre pressure check" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - ], - "fulfillments": [ - { - "id": "3", - "type": "BATTERY-SWAP", - "stops": [ - { - "location": { - "gps": "12.745675, 77.987393" - } - } - ] - }, - { - "id": "4", - "type": "MOBILE-BATTERY-SWAP", - "stops": [ - { - "location": { - "url": "https://log9.in/track/bswap/3234242" - } - } - ] - } - ] - } - ] - } - } -} -``` - -## Select and Book Charging - -1. User selects a EV Charge Provider from the list which satisfies the requirements -2. The provider sends the draft order with the quoted price to the User - -### User-side Actions - -- Selecting EV Charge Provider(s) after viewing catalogs -- Selecting to block/use-up charger (or) not. (Y/N) -- Selecting start and end time for block/use-up of charger service -- Selecting charger type (A.C./D.C.) and connector type - -### Provider-side Actions - -- Receive user's selection -- Requesting for block/use-up charger (Y/N) -- Requesting for time slot -- Requesting for charger type, connecter type, vehicle type and battery type -- Provider sends draft order for the selected EV charge with quoted price -- The price includes with a breakdown of `tariff_per_unit` , `Reservation Price`, `taxes` - -### Logical Workflow - -The below diagram illustrates the logical interactions between a EV user and Provider during the Selecting service/product stage - -```mermaid - sequenceDiagram - User->>Provider: Selects a EV charger provider - Provider->>User: Request for block/use-up (Y/N) - User->>Provider: Selects for block/use-up (Y/N) - Provider->>User: Request for time slot - start & end - User->>Provider: Selects start & end time slot - Provider->>User: Requesting for charger type, vehicle type & battery type - User->>Provider: Selects charger, vehicle and battery type - Provider->>User: Sends the draft order with quoted price -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): Select EV charge Provider after seeing catalogs of all providers (select) - Provider 1 (BPP)->>User Platform (BAP): Publish Provider 1 catalog (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select one from EV charging & Battery Swap as a service from Provider 1 (select) - Provider 1 (BPP)->>User Platform (BAP): Request block/use-up (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select block/use-up (select) - Provider 1 (BPP)->>User Platform (BAP): Request time slot to block, charging type, vehicle type and battery type of EV (on_select) - User Platform (BAP)->> Provider 1 (BPP): Select time slot to block and charging type, vehicle type and battery type of EV (select) - Provider 1 (BPP)->>User Platform (BAP): Send draft order with quoted price and breakdown (on_select) -``` - -#### Example `select` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01", - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - } - ] - } - } -} -``` - -#### Example `on_select` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_select", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "code": "add-on-item", - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ], - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point Specifications" - }, - "list": [ - { - "descriptor": { - "name": "Charger type", - "code": "charger-type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type", - "code": "connector-type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - }, - { - "item": { - "descriptor": { - "name": "Free car wash" - } - }, - "price": { - "value": "0", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -## Order Initialization - -In this stage, the User provides the required information and initiates the order - -### User-side Actions - -- User provides the billing details `Name`, `Email ID` and `Phone Number` -- User updates the payment details and initiates the order - -### Provider-side Actions - -- Request for billing details -- Receive billing details from the user -- Send draft order with payment and fulfillment terms - -### Logical Workflow - -```mermaid - sequenceDiagram - User->>Provider: Provides billing details and initates the order - Provider->>User: Send draft order with payment transcript and fulfillment terms -``` - -### Beckn Protocol API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP updates billing details and initiates the order(init) - Provider 1 (BPP)->>User Platform (BAP): BPP sends draft order with breakdown and fulfillment terms (on_init) -``` - -#### Example `init` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "provider": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "name": "John Doe", - "email": "abc@example.com", - "phone": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ] - } - } -} -``` - -#### Example `on_init` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_init", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-initiated" - } - }, - "stops": [ - { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "url": "https://payment.gateway.in", - "type": "PRE-ORDER", - "status": "NOT-PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -## Fulfillment (Payment and Order Confirmation and Cancellation) - -User will check the order details and confirms the order with payment (might also update the order) -Post payment user will activates the confirmed order - -### User-side Actions - -- Confirms(\updates) the order by agreeing to fulfillment terms - -### Provider-side Actions - -- Receive order confirmation from the user -- Send active confirmed order to the user - -## Status Updates and Monitoring - -### User-side Actions - -- Request to fetch the latest status of the order - -#### Provider-side Actions - -- Provide the latest status of the order to the user - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Confirms (\Updates) the order and pays the the price - Provider->>User: Send active confirmed order - User->>Provider: Request for latest status of order - Provider->>User: Sends the latest status of order -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP updates the payment and confirms the order and fulfillment terms(confirm) - Provider 1 (BPP)->>User Platform (BAP): BPP sends active confirmation of order (on_confirm) - User Platform (BAP)->> Provider 1 (BPP): BAP request to start the charging (update) - Provider 1 (BPP)->>User Platform (BAP): BPP starts the charging and sends an update (on_update) - User Platform (BAP)->> Provider 1 (BPP): BAP request to fetch the status of the order (status) - Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) - User Platform (BAP)->> Provider 1 (BPP): BAP request to start the charging (update) - Provider 1 (BPP)->>User Platform (BAP): BPP stops the charging and sends an update (on_update) -``` - -#### Example `confirm` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "providers": { - "id": "chargezone.in" - }, - "items": [ - { - "id": "pe-charging-01" - } - ], - "billing": { - "name": "John Doe", - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - } - } - ], - "payments": [ - { - "collected_by": "BPP", - "params": { - "amount": "40", - "currency": "INR" - }, - "status": "PAID", - "type": "PRE-ORDER" - } - ], - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - } - } - } -} -``` - -#### Example `on_confirm` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_confirm", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "payment-completed" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - }, - "instructions": { - "name": "Charging instructions", - "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -#### Example `update` api json to start charging: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "update_target": "order.fulfillments[0].state", - "order": { - "fulfillments": [ - { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "code": "start-charging" - } - } - } - ] - } - } -} -``` - -#### Example `on_update` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charging-started" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -#### Example `update` api json to stop charging: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "update_target": "order.fulfillments[0].state", - "order": { - "fulfillments": [ - { - "id": "1", - "state": { - "descriptor": { - "code": "end-charging" - } - } - } - ] - } - } -} -``` - -#### Example `on_update` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charging-ended" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -#### Example `status` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order_id": "6743e9e2-4fb5-487c-92b7" - } -} -``` - -#### Example `on_status` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_status", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "name": "vehicle 65% charged" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -#### Example `cancel` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "cancellation_reason_id": "5", - "descriptor": { - "short_desc": "Can't make it on time" - }, - "order_id": "6743e9e2-4fb5-487c-92b7" - } - } -} -``` - -#### Example `on_cancel` api json: - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "status": "CANCELLED", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-cancelled" - } - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ] - } - } -} -``` - -#### example for `support` call - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "+919876543210", - "email": "john.doe@gmail.com" - } - } -} -``` - -#### example for `on_support` call - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "1800 1080", - "email": "customer.care@chargezone.com", - "url": "https://www.chargezone.com/helpdesk" - } - } -} -``` - -## Order cancel - -### User-side Actions - -- Request to cancel the order - -#### Provider-side Actions - -- Cancels the order of the BAP - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Cancels the order - Provider->>User: Sends cancellation confirmation -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP cancels the order (cancel) - Provider 1 (BPP)->>User Platform (BAP): BPP sends cancellation of order (on_cancel) -``` - -#### example `cancel` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "cancellation_reason_id": "5", - "descriptor": { - "short_desc": "can't attend booking" - }, - "order_id": "6743e9e2-4fb5-487c-92b7" - } - } -} -``` - -#### example `on_cancel` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "status": "CANCELLED", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "order-cancelled" - } - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "-32", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "payment refund" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -#### example `on_cancel` JSON triggered by BPP - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "status": "CANCELLED", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - }, - "allocated": { - "measure": { - "value": "2", - "unit": "kWh" - } - } - }, - "fulfillments": ["1"] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charger-error" - } - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "-12", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "payment refund" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-12", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} -``` - -## Order rating - -### User-side Actions - -- Request to rate the order - -#### Provider-side Actions - -- Rates the order of the BAP - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Rates the order - Provider->>User: Sends rating confirmation -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP rates the order (rating) - Provider 1 (BPP)->>User Platform (BAP): BPP sends rating of order (on_rating) -``` - -#### example `rating` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "rating", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "ratings": [ - { - "id": "6743e9e2-4fb5-487c-92b7", - "rating_category": "charger", - "value": "5" - } - ] - } -} -``` - -#### example `on_rating` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_rating", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "feedback_form": { - "xinput": { - "form": { - "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" - }, - "required": "false" - } - } - } -} -``` - -## Order support - -### User-side Actions - -- Request to get support for the order - -#### Provider-side Actions - -- Provides support to the BAP - -### Logical Worklow - -```mermaid - sequenceDiagram - User->>Provider: Request to get support for the order - Provider->>User: Sends support to the BAP -``` - -### Beckn API Workflow - -```mermaid - sequenceDiagram - User Platform (BAP)->> Provider 1 (BPP): BAP requests to get support for the order (cancel) - Provider 1 (BPP)->>User Platform (BAP): BPP sends support of order (on_cancel) -``` - -#### example `support` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "+919876543210", - "email": "john.doe@gmail.com" - } - } -} -``` - -#### example `on_support` JSON - -```json -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_support", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "support": { - "order_id": "6743e9e2-4fb5-487c-92b7", - "phone": "1800 1080", - "email": "customer.care@chargezone.com", - "url": "https://www.chargezone.com/helpdesk" - } - } -} -``` diff --git a/docs/example-implementations/general-energy-transaction-1.md b/docs/example-implementations/general-energy-transaction-1.md new file mode 100644 index 0000000..1773e05 --- /dev/null +++ b/docs/example-implementations/general-energy-transaction-1.md @@ -0,0 +1,841 @@ +# General Energy Transaction Workflow #1 + +## Overview + +This implementation guide outlines the energy transaction process where Sheru (Energy Aggregator) purchases energy from individuals or crowds using the Beckn Protocol. The guide provides step-by-step instructions on how Sheru interacts with the Unified Energy Interface (UEI) to discover energy sources, select providers, initiate transactions, confirm orders, and monitor status updates. + +## Important NOTE : + +- During Auto-Discharge, the provider will sign a consent form such that upon the initiation of the energy transaction, access to discharging/dischargeing the energy from the battery or source of energy is completely given to UEI, until the transaction is completed. +- Since, only UEI has the control/access to discharge the battery or energy source, there is no need of penalty. +- During Manual Discharge, the control/access are not given to UEI; rather, the provider him/herself will discharge/discharge the energy. +- In this case, if the provider has not satisfied the terms he/she agreed upon during the transaction, then the provider has to pay the penalty for the amount of energy he/she was not able to provide. +- The form of energy discharging, either through Auto-Discharging or Manual-Discharging is completely the provider's choice, which is a `pre-select` feature for the provider. + +Bear in mind that this is just an example workflow for a simple Energy transaction where Sheru buys the Energy from the individuals/crowd using UEI. + +(Note: Here, User -> Sheru and Provider -> Individual/Crowd who is providing energy and UEI -> Unified Energy Interface) + +A typical workflow for EV Charging & Battery Swapping consists of the following steps: + +#### Step 1: Discovery of Electricity + +- The user searches providers who agree to Auto-Discharge or else Manual-Discharge (which will act as a filter for search) + 1. Automatic discharge + - Complete control of discharge is given to the UEI. + 2. Manual Discharge + - Commit to providing the required energy; penalties for non-compliance are applicable. +- The user searches for providers who provides the greater than equal to amount of energy needed in kWH (which will act as a filter for the search). + +#### Step 2: Provider platform sends catalogs of Individuals nearby + +The UEI sends all the catalogs to the user. +The list of catalogs consists of: + +- Individuals/Crowds from whom energy can be bought (Name, Phone Number, Email ID) +- Mode of Energy discharge provider has agreed upon (i.e, Automatic discharge / Manual Discharge) +- Available areas/locations for energy purchases +- Available amount of energy (in kWH) +- Tariff per unit (in INR/kWH) + +#### Step 3: Sheru selects a Provider + +The user selects a suitable individual/crowd provider from the list of provided catalogs, from either Automatic Discharge or else Manual Discharge +The user selects the required amount of energy (in kWH) +The UEI notifies the chosen individual that Sheru intends to buy energy + +#### Step 4: Provider sends the draft order with quoted price + +The provider acknowledges the notification sent by UEI for selling energy +The provider will receive the order based on the user's requirements. The user gets the quoted price, including the breakdown of the price details. The breakdown should include: + +1. Tariff per unit (i.e., INR/kWH), might change based on location of Energy Provider +2. Amount of energy requested (in kWH) +3. Price for energy (in INR) : (Amount of energy requested) x (Tariff per unit) +4. Taxes: CGST & SGST + +#### Step 5: Initiating the transaction + +The user initializes the order by providing the billing details such as (Name, Phone Number, Email ID) +The UEI requests the provider to accept the consent form (i.e., a check box) to take control/access to discharging the battery/energy source during Auto Discharge (in the case of Auto-Discharge Providers) + +#### Step 6: Provider sends draft order + +[In case of Auto-discharge.] The provider signs the consent letter (i.e., ticks the check box), that implies the provider is giving control to UEI for discharging their battery or energy source. +The provider sends the draft order with the payment link and fulfillment terms to the user's side. +A payment link is sent to user to complete the payment + +#### Step 7: Provider accepts the terms and conditions + +Provider confirms to satisfy the fulfillment terms and conditions (confirm) +If Provider selects Automatic discharge, no additional confirmation is needed. +If Provider selects Manual Discharge: + +- Provider confirms commitment to fulfillment terms. +- If energy provision fails, a penalty is applicable. + +#### Step 8: User confirms the order by payment fulfillment + +User sees the confirmation of the provider for the fulfillment terms and conditions. (on_confirm) +Upon that, the user pays the quoted price for the draft order and activates the order by agreeing to the payment +The confirmation will sent to the provider through UEI, saying that user has paid the price and satisfies the fulfillment terms (confirm) +The UEI will activate the order after fulfillment of payment and confirmation of user and provider, respectively. (on_confirm) + +#### Step 9: User checks the status of the order + +The user requests to fetch the order status/amount of discharged energy + +#### Step 10: UEI sends the status of the order + +UEI provides status updates for the order (i.e., the amount of energy has been discharged so far). +UEI can send reminders to the provider for upcoming energy discharges (manual or automatic). + +## Search (Searching for Provider) + +1. The user declares the intent to buying energy to the providers +2. Providers publish the catalogs + +### User-side Actions + +A user can declare their intent to buy energy in many ways, like: + +- Searching for Providers based on location +- Searching for Providers based on mode fo discharge (Automatic/Manual) +- Searching for Providers based on quantity required energy (in kWH) +- Searching for Providers based on tariff per unit (in INR/kWH) +- Searching for Providers based on Name or Code of provider +- Searching for Providers based on ratings +- Viewing the catalog/details of services provided by a particular providers + +### Provider-side Actions + +In this interaction, the Provider publishes their catalog. The catalog mainly consits of : + +- Individuals or crowds from whom energy can be bought. +- Full Name, Phone Number, Email-ID +- Locations where energy can be purchased (Address) +- Mode of discharge (Automatic Discharge or Manual Discharge) +- Tariff per unit and available amount of energy + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Declare Intent to buy energy + Provider->>User: Publish Catalog of providers +``` + +### Beckn Protocol API Workflow + +In beckn protocol, the search intent generated by the User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs returns their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. + +```mermaid + sequenceDiagram + User Platform (BAP)->>Gateway (BG): Declare Intent to buy charging ( search ) + Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) + Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kWH energy quantity required (200 OK) + Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to buy energy (search) + Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to buy energy (search) + Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to buy energy (search) + Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) + Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) + Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) +``` + +### Example json for `search` api: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "required": { + "value": "315.0", + "unit": "kWH" + } + } + } + } + } +} +``` + +### Example json for `on_search` api + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "providers": [ + { + "id": "individual_1", + "descriptor": { + "name": "individual_name", + "images": [ + { + "url": "https://individual1.in/images/logo.png" + } + ] + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "provider": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "500", + "unit": "kWH" + } + } + }, + "locations": ["1", "2"], + "fulfillments": ["1", "2"] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "stops": [ + { + "quantity": { + "measure": { + "value": "315.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + }, + { + "id": "2", + "type": "Automatic Dispatch", + "stops": [ + { + "quantity": { + "required": { + "value": "315.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + } + ] + } + } +} +``` + +## Select and On_Select + +1. User selects a Provider from the list which satisfies the requirements +2. User selects the required amount of energy (in kWH) +3. The BAP notifies the chosen Provider, so then provider sends the draft order with quoted price + +### User-side Actions + +- Selecting Provider after viewing catalogs and +- Selecting the required amount of energy +- BAP notifies the provider + +### Provider-side Actions + +- Receive user's selection +- Provider (BPP) will send quoted price along with breakdown for payment to the user for the service requested +- Breakdown: + 1. Tariff per unit (i.e., INR/kWH) + 2. Amount of energy requested (in kWH) + 3. Price for energy (in INR) + 4. Taxes: CGST & SGST + +### Logical Workflow + +The below diagram illustrates the logical interactions between a User and Provider during the Selection stage + +```mermaid + sequenceDiagram + User->>Provider: Selects a provider and required amount of energy (in kWH) + Provider->>User: Receives user selection and sends the draft order with quoted price and breakdown +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): Select Provider after seeing catalogs of all providers and the energy required (select) + Provider 1 (BPP)->>User Platform (BAP): BPP sends the draft order with quoted price and breakdown (on_select) +``` + +### Example json for `select` api + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "sheru-bpp.com", + "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "individual_1" + }, + "items": [ + { + "provider": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "quantity": { + "selected": { + "measure": { + "value": "315.0", + "unit": "kWh" + } + } + } + } + ] + } + } +} +``` + +### Example json for `on_select` api: + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "sheru-bpp.com", + "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "individual_1", + "descriptor": { + "name": "individual_name", + "images": [ + { + "url": "https://individual1.in/images/logo.png" + } + ] + } + }, + "items": [ + { + "provider": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "mode_selection": { + "selected_mode": "Automatic Dispatch" + }, + "price": { + "value": "8", + "currency": "INR/kWh" + }, + "quantity": { + "available": { + "measure": { + "value": "500", + "unit": "kWh" + } + }, + "selected": { + "measure": { + "value": "315", + "unit": "kWh" + } + } + } + } + ], + "quote": { + "price": { + "value": "2520", + "currency": "INR" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units dispatched" + }, + "quantity": { + "selected": { + "measure": { + "value": "315", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "2520", + "currency": "INR" + } + } + ] + } + } + } +} +``` + +## Order Initialization + +In this stage, the User provides the required information and initiates the order + +### User-side Actions + +- User provides the billing details `Name`, `Email ID` and `Phone Number` +- User sends the consent form to provider to accept it [In case of Auto-Discharging] +- User updates the payment details and initiates the order + +### Provider-side Actions + +- Request for billing details +- Receive billing details from the user and +- Provider accepts the consent form and sign it +- Send draft order with payment and fulfillment terms +- Sends the payment link to the user along with breakdown of price and taxes + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Provides billing details like Name, Email ID and Phone Number + User->>Provider: Sends the consent form to provider (in case of Auto-Discharging) + Provider->>User: Signs the consent and Send draft order with payment transcript and fulfillment terms + User->>Provider: Updates payment details and initiates the order + Provider->>User: Sends the payment link to the user +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP sends the consent form and billing details (init) + Provider 1 (BPP)->>User Platform (BAP): BPP accepts the consent form and sends draft order with breakdown and fulfillment terms (on_init) + User Platform (BAP)->> Provider 1 (BPP): BAP Updates payment details and initiates the order + Provider 1 (BPP)->>User Platform (BAP): BPP Sends the payment link to the BAP +``` + +### Example json for `init` api + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "sheru-bpp.com", + "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "individual_1" + }, + "items": [ + { + "id": "1", + "quantity": { + "selected": { + "measure": { + "value": "315", + "unit": "kWh" + } + } + } + } + ], + "billing": { + "name": "Sheru", + "email": "abc@example.com", + "phone": "+91-9876522222" + }, + "fulfillments": [ + { + "id": "1", + "customer": { + "organization": { + "name": "Sheru" + }, + "contact": { + "phone": "+91-9887766554" + } + } + } + ] + } + } +} +``` + +### Example json for `on_init` api + +```json +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "sheru-bpp.com", + "bpp_uri": "https://api.sheru-bpp.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "providers": { + "id": "individual_1", + "descriptor": { + "name": "individual_1", + "images": [ + { + "url": "https://individual1.io/images/logo.png" + } + ] + } + }, + "items": [ + { + "id": "1", + "price": { + "value": "8", + "currency": "INR/kWH" + }, + "quantity": { + "available": "500" + }, + "fulfillments": ["1"] + } + ], + "fulfillments": [ + { + "id": "1", + "mode": "Automatic Dispatch", + "state": { + "descriptor": { + "code": "order-initiated" + } + }, + "stops": [ + { + "quantity": { + "measure": { + "value": "315.0", + "unit": "kWH" + } + } + } + ] + } + ], + "billing": { + "email": "sheru@example.com", + "number": "+91-9876522222" + }, + "quote": { + "price": { + "value": "40", + "currency": "INR" + }, + "breakup": [ + { + "title": "units consumed", + "price": { "value": "40", "currency": "INR" } + }, + { + "title": "cgst", + "price": { "value": "4", "currency": "INR" } + }, + { + "title": "sgst", + "price": { "value": "4", "currency": "INR" } + } + ] + }, + "payments": [ + { + "url": "https://payment.gateway.in", + "type": "PRE-ORDER", + "status": "NOT-PAID", + "params": { + "amount": "40", + "currency": "INR" + }, + "time": { + "range": { + "start": "2023-08-10T10:00:00Z", + "end": "2023-08-10T10:30:00Z" + } + } + } + ] + } + } +} +``` + +## Fulfillment (Payment and Order Confirmation) + +Provider has to give confirmation to the fulfillment terms and conditions if he chooses Manual Discharge +Then, the User will check the order details and confirm the order with payment (might also update the order) +Post payment UEI will activate the confirmed order + +### User-side Actions + +- Confirms(\updates) the order by checking the order details and agreeing to fulfillment terms +- User pays the price after checking the confirmation of provider to the terms and conditions +- Post fulfillment provider gets notified and UEI will lock the contract and activates the order + +### Provider-side Actions + +- If provider chosen Manual Discharge: Provider has to confirm that he accepts the terms and conditions upon that only user can confirm the order and satisfy the fulfillment terms. +- Receive order confirmation from the user +- Send active confirmed order to the user + +## Status Updates and Monitoring + +### User-side Actions + +- Request to fetch the latest order status or amount of discharged energy. +- Sends remainders to the provider for upcoming energy discharge (manual or automatic) + +#### Provider-side Actions + +- Provide the latest status of the order to the user + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Request to accept the terms and conditions + Provider->>User: Confirms the agreement to the terms and conditions. + User->>Provider: Confirms the order and pays the the quoted price and activates the order + Provider->>User: Send active confirmed order + User->>Provider: Request for latest status of order / amount of energy discharged + Provider->>User: Sends the latest status of order + User->>Provider: Sends remainders to the provider for upcoming energy discharge +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->>Provider 1 (BPP): BAP requests confirmation to terms and conditions + Provider 1 (BPP)->>User Platform (BAP): BPP confirms to the terms and conditions (confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP requests for order confirmation and payment update (on_confirm) + User Platform (BAP)->>Provider 1 (BPP): BAP confirms the order by fulfillment (confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP sends activation of confirmed order (on_confirm) + User Platform (BAP)->>Provider 1 (BPP): Request for updates on status of order / amount of energy discharged (status) + Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) + User Platform (BAP)->>Provider 1 (BPP): Remainder to the BPP of an upcoming discharge of energy (status) + Provider 1 (BPP)->>User Platform (BAP): BPP acknowledges the remainder from BAP (on_status) +``` + +### Example Scenarios for entire workflow + +#### Example 1 + +- Sheru searches for 100 kWH of energy and automatic discharge. (search) +- UEI Protocol provides a list of catalogs including individuals/crowds which falls under the search category. (on_search) +- Sheru selects an individual for energy purchase and selects the amount of energy required. (select) +- Individual sends the draft order and quoted price with breakdown. (on_select) +- Sheru provides the billing details and consent form (init). +- Individual accepts to consent and sends the payment amount with payment link (on_init). +- Sheru confirms the order (confirm). +- UEI notifies Sheru about order confirmation and activates the order (on_confirm). +- Energy is discharged after confirmation. +- Sheru checks the status of the amount of discharged energy (status). + +#### Example 2 + +- Sheru needs 200 kWH of energy and manual discharge. +- UEI provides a list of catalogs including individuals/crowds. +- Sheru selects an individual for energy purchase. +- Individual sends the quoted price with breakdown +- Sheru provides the billing deetails (init). +- BPP calculates the quote and sends the payment amount and payment link (on_init). +- Individual confirms commitment to fulfillment terms and conditions (confirm). +- UEI notifies Sheru about individual's confirmation (on_confirm). +- Sheru pays the bill and confirms the payment (confirm). +- UEI BPP confirms fulfillment and payment (on_confirm). +- Energy discharging starts +- Sheru checks the status of the discharged energy (status). diff --git a/docs/example-implementations/general-energy-transaction-2.md b/docs/example-implementations/general-energy-transaction-2.md new file mode 100644 index 0000000..e3c9ead --- /dev/null +++ b/docs/example-implementations/general-energy-transaction-2.md @@ -0,0 +1,281 @@ +# General Energy Transaction Workflow #2 + +## Overview + +This implementation guide outlines the energy transaction process where Sheru (Energy Aggregator) borrows energy storage devices or batteries from individuals or crowds to store and use up the energy when required, using the Beckn Protocol. The guide provides step-by-step instructions on how Sheru interacts with the Unified Energy Interface (UEI) to discover energy storage devices/batteries, select providers, initiate transactions, confirm orders, and monitor status updates. + +## Important NOTE : + +- During Automatic, the provider will sign a consent form such that upon the initiation of the energy transaction, access to both charging and discharging the energy from the battery or energy storage devices is completely given to UEI, until the transaction is completed. +- Since, only UEI has the control/access to charge and discharge the battery or energy storage devices, there is no need to use penalties. +- During Manual, the control/access is not given to UEI; rather, the provider him/herself will charge or discharge the energy. +- In this case, if the provider has not satisfied the terms and conditions he/she agreed upon during the transaction, then the provider has to pay the penalty for the amount of energy he/she was not able to provide. +- The form of energy charging and discharging, either automatic or manual, is completely the provider's choice, which is a `pre-select` feature for the provider. + +Bear in mind that this is just an example workflow for a simple Energy transaction where Sheru borrows the Energy Storage from the individuals/crowd using UEI. + +(Note: Here, User -> Sheru and Provider -> Individual/Crowd who is providing energy storage device or batteries and UEI -> Unified Energy Interface) + +A typical workflow for EV Charging & Battery Swapping consists of the following steps: + +#### Step 1: Discovery of Electricity + +- The user searches providers who agree to the mode of Automatic or else Manual (which will act as a filter for search) + 1. Automatic + - Complete control of ?charge and discharge is given to the UEI. + 2. Manual + - Commit to providing the required energy storage for charging and return the stored energy while discharging; penalties for non-compliance are applicable. +- The user searches for providers who provides the greater than equal to amount of energy needed to be stored and used in kWH (which will act as a filter for the search). + +#### Step 2: Provider platform sends catalogs of Individuals nearby + +The UEI sends all the catalogs to the user. +The list of catalogs consists of: + +- Individuals/Crowds from whom energy can be bought (Name, Phone Number, Email ID) +- Mode of Energy storage, provider has agreed upon (i.e, Automatic discharge / Manual Discharge) +- Available areas/locations for energy purchases +- Available amount of energy storage space (in kWH) +- Tariff per unit (in INR/kWH) +- Time of storage + +#### Step 3: Sheru selects a Provider + +The user selects a suitable individual/crowd provider from the list of provided catalogs, from either Automatic or else Manual +The user selects the required amount of energy storage space (in kWH) +The UEI notifies the chosen individual that Sheru intends to store energy + +#### Step 4: Provider sends the draft order with quoted price + +The provider acknowledges the notification sent by UEI for selling energy +The provider will receive the order based on the user's requirements. The user gets the quoted price, including the breakdown of the price details. The breakdown should include: + +1. Tariff per unit (i.e., INR/kWH), might change based on location of Energy Provider +2. Amount of energy storage requested (in kWH) +3. Price for energy (in INR) : (Amount of energy storage requested) x (Tariff per unit) +4. Taxes: CGST & SGST + +#### Step 5: Initiating the transaction + +The user initializes the order by providing the billing details such as (Name, Phone Number, Email ID) +(in the case of Automatic Providers) The UEI requests the provider to accept the consent form (i.e., a check box) to take control/access to charge and discharging the battery/energy storage during Automatic + +#### Step 6: Provider sends draft order + +(In case of Automatic) The provider signs the consent letter (i.e., ticks the check box), which implies the provider is giving control to UEI for charging and discharging their battery or energy storage. +The provider sends the draft order with the payment link and fulfillment terms to the user's side. +A payment link is sent to user to complete the payment + +#### Step 7: Provider accepts the terms and conditions + +Provider confirms to satisfy the fulfillment terms and conditions (confirm) +If Provider selects Automatic discharge, no additional confirmation is needed. +If Provider selects Manual Discharge: + +- Provider confirms commitment to fulfillment terms. +- If energy storage provision fails, a penalty is applicable. + +#### Step 8: User confirms the order by payment fulfillment + +User sees the confirmation of the provider for the fulfillment terms and conditions. (on_confirm) +Upon that, the user pays the quoted price for the draft order and activates the order by agreeing to the payment +The confirmation will sent to the provider through UEI, saying that user has paid the price and satisfies the fulfillment terms (confirm) +The UEI will activate the order after fulfillment of payment and confirmation of the user and provider, respectively. (on_confirm) + +#### Step 9: User checks the status of the order + +The user requests to fetch the order status/amount of charged/discharged energy in the battery + +#### Step 10: UEI sends the status of the order + +UEI provides status updates for the order (i.e., the amount of energy that has been charged/discharged so far). +UEI can send reminders to the provider for upcoming energy charging / discharging (manual or automatic). + +## Search (Searching for Provider) + +1. The user declares the intent to store and use up energy when required, to the providers +2. Providers publish the catalogs + +### User-side Actions + +A user can declare their intent to buy energy in many ways, like: + +- Searching for Providers based on location +- Searching for Providers based on mode (Automatic/Manual) +- Searching for Providers based on quantity of energy storage space required (in kWH) +- Searching for Providers based on tariff per unit (in INR/kWH) +- Searching for Providers based on Name or Code of provider +- Searching for Providers based on ratings +- Viewing the catalog/details of services provided by a particular provider + +### Provider-side Actions + +In this interaction, the Provider publishes their catalog. The catalog mainly consits of : + +- Individuals or crowds from whom energy can be bought. +- Full Name, Phone Number, Email-ID +- Locations where energy can be purchased (Address) +- Mode of charge and discharge (Automatic or Manual) +- Available amount of energy storage space (in kWH) +- Tariff per unit and available amount of energy + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Declare Intent to buy energy + Provider->>User: Publish Catalog of providers +``` + +### Beckn Protocol API Workflow + +In beckn protocol, the search intent generated by the User Platform (BAP) is typically published on the gateway (BG) that broadcasts the intent to multiple Provider platforms (BPPs). Each of the BPPs returns their catalogs directly to the BAP via asynchronous callbacks. The workflow for that is shown below. + +```mermaid + sequenceDiagram + User Platform (BAP)->>Gateway (BG): Declare Intent to store energy ( search ) + Gateway (BG)->>Registry: Lookup Provider Platforms (lookup) + Registry->>Gateway (BG): List of Provider Platforms in 'x'km radius and 'y'kWH energy storagr space required (200 OK) + Gateway (BG)->>Provider Platform 1 (BPP1): Declare Intent to store energy (search) + Gateway (BG)->>Provider Platform 2 (BPP2): Declare Intent to store energy (search) + Gateway (BG)->>Provider Platform n (BPPn): Declare Intent to store energy (search) + Provider Platform 1 (BPP1)->>User Platform (BAP): Publish Catalog of Provider 1 (on_search) + Provider Platform 2 (BPP2)->>User Platform (BAP): Publish Catalog of Provider 2 (on_search) + Provider Platform n (BPPn)->>User Platform (BAP): Publish Catalog of Provider n (on_search) +``` + +## Select and On_Select + +1. User selects a Provider from the list which satisfies the requirements +2. User selects the required amount of energy they want to store (in kWH) +3. The BAP notifies the chosen Provider, so the provider sends the draft order with quoted price + +### User-side Actions + +- Selecting Provider after viewing catalogs and +- Selecting the required amount of energy needs to be stored +- BAP notifies the provider + +### Provider-side Actions + +- Receive user's selection +- Provider (BPP) will send quoted price along with breakdown for payment to the user for the service requested +- Breakdown: + 1. Tariff per unit (i.e., INR/kWH) + 2. Amount of energy storage space requested (in kWH) + 3. Price for energy (in INR) + 4. Taxes: CGST & SGST + +### Logical Workflow + +The below diagram illustrates the logical interactions between a User and Provider during the Selection stage + +```mermaid + sequenceDiagram + User->>Provider: Selects a provider and required amount of energy storage (in kWH) + Provider->>User: Receives user selection and sends the draft order with quoted price and breakdown +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): Select Provider after seeing catalogs of all providers and the energy storage required (select) + Provider 1 (BPP)->>User Platform (BAP): BPP sends the draft order with quoted price and breakdown (on_select) +``` + +## Order Initialization + +In this stage, the User provides the required information and initiates the order + +### User-side Actions + +- User provides the billing details `Name`, `Email ID` and `Phone Number` +- (In the case of Automatic) The user sends the consent form to the provider for acceptance. +- User updates the payment details and initiates the order + +### Provider-side Actions + +- Request for billing details +- Receive billing details from the user and +- Provider accepts the consent form and signs it +- Send draft order with payment and fulfillment terms +- Sends the payment link to the user along with breakdown of price and taxes + +### Logical Workflow + +```mermaid + sequenceDiagram + User->>Provider: Provides billing details like Name, Email ID and Phone Number + User->>Provider: Sends the consent form to provider (in case of Automatic) + Provider->>User: Signs the consent and sends draft order with payment transcript and fulfillment terms + User->>Provider: Updates payment details and initiates the order + Provider->>User: Sends the payment link to the user +``` + +### Beckn Protocol API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->> Provider 1 (BPP): BAP sends the consent form and billing details (init) + Provider 1 (BPP)->>User Platform (BAP): BPP accepts the consent form and sends draft order with breakdown and fulfillment terms (on_init) + User Platform (BAP)->> Provider 1 (BPP): BAP Updates payment details and initiates the order + Provider 1 (BPP)->>User Platform (BAP): BPP Sends the payment link to the BAP +``` + +## Fulfillment (Payment and Order Confirmation) + +The provider has to confirm the fulfillment terms and conditions if he chooses Manual +Then, the User will check the order details and confirm the order with payment (might also update the order) +Post-payment, UEI will activate the confirmed order + +### User-side Actions + +- Confirms(\updates) the order by checking the order details and agreeing to fulfillment terms +- User pays the price after checking the confirmation of provider's terms and conditions +- Post fulfillment provider gets notified and UEI will lock the contract and activate the order + +### Provider-side Actions + +- If provider chosen Manual discharge, the provider has to confirm that he accepts the terms and conditions upon that only user can confirm the order and satisfy the fulfillment terms. +- Receive order confirmation from the user +- Send active, confirmed order to the user + +## Status Updates and Monitoring + +### User-side Actions + +- Request to fetch the latest order status or amount of charged/discharged energy in the storage. +- Sends remainders to the provider for upcoming energy chagre/discharge (manual or automatic) + +#### Provider-side Actions + +- Provide the latest status of the order to the user + +### Logical Worklow + +```mermaid + sequenceDiagram + User->>Provider: Request to accept the terms and conditions + Provider->>User: Confirms the agreement to the terms and conditions. + User->>Provider: Confirms the order and pays the the quoted price and activates the order + Provider->>User: Send active confirmed order + User->>Provider: Request for latest status of order / amount of energy charged/discharged + Provider->>User: Sends the latest status of order + User->>Provider: Sends remainders to the provider for upcoming energy charge/discharge +``` + +### Beckn API Workflow + +```mermaid + sequenceDiagram + User Platform (BAP)->>Provider 1 (BPP): BAP requests confirmation of terms and conditions + Provider 1 (BPP)->>User Platform (BAP): BPP confirms to the terms and conditions (confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP requests for order confirmation and payment update (on_confirm) + User Platform (BAP)->>Provider 1 (BPP): BAP confirms the order by fulfillment (confirm) + Provider 1 (BPP)->>User Platform (BAP): BPP sends activation of confirmed order (on_confirm) + User Platform (BAP)->>Provider 1 (BPP): Request for updates on status of order or amount of energy charged/discharged (status) + Provider 1 (BPP)->>User Platform (BAP): BPP provides the latest status of the order to BAP (on_status) + User Platform (BAP)->>Provider 1 (BPP): Remainder to the BPP of an upcoming charge/discharge of energy (status) + Provider 1 (BPP)->>User Platform (BAP): BPP acknowledges the remainder from BAP (on_status) +``` diff --git a/examples/ev-charging/cancel/cancel-request.json b/examples/ev-charging/cancel/cancel-request.json index 69d56f0..4435910 100644 --- a/examples/ev-charging/cancel/cancel-request.json +++ b/examples/ev-charging/cancel/cancel-request.json @@ -22,7 +22,7 @@ "order": { "cancellation_reason_id": "5", "descriptor": { - "short_desc": "can't attend booking" + "short_desc": "Can't make it on time" }, "order_id": "6743e9e2-4fb5-487c-92b7" } diff --git a/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json b/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json deleted file mode 100644 index 2b68b00..0000000 --- a/examples/ev-charging/cancel/on_cancel-request-charger-breakdown.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_cancel", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "status": "CANCELLED", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - }, - "allocated": { - "measure": { - "value": "2", - "unit": "kWh" - } - } - }, - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charger-error" - } - }, - "stops": [ - { - "time": { - "range": { - "start": "10:00", - "end": "10:30" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "-12", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "payment refund" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "-12", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} \ No newline at end of file diff --git a/examples/ev-charging/cancel/on_cancel-request.json b/examples/ev-charging/cancel/on_cancel-request.json index 2922a84..055b12a 100644 --- a/examples/ev-charging/cancel/on_cancel-request.json +++ b/examples/ev-charging/cancel/on_cancel-request.json @@ -132,14 +132,14 @@ }, "quote": { "price": { - "value": "-32", + "value": "40", "currency": "INR" }, "breakup": [ { "item": { "descriptor": { - "name": "payment refund" + "name": "Estimated units consumed" }, "quantity": { "selected": { @@ -151,7 +151,7 @@ } }, "price": { - "value": "-32", + "value": "32", "currency": "INR" } } @@ -172,22 +172,6 @@ } } } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } ] } } diff --git a/examples/ev-charging/confirm/on_confirm-request.json b/examples/ev-charging/confirm/on_confirm-request.json index b2b3f57..cf7249d 100644 --- a/examples/ev-charging/confirm/on_confirm-request.json +++ b/examples/ev-charging/confirm/on_confirm-request.json @@ -81,29 +81,10 @@ }, "stops": [ { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - }, - "instructions": { - "name": "Charging instructions", - "short_desc": "To start your charging, go to charger number 987, and click on 'start' on your app" - } - }, - { - "type": "end", "time": { - "timestamp": "01-06-2023 10:30:00", "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" + "start": "10:00", + "end": "10:30" } } } @@ -190,22 +171,6 @@ } } } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } ] } } diff --git a/examples/ev-charging/init/on_init-request.json b/examples/ev-charging/init/on_init-request.json index e6f6f29..1ea303d 100644 --- a/examples/ev-charging/init/on_init-request.json +++ b/examples/ev-charging/init/on_init-request.json @@ -80,15 +80,11 @@ }, "stops": [ { - "type": "start", "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" + "range": { + "start": "10:00", + "end": "10:30" + } } } ], @@ -134,7 +130,7 @@ }, "quote": { "price": { - "value": "32", + "value": "40", "currency": "INR" }, "breakup": [ @@ -175,22 +171,6 @@ } } } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } ] } } diff --git a/examples/ev-charging/search/on_search-request.json b/examples/ev-charging/search/on_search-request.json index 87f598f..93f2d31 100644 --- a/examples/ev-charging/search/on_search-request.json +++ b/examples/ev-charging/search/on_search-request.json @@ -79,18 +79,6 @@ "fulfillment_ids": [ "1", "2" - ], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } - } ] } ], @@ -100,15 +88,11 @@ "type": "CHARGING", "stops": [ { - "type": "start", "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" + "range": { + "start": "10:00", + "end": "10:30" + } } } ], @@ -154,15 +138,11 @@ "type": "CHARGING", "stops": [ { - "type": "start", "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00" + "range": { + "start": "10:30", + "end": "11:00" + } } } ], @@ -236,18 +216,6 @@ "fulfillment_ids": [ "3", "4" - ], - "add_ons": [ - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "name": "Free tyre pressure check" - }, - "price": { - "value": "0", - "currency": "INR" - } - } ] } ], diff --git a/examples/ev-charging/search/search-request.json b/examples/ev-charging/search/search-request.json index a678d60..a9adf5b 100644 --- a/examples/ev-charging/search/search-request.json +++ b/examples/ev-charging/search/search-request.json @@ -44,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/examples/ev-charging/select/on_select-request.json b/examples/ev-charging/select/on_select-request.json index e21497a..ba6ec49 100644 --- a/examples/ev-charging/select/on_select-request.json +++ b/examples/ev-charging/select/on_select-request.json @@ -56,17 +56,6 @@ } } } - }, - { - "id": "pe-charging-01-addon-1", - "descriptor": { - "code": "add-on-item", - "name": "Free car wash" - }, - "price": { - "value": "0", - "currency": "INR" - } } ], "fulfillments": [ @@ -75,15 +64,11 @@ "type": "CHARGING", "stops": [ { - "type": "start", - "time": { - "timestamp": "01-06-2023 10:00:00" - } - }, - { - "type": "end", "time": { - "timestamp": "01-06-2023 10:30:00" + "range": { + "start": "10:00", + "end": "10:30" + } } } ], @@ -149,17 +134,6 @@ "value": "32", "currency": "INR" } - }, - { - "item": { - "descriptor": { - "name": "Free car wash" - } - }, - "price": { - "value": "0", - "currency": "INR" - } } ] } diff --git a/examples/ev-charging/status/on_status-request.json b/examples/ev-charging/status/on_status-request.json index f2ac2a1..0760214 100644 --- a/examples/ev-charging/status/on_status-request.json +++ b/examples/ev-charging/status/on_status-request.json @@ -81,25 +81,10 @@ }, "stops": [ { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", "time": { - "timestamp": "01-06-2023 10:30:00", "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" + "start": "10:00", + "end": "10:30" } } } @@ -146,7 +131,7 @@ }, "quote": { "price": { - "value": "32", + "value": "40", "currency": "INR" }, "breakup": [ @@ -186,22 +171,6 @@ } } } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } ] } } diff --git a/examples/ev-charging/update/on_update-request-charging-end.json b/examples/ev-charging/update/on_update-request-charging-end.json deleted file mode 100644 index a188fed..0000000 --- a/examples/ev-charging/update/on_update-request-charging-end.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charging-ended" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} \ No newline at end of file diff --git a/examples/ev-charging/update/on_update-request-charging-start.json b/examples/ev-charging/update/on_update-request-charging-start.json deleted file mode 100644 index 2c5b86d..0000000 --- a/examples/ev-charging/update/on_update-request-charging-start.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "context": { - "domain": "dent:0.1.0", - "action": "on_update", - "location": { - "country": { - "name": "India", - "code": "IND" - } - }, - "city": "std:080", - "version": "1.1.0", - "bap_id": "example-bap.com", - "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "example-bpp.com", - "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", - "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", - "timestamp": "2023-07-16T04:41:16Z" - }, - "message": { - "order": { - "id": "6743e9e2-4fb5-487c-92b7", - "providers": { - "id": "chargezone.in", - "descriptor": { - "name": "Chargezone", - "short_desc": "Chargezone Technologies Pvt Ltd", - "images": [ - { - "url": "https://chargezone.in/images/logo.png" - } - ] - } - }, - "items": [ - { - "id": "pe-charging-01", - "descriptor": { - "code": "energy" - }, - "price": { - "value": "8", - "currency": "INR/kWH" - }, - "quantity": { - "available": { - "measure": { - "value": "100", - "unit": "kWh" - } - }, - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - }, - "fulfillments": [ - "1" - ] - } - ], - "fulfillments": [ - { - "id": "1", - "customer": { - "person": { - "name": "John Doe" - }, - "contact": { - "phone": "+91-9887766554" - } - }, - "type": "CHARGING", - "state": { - "descriptor": { - "code": "charging-started" - } - }, - "stops": [ - { - "type": "start", - "location": { - "gps": "12.423423,77.325647" - }, - "time": { - "timestamp": "01-06-2023 10:00:00", - "range": { - "start": "01-06-2023 10:00:00", - "end": "01-06-2023 10:10:00" - } - } - }, - { - "type": "end", - "time": { - "timestamp": "01-06-2023 10:30:00", - "range": { - "start": "01-06-2023 10:30:00", - "end": "01-06-2023 10:40:00" - } - } - } - ], - "tags": [ - { - "descriptor": { - "name": "Charging Point" - }, - "list": [ - { - "descriptor": { - "name": "Charger type" - }, - "value": "AC" - }, - { - "descriptor": { - "name": "Connector type" - }, - "value": "CCS2" - }, - { - "descriptor": { - "name": "Power Rating" - }, - "value": "greater than 50kW" - }, - { - "descriptor": { - "name": "Availability" - }, - "value": "Available" - } - ], - "display": true - } - ] - } - ], - "billing": { - "email": "abc@example.com", - "number": "+91-9876522222" - }, - "quote": { - "price": { - "value": "40", - "currency": "INR" - }, - "breakup": [ - { - "item": { - "descriptor": { - "name": "Estimated units consumed" - }, - "quantity": { - "selected": { - "measure": { - "value": "4", - "unit": "kWh" - } - } - } - }, - "price": { - "value": "32", - "currency": "INR" - } - } - ] - }, - "payments": [ - { - "type": "PRE-ORDER", - "status": "PAID", - "params": { - "amount": "40", - "currency": "INR" - }, - "time": { - "range": { - "start": "2023-08-10T10:00:00Z", - "end": "2023-08-10T10:30:00Z" - } - } - } - ], - "cancellation_terms": [ - { - "fulfillment_state": { - "descriptor": { - "code": "charging-start" - } - }, - "cancellation_fee": { - "percentage": "30%" - }, - "external_ref": { - "mimetype": "text/html", - "url": "https://chargezone.in/charge/tnc.html" - } - } - ] - } - } -} \ No newline at end of file diff --git a/examples/homes-discoms/confirm/confirm-request.json b/examples/homes-discoms/confirm/confirm-request.json new file mode 100644 index 0000000..8879e19 --- /dev/null +++ b/examples/homes-discoms/confirm/confirm-request.json @@ -0,0 +1,101 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "240005" + }, + "items": [ + { + "id": "a23f2fdfbbb8ac" + } + ], + "quote": { + "breakup": [ + { + "price": { + "value": "330" + }, + "title": "Fixed Charge: 3 units, 110 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "80" + }, + "title": "FAC Charge: 200 units, 0.4 rupees per unit" + }, + { + "price": { + "value": "126" + }, + "title": "Tax" + } + ], + "price": { + "currency": "INR", + "value": "1936" + } + }, + "payments": [ + { + "collected_by": "BPP", + "params": { + "amount": "1936", + "currency": "INR" + }, + "status": "PAID", + "type": "PRE-FULFILLMENT" + } + ], + "fulfillments": [ + { + "customer": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + } + } + ], + "billing": { + "name": "H.No 4323", + "address": "3rd main, 4th cross, ABC Apartments", + "city": "udupi" + } + } + } +} diff --git a/examples/homes-discoms/confirm/on_confirm-request.json b/examples/homes-discoms/confirm/on_confirm-request.json new file mode 100644 index 0000000..213eb85 --- /dev/null +++ b/examples/homes-discoms/confirm/on_confirm-request.json @@ -0,0 +1,154 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "a23f2fdfbbb8ac", + "status": "COMPLETE", + "provider": { + "descriptor": { + "code": "MESCOM", + "name": "Mangalore Electricity Supply Company Ltd", + "short_desc": "MESCOM Ltd", + "images": [ + { + "url": "https://www.mescom.gov/content/assets/images/header/logo.png" + } + ] + }, + "id": "240005" + }, + "items": [ + { + "id": "a23f2fdfbbb8ac", + "descriptor": { + "code": "energy" + }, + "tags": [ + { + "descriptor": { + "name": "energy tariff" + }, + "list": [ + { + "descriptor": { + "name": "Fixed charges" + }, + "value": "110 rupees for 3 units" + }, + { + "descriptor": { + "name": "Energy charges" + }, + "value": "7 rupees per unit" + }, + { + "descriptor": { + "name": "FAC charges" + }, + "value": "0.4 per unit" + } + ] + } + ] + } + ], + "fulfillments": [ + { + "customer": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "state": { + "descriptor": { + "name": "bill has been paid" + } + } + } + ], + "billing": { + "name": "H.No 4323", + "address": "3rd main, 4th cross, ABC Apartments", + "city": "udupi" + }, + "quote": { + "breakup": [ + { + "price": { + "value": "330" + }, + "title": "Fixed Charge: 3 units, 110 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "80" + }, + "title": "FAC Charge: 200 units, 0.4 rupees per unit" + }, + { + "price": { + "value": "126" + }, + "title": "Tax" + } + ], + "price": { + "currency": "INR", + "value": "1936" + } + }, + "payments": [ + { + "collected_by": "BPP", + "params": { + "amount": "1936", + "currency": "INR" + }, + "status": "PAID", + "type": "PRE-FULFILLMENT", + "time": { + "range": { + "start": "14-06-2023 00:00:00", + "end": "30-06-2023 23:59:59" + } + } + } + ] + } + } +} diff --git a/examples/homes-discoms/init/init-request.json b/examples/homes-discoms/init/init-request.json new file mode 100644 index 0000000..dc99ef4 --- /dev/null +++ b/examples/homes-discoms/init/init-request.json @@ -0,0 +1,58 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "240005" + }, + "items": [ + { + "id": "a23f2fdfbbb8ac", + "quantity": { + "required": { + "value": "315", + "unit": "kWH" + } + } + } + ], + "fulfillments": [ + { + "customer": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + } + } + ], + "billing": { + "name": "H.No 4323", + "address": "3rd main, 4th cross, ABC Apartments", + "city": "udupi" + } + } + } +} diff --git a/examples/homes-discoms/init/on_init-request.json b/examples/homes-discoms/init/on_init-request.json new file mode 100644 index 0000000..9d45aa4 --- /dev/null +++ b/examples/homes-discoms/init/on_init-request.json @@ -0,0 +1,153 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "descriptor": { + "code": "MESCOM", + "name": "Mangalore Electricity Supply Company Ltd", + "short_desc": "MESCOM Ltd", + "images": [ + { + "url": "https://www.mescom.gov/content/assets/images/header/logo.png" + } + ] + }, + "id": "240005" + }, + "items": [ + { + "id": "a23f2fdfbbb8ac", + "descriptor": { + "code": "energy" + }, + "tags": [ + { + "descriptor": { + "name": "energy tariff" + }, + "list": [ + { + "descriptor": { + "name": "Fixed charges" + }, + "value": "110 rupees for 3 units" + }, + { + "descriptor": { + "name": "Energy charges" + }, + "value": "7 rupees per unit" + }, + { + "descriptor": { + "name": "FAC charges" + }, + "value": "0.4 per unit" + } + ] + } + ] + } + ], + "fulfillments": [ + { + "customer": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "state": { + "descriptor": { + "name": "bill has been generated" + } + } + } + ], + "billing": { + "name": "H.No 4323", + "address": "3rd main, 4th cross, ABC Apartments", + "city": "udupi" + }, + "quote": { + "breakup": [ + { + "price": { + "value": "330" + }, + "title": "Fixed Charge: 3 units, 110 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "80" + }, + "title": "FAC Charge: 200 units, 0.4 rupees per unit" + }, + { + "price": { + "value": "126" + }, + "title": "Tax" + } + ], + "price": { + "currency": "INR", + "value": "1936" + } + }, + "payments": [ + { + "collected_by": "BPP", + "url": "https://gateway.mescom.gov", + "params": { + "amount": "1936", + "currency": "INR" + }, + "status": "NOT-PAID", + "type": "PRE-FULFILLMENT", + "time": { + "range": { + "start": "14-06-2023 00:00:00", + "end": "30-06-2023 23:59:59" + } + } + } + ] + } + } +} diff --git a/examples/homes-discoms/status/on_status-request.json b/examples/homes-discoms/status/on_status-request.json new file mode 100644 index 0000000..82d3a81 --- /dev/null +++ b/examples/homes-discoms/status/on_status-request.json @@ -0,0 +1,154 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "a23f2fdfbbb8ac", + "provider": { + "descriptor": { + "code": "MESCOM", + "name": "Mangalore Electricity Supply Company Ltd", + "short_desc": "MESCOM Ltd", + "images": [ + { + "url": "https://www.mescom.gov/content/assets/images/header/logo.png" + } + ] + }, + "id": "240005" + }, + "items": [ + { + "id": "a23f2fdfbbb8ac", + "descriptor": { + "code": "energy" + }, + "tags": [ + { + "descriptor": { + "name": "energy tariff" + }, + "list": [ + { + "descriptor": { + "name": "Fixed charges" + }, + "value": "110 rupees for 3 units" + }, + { + "descriptor": { + "name": "Energy charges" + }, + "value": "7 rupees per unit" + }, + { + "descriptor": { + "name": "FAC charges" + }, + "value": "0.4 per unit" + } + ] + } + ] + } + ], + "fulfillments": [ + { + "customer": { + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "person": { + "id": "0065716000", + "name": "Joe Adam" + } + }, + "state": { + "descriptor": { + "name": "bill overdue" + } + } + } + ], + "billing": { + "name": "H.No 4323", + "address": "3rd main, 4th cross, ABC Apartments", + "city": "udupi" + }, + "quote": { + "breakup": [ + { + "price": { + "value": "330" + }, + "title": "Fixed Charge: 3 units, 110 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "700" + }, + "title": "Energy Charges: 100 units, 7 rupees per unit" + }, + { + "price": { + "value": "80" + }, + "title": "FAC Charge: 200 units, 0.4 rupees per unit" + }, + { + "price": { + "value": "126" + }, + "title": "Tax" + } + ], + "price": { + "currency": "INR", + "value": "1936" + } + }, + "payments": [ + { + "collected_by": "BPP", + "url": "https://gateway.mescom.gov", + "params": { + "amount": "1936", + "currency": "INR" + }, + "status": "NOT-PAID", + "type": "PRE-FULFILLMENT", + "time": { + "range": { + "start": "14-06-2023 00:00:00", + "end": "30-06-2023 23:59:59" + } + } + } + ] + } + } +} diff --git a/examples/homes-discoms/status/status-request.json b/examples/homes-discoms/status/status-request.json new file mode 100644 index 0000000..5668b1f --- /dev/null +++ b/examples/homes-discoms/status/status-request.json @@ -0,0 +1,24 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "bescom-bpp.com", + "bpp_uri": "https://api.bescom-bpp.com/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "a23f2fdfbbb8ac" + } +} diff --git a/examples/ev-charging/rating/rating-request.json b/examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json similarity index 73% rename from examples/ev-charging/rating/rating-request.json rename to examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json index 5d947d1..8e376eb 100644 --- a/examples/ev-charging/rating/rating-request.json +++ b/examples/microgrids/aggregator-to-individuals/cancel/cancel-request.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "rating", + "action": "on_cancel", "location": { "country": { "name": "India", @@ -12,19 +12,19 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", + "bpp_id": "example-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "ratings": [ - { - "id": "6743e9e2-4fb5-487c-92b7", - "rating_category": "charger", - "value": "5" + "order": { + "id": "5f0acfd5", + "cancellation_reason_id": "5", + "descriptor": { + "code": "grid-down" } - ] + } } } \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json b/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json new file mode 100644 index 0000000..f3578e8 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/cancel/on_cancel-request.json @@ -0,0 +1,154 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_cancel", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "status": "CANCELLED", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-cancelled", + "name": "energy transaction cancelled" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json new file mode 100644 index 0000000..2d3eae2 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/confirm/confirm-request-automatic-and-manual-dispatch.json @@ -0,0 +1,61 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "xinput": { + "head": { + "descriptor": { + "name": "Terms and Conditions" + }, + "index": { + "min": 0, + "cur": 0, + "max": 0 + }, + "headings": [ + "Terms and Conditions" + ] + }, + "form": { + "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", + "mime_type": "text/html", + "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", + "resubmit": false, + "multiple_sumbissions": false + }, + "required": true + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json new file mode 100644 index 0000000..ea5e78c --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-automatic-dispatch.json @@ -0,0 +1,153 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-confirmed", + "name": "energy transaction confirmed" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json new file mode 100644 index 0000000..f3d78a1 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/confirm/on_confirm-request-manual-dispatch.json @@ -0,0 +1,153 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-confirmed", + "name": "energy transaction confirmed" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json new file mode 100644 index 0000000..5745d89 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/init/init-request-automatic-dispatch.json @@ -0,0 +1,61 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "xinput": { + "head": { + "descriptor": { + "name": "Dispatch Consent" + }, + "index": { + "min": 0, + "cur": 0, + "max": 0 + }, + "headings": [ + "Dispatch Consent" + ] + }, + "form": { + "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", + "mime_type": "text/html", + "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", + "resubmit": false, + "multiple_sumbissions": false + }, + "required": true + } + } + } +} \ No newline at end of file diff --git a/examples/ev-charging/update/update-request-charging-end.json b/examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json similarity index 70% rename from examples/ev-charging/update/update-request-charging-end.json rename to examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json index 4ec9c50..11e573a 100644 --- a/examples/ev-charging/update/update-request-charging-end.json +++ b/examples/microgrids/aggregator-to-individuals/init/init-request-manual-dispatch.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "update", + "action": "init", "location": { "country": { "name": "India", @@ -12,23 +12,25 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", + "bpp_id": "example-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "update_target": "order.fulfillments[0].state", "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], "fulfillments": [ { - "id": "1", - "state": { - "descriptor": { - "code": "end-charging" - } - } + "id": "1" } ] } diff --git a/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json new file mode 100644 index 0000000..af1600b --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/init/on_init-request-automatic-dispatch.json @@ -0,0 +1,152 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-initiated", + "name": "energy transaction initiated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json new file mode 100644 index 0000000..9003a30 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/init/on_init-request-manual-dispatch.json @@ -0,0 +1,146 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-initiated", + "name": "energy transaction initiated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json new file mode 100644 index 0000000..6628fe5 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/search/on_search-request-automatic-dispatch.json @@ -0,0 +1,138 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "descriptor": { + "code": "energy" + }, + "providers": [ + { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + }, + { + "id": "5f0acfd5-grid-2", + "descriptor": { + "name": "Storage Grid 2" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "350", + "unit": "kWH" + } + } + }, + "locations": [ + "2" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "315.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json new file mode 100644 index 0000000..4b34407 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/search/on_search-request-manual-dispatch.json @@ -0,0 +1,138 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "descriptor": { + "code": "energy" + }, + "providers": [ + { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + }, + { + "id": "5f0acfd5-grid-2", + "descriptor": { + "name": "Storage Grid 2" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "350", + "unit": "kWH" + } + } + }, + "locations": [ + "2" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "315.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/search/search-request.json b/examples/microgrids/aggregator-to-individuals/search/search-request.json new file mode 100644 index 0000000..ae048fc --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/search/search-request.json @@ -0,0 +1,34 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "available": { + "value": "300.0", + "unit": "kWH" + } + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json new file mode 100644 index 0000000..dc5f71b --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/select/on_select-request-automatic-dispatch.json @@ -0,0 +1,140 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json new file mode 100644 index 0000000..1e355cc --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/select/on_select-request-manual-dispatch.json @@ -0,0 +1,119 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "315.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + } + } + } + } +} \ No newline at end of file diff --git a/examples/ev-charging/update/update-request-charging-start.json b/examples/microgrids/aggregator-to-individuals/select/select-request.json similarity index 68% rename from examples/ev-charging/update/update-request-charging-start.json rename to examples/microgrids/aggregator-to-individuals/select/select-request.json index f5d5747..54d26ba 100644 --- a/examples/ev-charging/update/update-request-charging-start.json +++ b/examples/microgrids/aggregator-to-individuals/select/select-request.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "update", + "action": "select", "location": { "country": { "name": "India", @@ -12,24 +12,25 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", + "bpp_id": "example-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "update_target": "order.fulfillments[0].state", "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], "fulfillments": [ { - "id": "1", - "type": "CHARGING", - "state": { - "descriptor": { - "code": "start-charging" - } - } + "id": "1" } ] } diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json new file mode 100644 index 0000000..badf39a --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/status/on_status-request-automatic-dispatch.json @@ -0,0 +1,147 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-in-progress", + "name": "200 out of 300 kWH transferred" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json new file mode 100644 index 0000000..3943afe --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch-penalty.json @@ -0,0 +1,154 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-not-started", + "name": "Manual dispatch hasn't begun yet" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + }, + { + "title": "Penalty for late manual dispatch of energy", + "price": { + "value": "2000", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json new file mode 100644 index 0000000..6efb284 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/status/on_status-request-manual-dispatch.json @@ -0,0 +1,147 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-in-progress", + "name": "200 out of 300 kWH transferred" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/status/status-request.json b/examples/microgrids/aggregator-to-individuals/status/status-request.json new file mode 100644 index 0000000..2897f11 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/status/status-request.json @@ -0,0 +1,24 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "5f0acfd5" + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/support/on_support-request.json b/examples/microgrids/aggregator-to-individuals/support/on_support-request.json new file mode 100644 index 0000000..a32c58b --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/support/on_support-request.json @@ -0,0 +1,29 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "1800 1080", + "email": "customer.care@sheru.com", + "url": "https://www.sheru.com/helpdesk" + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/support/support-request.json b/examples/microgrids/aggregator-to-individuals/support/support-request.json new file mode 100644 index 0000000..6587a17 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/support/support-request.json @@ -0,0 +1,28 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "+919876543210", + "email": "support@sheru.com" + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/update/on_update-request.json b/examples/microgrids/aggregator-to-individuals/update/on_update-request.json new file mode 100644 index 0000000..73882b5 --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/update/on_update-request.json @@ -0,0 +1,147 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "200.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-updated", + "name": "energy transaction updated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-1600" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "200", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-1600", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/aggregator-to-individuals/update/update-request.json b/examples/microgrids/aggregator-to-individuals/update/update-request.json new file mode 100644 index 0000000..20274fa --- /dev/null +++ b/examples/microgrids/aggregator-to-individuals/update/update-request.json @@ -0,0 +1,40 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "items": [ + { + "descriptor": { + "code": "energy" + }, + "quantity": { + "available": { + "value": "200.0", + "unit": "kWH" + } + } + } + ] + }, + "updated_target": "order.items[0].quantity.available.value" + } +} \ No newline at end of file diff --git a/examples/ev-charging/rating/on_rating-request.json b/examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json similarity index 69% rename from examples/ev-charging/rating/on_rating-request.json rename to examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json index 3386df8..8e376eb 100644 --- a/examples/ev-charging/rating/on_rating-request.json +++ b/examples/microgrids/individuals-to-aggregator/cancel/cancel-request.json @@ -1,7 +1,7 @@ { "context": { "domain": "dent:0.1.0", - "action": "on_rating", + "action": "on_cancel", "location": { "country": { "name": "India", @@ -12,19 +12,18 @@ "version": "1.1.0", "bap_id": "example-bap.com", "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", - "bpp_id": "chargezone-energy-bpp.com", + "bpp_id": "example-bpp.com", "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", "timestamp": "2023-07-16T04:41:16Z" }, "message": { - "feedback_form": { - "xinput": { - "form": { - "url": "https://api.example-bpp.com/pilot/bpp/feedback/portal" - }, - "required": "false" + "order": { + "id": "5f0acfd5", + "cancellation_reason_id": "5", + "descriptor": { + "code": "grid-down" } } } diff --git a/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json b/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json new file mode 100644 index 0000000..4f99bce --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/cancel/on_cancel-request.json @@ -0,0 +1,153 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "status": "CANCELLED", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-cancelled", + "name": "energy transaction cancelled" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json new file mode 100644 index 0000000..9a052c3 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request-automatic-dispatch-tnc.json @@ -0,0 +1,75 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be given" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json new file mode 100644 index 0000000..3169216 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/confirm/confirm-request.json @@ -0,0 +1,69 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be given" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json new file mode 100644 index 0000000..d2de883 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-automatic-dispatch.json @@ -0,0 +1,152 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-confirmed", + "name": "energy transaction confirmed" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json new file mode 100644 index 0000000..487d0a5 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/confirm/on_confirm-request-manual-dispatch.json @@ -0,0 +1,152 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-confirmed", + "name": "energy transaction confirmed" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json b/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json new file mode 100644 index 0000000..bf1fa18 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/init/init-request-automatic-dispatch-consent.json @@ -0,0 +1,48 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "xinput": { + "form_response": { + "status": true, + "submission_id": "73ef9742-c17d-4c4e-92e3-b057960863af" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/init-request.json b/examples/microgrids/individuals-to-aggregator/init/init-request.json new file mode 100644 index 0000000..1b04d44 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/init/init-request.json @@ -0,0 +1,42 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json new file mode 100644 index 0000000..3de7bd0 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-consent.json @@ -0,0 +1,175 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-initiated", + "name": "energy transaction initiated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be given" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "head": { + "descriptor": { + "name": "Dispatch Consent" + }, + "index": { + "min": 0, + "cur": 0, + "max": 1 + }, + "headings": [ + "Dispatch Consent", + "Terms and Conditions" + ] + }, + "form": { + "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", + "mime_type": "text/html", + "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", + "resubmit": false, + "multiple_sumbissions": false + }, + "required": true + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json new file mode 100644 index 0000000..c6c74ec --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/init/on_init-request-automatic-dispatch-tnc.json @@ -0,0 +1,175 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-initiated", + "name": "energy transaction initiated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be given" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "head": { + "descriptor": { + "name": "Terms and Conditions" + }, + "index": { + "min": 0, + "cur": 1, + "max": 1 + }, + "headings": [ + "Dispatch Consent", + "Terms and Conditions" + ] + }, + "form": { + "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", + "mime_type": "text/html", + "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", + "resubmit": false, + "multiple_sumbissions": false + }, + "required": true + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json b/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json new file mode 100644 index 0000000..fb6675b --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/init/on_init-request-manual-dispatch-tnc.json @@ -0,0 +1,174 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_init", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-initiated", + "name": "energy transaction initiated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be given" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + }, + "xinput": { + "head": { + "descriptor": { + "name": "Terms and Conditions" + }, + "index": { + "min": 0, + "cur": 0, + "max": 0 + }, + "headings": [ + "Terms and Conditions" + ] + }, + "form": { + "id": "d097c2f5-cb8d-42fe-900e-dfecdede16fb", + "mime_type": "text/html", + "url": "https://6vs8xnx5i7.icicibank.co.in/loans/xinput/formid/a23f2fdfbbb8ac402bf259d75", + "resubmit": false, + "multiple_sumbissions": false + }, + "required": true + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json new file mode 100644 index 0000000..1cf9957 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/search/on_search-request-automatic-dispatch.json @@ -0,0 +1,143 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "descriptor": { + "code": "energy" + }, + "providers": [ + { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + }, + { + "id": "5f0acfd5-grid-2", + "descriptor": { + "name": "Storage Grid 2" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "350", + "unit": "kWH" + } + } + }, + "locations": [ + "2" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json new file mode 100644 index 0000000..7ba5924 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/search/on_search-request-manual-dispatch.json @@ -0,0 +1,143 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "catalog": { + "descriptor": { + "code": "energy" + }, + "providers": [ + { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ], + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + }, + { + "id": "5f0acfd5-grid-2", + "descriptor": { + "name": "Storage Grid 2" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "350", + "unit": "kWH" + } + } + }, + "locations": [ + "2" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/search/search-request.json b/examples/microgrids/individuals-to-aggregator/search/search-request.json new file mode 100644 index 0000000..675d41b --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/search/search-request.json @@ -0,0 +1,34 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "search", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "code": "energy" + }, + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json new file mode 100644 index 0000000..fe7829d --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/select/on_select-request-automatic-dispatch.json @@ -0,0 +1,145 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json new file mode 100644 index 0000000..da9eaa8 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/select/on_select-request-manual-dispatch.json @@ -0,0 +1,124 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + } + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/select/select-request.json b/examples/microgrids/individuals-to-aggregator/select/select-request.json new file mode 100644 index 0000000..54d26ba --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/select/select-request.json @@ -0,0 +1,38 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "select", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "provider": { + "id": "5f0acfd5" + }, + "items": [ + { + "id": "5f0acfd5-grid-1" + } + ], + "fulfillments": [ + { + "id": "1" + } + ] + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json new file mode 100644 index 0000000..4d40b8f --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/status/on_status-request-automatic-dispatch.json @@ -0,0 +1,152 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-in-progress", + "name": "200 out of 300 kWH transferred" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json new file mode 100644 index 0000000..e5eacd5 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch-penalty.json @@ -0,0 +1,159 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-not-started", + "name": "Manual dispatch hasn't begun yet" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + }, + { + "title": "Penalty for late manual dispatch of energy", + "price": { + "value": "2000", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json new file mode 100644 index 0000000..765da10 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/status/on_status-request-manual-dispatch.json @@ -0,0 +1,152 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_confirm", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Energy Storage Solutions" + }, + "images": [ + { + "url": "https://energystoragesolutions.in/images/logo.png" + } + ], + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Manual Dispatch", + "contact": { + "email": "energystoragesolutions@org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "300.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-in-progress", + "name": "200 out of 300 kWH transferred" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-2400" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "300", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-2400", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/status/status-request.json b/examples/microgrids/individuals-to-aggregator/status/status-request.json new file mode 100644 index 0000000..2897f11 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/status/status-request.json @@ -0,0 +1,24 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "status", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order_id": "5f0acfd5" + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/support/on_support-request.json b/examples/microgrids/individuals-to-aggregator/support/on_support-request.json new file mode 100644 index 0000000..a32c58b --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/support/on_support-request.json @@ -0,0 +1,29 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "1800 1080", + "email": "customer.care@sheru.com", + "url": "https://www.sheru.com/helpdesk" + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/support/support-request.json b/examples/microgrids/individuals-to-aggregator/support/support-request.json new file mode 100644 index 0000000..6587a17 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/support/support-request.json @@ -0,0 +1,28 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "support", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "support": { + "order_id": "6743e9e2-4fb5-487c-92b7", + "phone": "+919876543210", + "email": "support@sheru.com" + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/update/on_update-request.json b/examples/microgrids/individuals-to-aggregator/update/on_update-request.json new file mode 100644 index 0000000..73882b5 --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/update/on_update-request.json @@ -0,0 +1,147 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "on_update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "provider": { + "id": "5f0acfd5", + "descriptor": { + "name": "Joe Adam" + }, + "location": [ + { + "id": "1", + "gps": "12.345345,77.389754" + }, + { + "id": "2", + "gps": "12.247934,77.876987" + } + ] + }, + "items": [ + { + "id": "5f0acfd5-grid-1", + "descriptor": { + "name": "Storage Grid 1" + }, + "price": { + "value": "8", + "currency": "INR / kWH" + }, + "quantity": { + "available": { + "measure": { + "value": "400", + "unit": "kWH" + } + } + }, + "locations": [ + "1" + ], + "fulfillments": [ + "1" + ] + } + ], + "fulfillments": [ + { + "id": "1", + "type": "Automatic Dispatch", + "contact": { + "email": "joe.adam@abc.org", + "phone": "+91-9999999999" + }, + "stops": [ + { + "quantity": { + "required": { + "value": "200.0", + "unit": "kWH" + } + } + } + ], + "state": { + "descriptor": { + "code": "transaction-updated", + "name": "energy transaction updated" + } + }, + "tags": [ + { + "descriptor": { + "name": "Energy Specifications" + }, + "list": [ + { + "descriptor": { + "name": "Power Rating" + }, + "value": "greater than 50kW" + }, + { + "descriptor": { + "name": "Availability" + }, + "value": "Available" + } + ], + "display": true + } + ] + } + ], + "billing": { + "email": "joe.adam@abc.org", + "name": "Joe Adam" + }, + "quote": { + "price": { + "currency": "INR", + "value": "-1600" + }, + "breakup": [ + { + "item": { + "descriptor": { + "name": "Estimated units to be stored" + }, + "quantity": { + "selected": { + "measure": { + "value": "200", + "unit": "kWh" + } + } + } + }, + "price": { + "value": "-1600", + "currency": "INR" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/examples/microgrids/individuals-to-aggregator/update/update-request.json b/examples/microgrids/individuals-to-aggregator/update/update-request.json new file mode 100644 index 0000000..20274fa --- /dev/null +++ b/examples/microgrids/individuals-to-aggregator/update/update-request.json @@ -0,0 +1,40 @@ +{ + "context": { + "domain": "dent:0.1.0", + "action": "update", + "location": { + "country": { + "name": "India", + "code": "IND" + } + }, + "city": "std:080", + "version": "1.1.0", + "bap_id": "example-bap.com", + "bap_uri": "https://api.example-bap.com/pilot/bap/energy/v1", + "bpp_id": "example-bpp.com", + "bpp_uri": "https://api.example-bpp.com/pilot/bpp/", + "transaction_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "message_id": "6743e9e2-4fb5-487c-92b7-13ba8018f176", + "timestamp": "2023-07-16T04:41:16Z" + }, + "message": { + "order": { + "id": "5f0acfd5", + "items": [ + { + "descriptor": { + "code": "energy" + }, + "quantity": { + "available": { + "value": "200.0", + "unit": "kWH" + } + } + } + ] + }, + "updated_target": "order.items[0].quantity.available.value" + } +} \ No newline at end of file From 3666a40165680d5a80e55f2f5e13e838c5dc0362 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 28 Mar 2024 12:35:33 +0530 Subject: [PATCH 12/16] adding a specific enum in fulfillment component and making cancellation_reason_id required in the cancel api --- api/dent.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/dent.yaml b/api/dent.yaml index 2823d1f..7655280 100644 --- a/api/dent.yaml +++ b/api/dent.yaml @@ -496,6 +496,7 @@ paths: $ref: '#/components/schemas/Descriptor' required: - order_id + - cancellation_reason_id required: - context - message @@ -1903,6 +1904,10 @@ components: type: description: 'A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment.' type: string + enum: + - CHARGING + - AUTOMATIC-DISPATCH + - VIRTUAL-POWER PURCHASE-AGREEMENTS rateable: description: Whether the fulfillment can be rated or not type: boolean From 54c590379e0ca877cfd0812a433c2f9725e5ac99 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 30 May 2024 15:54:46 +0530 Subject: [PATCH 13/16] adding l2 config for uei --- api/l2-config/uei_evcharging_1.1.0.yaml | 4018 +++++++++++++++++++++++ 1 file changed, 4018 insertions(+) create mode 100644 api/l2-config/uei_evcharging_1.1.0.yaml diff --git a/api/l2-config/uei_evcharging_1.1.0.yaml b/api/l2-config/uei_evcharging_1.1.0.yaml new file mode 100644 index 0000000..a838f24 --- /dev/null +++ b/api/l2-config/uei_evcharging_1.1.0.yaml @@ -0,0 +1,4018 @@ +openapi: 3.0.0 +info: + title: Beckn Energy API Specification + description: Adaptation of Beckn protocol for the Energy sector. + version: 1.1.0 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: This allows the customer to search for energy service providers. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + $ref: '#/components/schemas/Intent' + required: + - context + - message + examples: + The BAP looks for EV charging providers: + value: + context: + domain: dent:0.1.0 + action: search + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + intent: + item: + descriptor: + code: energy + quantity: + required: + value: '4.0' + unit: kWH + category: + descriptor: + code: green-tariff + location: + gps: 12.423423,77.325647 + radius: + type: CONSTANT + value: '5' + unit: km + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: BAP selects a provider and their energy service. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + The BAP selects an EV charging service from a provider: + value: + context: + domain: dent:0.1.0 + action: select + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + provider: + id: chargezone.in + items: + - id: pe-charging-01 + quantity: + selected: + measure: + value: '4' + unit: kWh + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: Initialize an order by providing billing and/or shipping details to the energy service provider + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + The BAP initiates an order for the EV charging service from a provider: + value: + context: + domain: dent:0.1.0 + action: init + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + provider: + id: chargezone.in + items: + - id: pe-charging-01 + billing: + name: John Doe + email: abc@example.com + phone: +91-9876522222 + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: Confirms the order, completes the payment and waits for order confirmation. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + The BAP confirms the order to charge the EV: + value: + context: + domain: dent:0.1.0 + action: confirm + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + items: + - id: pe-charging-01 + billing: + name: John Doe + email: abc@example.com + number: +91-9876522222 + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + payments: + - collected_by: BPP + params: + amount: '40' + currency: INR + status: PAID + type: PRE-ORDER + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: Fetch the latest order object status + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + required: + - context + - message + examples: + The BAP checks for the status of the charging: + value: + context: + domain: dent:0.1.0 + action: status + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order_id: 6743e9e2-4fb5-487c-92b7 + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: Cancel an order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - cancel + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + cancellation_reason_id: + $ref: '#/components/schemas/Option/properties/id' + descriptor: + $ref: '#/components/schemas/Descriptor' + required: + - order_id + required: + - context + - message + examples: + The BAP cancels the order for the EV charging: + value: + context: + domain: dent:0.1.0 + action: cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + cancellation_reason_id: '5' + descriptor: + short_desc: can't attend booking + order_id: 6743e9e2-4fb5-487c-92b7 + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /update: + post: + tags: + - Beckn Provider Platform (BPP) + description: Update a criteria of the order + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - update + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + update_target: + description: 'Comma separated values of order objects being updated. For example: ```"update_target":"item,billing,fulfillment"```' + type: string + order: + description: Updated order object + allOf: + - $ref: '#/components/schemas/Order' + required: + - update_target + - order + required: + - context + - message + examples: + The BAP sends an update to start charging the EV: + value: + context: + domain: dent:0.1.0 + action: update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + update_target: order.fulfillments[0].state + order: + fulfillments: + - id: '1' + type: CHARGING + state: + descriptor: + code: start-charging + The BAP sends an update to stop charging the EV: + value: + context: + domain: dent:0.1.0 + action: update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + update_target: order.fulfillments[0].state + order: + fulfillments: + - id: '1' + type: CHARGING + state: + descriptor: + code: end-charging + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /rating: + post: + tags: + - Beckn Provider Platform (BPP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - rating + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + ratings: + type: array + items: + $ref: '#/components/schemas/Rating' + required: + - context + - message + examples: + The BAP rates the service provided: + value: + context: + domain: dent:0.1.0 + action: rating + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + ratings: + - id: 6743e9e2-4fb5-487c-92b7 + rating_category: charger + value: '5' + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /support: + post: + tags: + - Beckn Provider Platform (BPP) + description: Contact support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - support + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + support: + $ref: '#/components/schemas/Support' + required: + - context + - message + examples: + The BAP wants to contact support: + value: + context: + domain: dent:0.1.0 + action: support + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + support: + order_id: 6743e9e2-4fb5-487c-92b7 + phone: '+919876543210' + email: john.doe@gmail.com + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: The BPP sends its energy catalog in response to a search request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider returns a list of catalogs: + value: + context: + domain: dent:0.1.0 + action: on_search + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + catalog: + providers: + - id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + categories: + - id: '1' + descriptor: + code: green-tariff + name: green tariff + locations: + - id: '1' + gps: 12.345345,77.389754 + - id: '2' + gps: 12.247934,77.876987 + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR / kWH + quantity: + available: + measure: + value: '100' + unit: kWH + category_ids: + - '1' + location_ids: + - '1' + - '2' + fulfillment_ids: + - '1' + - '2' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free car wash + price: + value: '0' + currency: INR + fulfillments: + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: '2' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: log9.in + descriptor: + name: Log9 Inc + categories: + - id: '1' + descriptor: + code: green-tariff + name: green tariff + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '10' + currency: INR / kWH + quantity: + available: '1000' + category_ids: + - '1' + fulfillment_ids: + - '3' + - '4' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free tyre pressure check + price: + value: '0' + currency: INR + fulfillments: + - id: '3' + type: BATTERY-SWAP + stops: + - location: + gps: 12.745675, 77.987393 + - id: '4' + type: MOBILE-BATTERY-SWAP + stops: + - location: + url: https://log9.in/track/bswap/3234242 + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: Send details along with quoted price for selected items + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_select + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider sends the details of the item selected, along with a quote: + value: + context: + domain: dent:0.1.0 + action: on_select + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + - id: pe-charging-01-addon-1 + descriptor: + code: add-on-item + name: Free car wash + price: + value: '0' + currency: INR + fulfillments: + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + - item: + descriptor: + name: Free car wash + price: + value: '0' + currency: INR + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: Send draft order object with payment details updated for the service. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The BPP intiates the order, sends the payment link: + value: + context: + domain: dent:0.1.0 + action: on_init + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: order-initiated + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - url: https://payment.gateway.in + type: PRE-ORDER + status: NOT-PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: Send active order object with the confirmed order ID + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The BAP sends an order confirmation: + value: + context: + domain: dent:0.1.0 + action: on_confirm + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: payment-completed + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + instructions: + name: Charging instructions + short_desc: To start your charging, go to charger number 987, and click on 'start' on your app + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: Sends cancelled order object with the reason. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_cancel + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider cancels the order after the BAP requested for a cancellation: + value: + context: + domain: dent:0.1.0 + action: on_cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + status: CANCELLED + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: order-cancelled + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '-32' + currency: INR + breakup: + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '-32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider cancels the order after the there was an error in the charger: + value: + context: + domain: dent:0.1.0 + action: on_cancel + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + status: CANCELLED + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + allocated: + measure: + value: '2' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charger-error + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '-12' + currency: INR + breakup: + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '-12' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_update: + post: + tags: + - Beckn Application Platform (BAP) + description: Returns updated service with updated runtime object + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_update + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider sends an updated object to start charging: + value: + context: + domain: dent:0.1.0 + action: on_update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charging-started + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider sends an updated object to stop charging: + value: + context: + domain: dent:0.1.0 + action: on_update + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + code: charging-ended + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '40' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_status: + post: + tags: + - Beckn Application Platform (BAP) + description: Fetch the status of a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_status + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider sends status of the charging: + value: + context: + domain: dent:0.1.0 + action: on_status + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + order: + id: 6743e9e2-4fb5-487c-92b7 + providers: + id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + items: + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + fulfillments: + - '1' + fulfillments: + - id: '1' + customer: + person: + name: John Doe + contact: + phone: +91-9887766554 + type: CHARGING + state: + descriptor: + name: vehicle 65% charged + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + billing: + email: abc@example.com + number: +91-9876522222 + quote: + price: + value: '32' + currency: INR + breakup: + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' + currency: INR + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' + cancellation_terms: + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_rating: + post: + tags: + - Beckn Application Platform (BAP) + description: Provide feedback on a service + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_rating + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + feedback_form: + description: A feedback form to allow the user to provide additional information on the rating provided + allOf: + - $ref: '#/components/schemas/XInput' + error: + $ref: '#/components/schemas/Error' + required: + - context + - message + examples: + The provider responds with a form URL for rating: + value: + context: + domain: dent:0.1.0 + action: on_rating + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + feedback_form: + xinput: + form: + url: https://api.example-bpp.com/pilot/bpp/feedback/portal + required: 'false' + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message + /on_support: + post: + tags: + - Beckn Application Platform (BAP) + description: Contact Support + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_support + required: + - bpp_id + - bpp_uri + message: + type: object + properties: + support: + $ref: '#/components/schemas/Support' + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + The provider returns support details: + value: + context: + domain: dent:0.1.0 + action: on_support + location: + country: + name: India + code: IND + city: std:080 + version: 1.1.0 + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 + bpp_id: chargezone-energy-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bpp/ + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + support: + order_id: 6743e9e2-4fb5-487c-92b7 + phone: 1800 1080 + email: customer.care@chargezone.com + url: https://www.chargezone.com/helpdesk + responses: + '200': + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack: + allOf: + - $ref: '#/components/schemas/Ack' + - properties: + status: + enum: + - ACK + - NACK + required: + - ack + error: + $ref: '#/components/schemas/Error' + required: + - message +components: + securitySchemes: + SubscriberAuth: + type: apiKey + in: header + name: Authorization + description: 'Signature of message body using BAP or BPP subscriber''s signing public key.

Format:

Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"' + schemas: + Ack: + description: 'Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement.' + type: object + properties: + status: + type: string + description: 'The status of the acknowledgement. If the request passes the validation criteria of the BPP, then this is set to ACK. If a BPP responds with status = `ACK` to a request, it is required to respond with a callback. If the request fails the validation criteria, then this is set to NACK. Additionally, if a BPP does not intend to respond with a callback even after the request meets the validation criteria, it should set this value to `NACK`.' + enum: + - ACK + - NACK + tags: + description: A list of tags containing any additional information sent along with the Acknowledgement. + type: array + items: + $ref: '#/components/schemas/TagGroup' + AddOn: + description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. + type: object + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + price: + $ref: '#/components/schemas/Price' + Address: + description: Describes a postal address. + type: string + Agent: + description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + properties: + person: + $ref: '#/components/schemas/Person' + contact: + $ref: '#/components/schemas/Contact' + organization: + $ref: '#/components/schemas/Organization' + rating: + $ref: '#/components/schemas/Rating/properties/value' + Authorization: + description: 'Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation.' + type: object + properties: + type: + description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. + type: string + token: + description: 'Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering.' + type: string + valid_from: + description: Timestamp in RFC3339 format from which token is valid + type: string + format: date-time + valid_to: + description: Timestamp in RFC3339 format until which token is valid + type: string + format: date-time + status: + description: Status of the token + type: string + Billing: + description: 'Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at' + type: object + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - $ref: '#/components/schemas/Organization' + address: + description: The address of the billable entity + allOf: + - $ref: '#/components/schemas/Address' + state: + description: The state where the billable entity resides. This is important for state-level tax calculation + allOf: + - $ref: '#/components/schemas/State' + city: + description: The city where the billable entity resides. + allOf: + - $ref: '#/components/schemas/City' + email: + description: Email address where the bill is sent to + type: string + format: email + phone: + description: Phone number of the billable entity + type: string + time: + description: Details regarding the billing period + allOf: + - $ref: '#/components/schemas/Time' + tax_id: + description: ID of the billable entity as recognized by the taxation authority + type: string + Cancellation: + description: Describes a cancellation event + type: object + properties: + time: + description: Date-time when the order was cancelled by the buyer + type: string + format: date-time + cancelled_by: + type: string + enum: + - CONSUMER + - PROVIDER + reason: + description: The reason for cancellation + allOf: + - $ref: '#/components/schemas/Option' + additional_description: + description: Any additional information regarding the nature of cancellation + allOf: + - $ref: '#/components/schemas/Descriptor' + CancellationTerm: + description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: '#/components/schemas/FulfillmentState' + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean + cancel_by: + description: Information related to the time of cancellation. + allOf: + - $ref: '#/components/schemas/Time' + cancellation_fee: + $ref: '#/components/schemas/Fee' + xinput: + $ref: '#/components/schemas/XInput' + external_ref: + $ref: '#/components/schemas/MediaFile' + Catalog: + description: 'Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
' + type: object + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + fulfillments: + description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. + type: array + items: + $ref: '#/components/schemas/Fulfillment' + payments: + description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level. + type: array + items: + $ref: '#/components/schemas/Payment' + offers: + description: Offers at the BPP-level. This is common across all providers onboarded by the BPP. + type: array + items: + $ref: '#/components/schemas/Offer' + providers: + type: array + items: + $ref: '#/components/schemas/Provider' + exp: + description: Timestamp after which catalog will expire + type: string + format: date-time + ttl: + description: Duration in seconds after which this catalog will expire + type: string + Category: + description: A label under which a collection of items can be grouped. + type: object + properties: + id: + description: ID of the category + type: string + parent_category_id: + $ref: '#/components/schemas/Category/properties/id' + descriptor: + $ref: '#/components/schemas/Descriptor' + time: + $ref: '#/components/schemas/Time' + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Circle: + description: Describes a circular region of a specified radius centered at a specified GPS coordinate. + type: object + properties: + gps: + $ref: '#/components/schemas/Gps' + radius: + $ref: '#/components/schemas/Scalar' + City: + description: Describes a city + type: object + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + Contact: + description: Describes the contact information of an entity + type: object + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification + Context: + description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," + type: object + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - $ref: '#/components/schemas/Domain/properties/code' + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - $ref: '#/components/schemas/Location' + action: + description: The Beckn protocol method being called by the sender and executed at the receiver. + type: string + version: + type: string + description: Version of transaction protocol being used by the sender. + bap_id: + description: Subscriber ID of the BAP + allOf: + - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' + type: string + bap_uri: + description: Subscriber URL of the BAP for accepting callbacks from BPPs. + allOf: + - description: The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. + type: string + format: uri + bpp_id: + description: Subscriber ID of the BPP + allOf: + - $ref: '#/components/schemas/Context/properties/bap_id/allOf/0' + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - $ref: '#/components/schemas/Context/properties/bap_uri/allOf/0' + transaction_id: + description: 'This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP.' + type: string + format: uuid + message_id: + description: 'This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id.' + type: string + format: uuid + timestamp: + description: Time of request generation in RFC3339 format + type: string + format: date-time + key: + description: The encryption public key of the sender + type: string + ttl: + description: The duration in ISO8601 format after timestamp for which this message holds valid + type: string + required: + - action + - domain + - version + - bap_id + - bap_uri + - transaction_id + - message_id + Country: + description: Describes a country + type: object + properties: + name: + type: string + description: Name of the country + code: + type: string + description: Country code as per ISO 3166-1 and ISO 3166-2 format + Credential: + description: Describes a credential of an entity - Person or Organization + type: object + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + Customer: + description: Describes a customer buying/availing a product or a service + type: object + properties: + person: + $ref: '#/components/schemas/Person' + contact: + $ref: '#/components/schemas/Contact' + DecimalValue: + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + Descriptor: + description: Physical description of something. + type: object + properties: + name: + type: string + code: + type: string + short_desc: + type: string + long_desc: + type: string + additional_desc: + type: object + properties: + url: + type: string + content_type: + type: string + enum: + - text/plain + - text/html + - application/json + media: + type: array + items: + $ref: '#/components/schemas/MediaFile' + images: + type: array + items: + $ref: '#/components/schemas/Image' + Domain: + description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." + type: object + properties: + name: + description: Name of the domain + type: string + code: + description: 'Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network.' + type: string + enum: + - uei:evcharging + additional_info: + description: A url that contains addtional information about that domain. + allOf: + - $ref: '#/components/schemas/MediaFile' + Duration: + description: Describes duration as per ISO8601 format + type: string + Error: + description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' + type: object + properties: + code: + type: string + description: 'Standard error code. For full list of error codes, refer to docs/protocol-drafts/BECKN-005-ERROR-CODES-DRAFT-01.md of this repo"' + paths: + type: string + description: Path to json schema generating the error. Used only during json schema validation errors + message: + type: string + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. + Fee: + description: A fee applied on a particular entity + type: object + properties: + percentage: + description: Percentage of a value + allOf: + - $ref: '#/components/schemas/DecimalValue' + amount: + description: A fixed value + allOf: + - $ref: '#/components/schemas/Price' + Form: + description: Describes a form + type: object + properties: + url: + description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' + type: string + format: uri + data: + description: The form submission data + type: object + additionalProperties: + type: string + mime_type: + description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. + type: string + enum: + - text/html + - application/xml + submission_id: + type: string + format: uuid + Fulfillment: + description: Describes how a an order will be rendered/fulfilled to the end-customer + type: object + properties: + id: + description: Unique reference ID to the fulfillment of an order + type: string + type: + description: 'A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment.' + type: string + enum: + - CHARGING + - BATTERY_SWAP + rateable: + description: Whether the fulfillment can be rated or not + type: boolean + rating: + description: The rating value of the fulfullment service. + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + state: + description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. + allOf: + - $ref: '#/components/schemas/FulfillmentState' + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - $ref: '#/components/schemas/Customer' + agent: + description: The agent that is currently handling the fulfillment of the order + allOf: + - $ref: '#/components/schemas/Agent' + contact: + $ref: '#/components/schemas/Contact' + vehicle: + $ref: '#/components/schemas/Vehicle' + stops: + description: The list of logical stops encountered during the fulfillment of an order. + type: array + items: + $ref: '#/components/schemas/Stop' + path: + description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. + type: string + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + FulfillmentState: + description: Describes the state of fulfillment + type: object + properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + enum: + - SLOT_BOOKED + - SLOT_RESCHEDULED + - CHARGING_IN_PROGRESS + - CHARGING_COMPLETED + - CANCELLED + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + Gps: + description: Describes a GPS coordinate + type: string + pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$' + Image: + description: Describes an image + type: object + properties: + url: + description: URL to the image. This can be a data url or an remote url + type: string + format: uri + size_type: + description: The size of the image. The network policy can define the default dimensions of each type + type: string + enum: + - xs + - sm + - md + - lg + - xl + - custom + width: + description: Width of the image in pixels + type: string + height: + description: Height of the image in pixels + type: string + Intent: + description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" + type: object + properties: + descriptor: + description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' + allOf: + - $ref: '#/components/schemas/Descriptor' + provider: + description: The provider from which the customer wants to place to the order from + allOf: + - $ref: '#/components/schemas/Provider' + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - $ref: '#/components/schemas/Fulfillment' + location: + description: Location of the request that needs fulfillment. + allOf: + - $ref: '#/components/schemas/Location' + payment: + description: Details on how the customer wants to pay for the order + allOf: + - $ref: '#/components/schemas/Payment' + category: + description: Details on the item category + allOf: + - $ref: '#/components/schemas/Category' + offer: + description: details on the offer the customer wants to avail + allOf: + - $ref: '#/components/schemas/Offer' + item: + description: Details of the item that the consumer wants to order + allOf: + - $ref: '#/components/schemas/Item' + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + ItemQuantity: + description: Describes the count or amount of an item + type: object + properties: + allocated: + description: This represents the exact quantity allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: '#/components/schemas/Scalar' + available: + description: This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: '#/components/schemas/Scalar' + maximum: + description: This represents the maximum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: + $ref: '#/components/schemas/Scalar' + minimum: + description: This represents the minimum quantity allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: '#/components/schemas/Scalar' + selected: + description: This represents the quantity selected for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: + $ref: '#/components/schemas/Scalar' + unitized: + description: This represents the quantity available in a single unit of the item + type: object + properties: + count: + type: integer + minimum: 1 + maximum: 1 + measure: + $ref: '#/components/schemas/Scalar' + Item: + description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' + type: object + properties: + id: + description: ID of the item. + type: string + parent_item_id: + description: 'ID of the item, this item is a variant of' + allOf: + - $ref: '#/components/schemas/Item/properties/id' + parent_item_quantity: + description: The number of units of the parent item this item is a multiple of + allOf: + - $ref: '#/components/schemas/ItemQuantity' + descriptor: + description: Physical description of the item + allOf: + - $ref: '#/components/schemas/Descriptor' + creator: + description: The creator of this item + allOf: + - $ref: '#/components/schemas/Organization' + price: + description: 'The price of this item, if it has intrinsic value' + allOf: + - $ref: '#/components/schemas/Price' + quantity: + description: The selling quantity of the item + allOf: + - $ref: '#/components/schemas/ItemQuantity' + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - $ref: '#/components/schemas/Category/properties/id' + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - $ref: '#/components/schemas/Fulfillment/properties/id' + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - $ref: '#/components/schemas/Location/properties/id' + payment_ids: + description: Payment modalities through which this item can be ordered + type: array + items: + allOf: + - $ref: '#/components/schemas/Payment/properties/id' + add_ons: + type: array + items: + $ref: '#/components/schemas/AddOn' + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: '#/components/schemas/CancellationTerm' + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: '#/components/schemas/State' + refund_eligible: + description: Indicates if cancellation will result in a refund + type: boolean + refund_within: + description: Time within which refund will be processed after successful cancellation. + allOf: + - $ref: '#/components/schemas/Time' + refund_amount: + $ref: '#/components/schemas/Price' + replacement_terms: + description: Terms that are applicable be met when this item is replaced + type: array + items: + $ref: '#/components/schemas/ReplacementTerm' + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + $ref: '#/components/schemas/ReturnTerm' + xinput: + description: Additional input required from the customer to purchase / avail this item + allOf: + - $ref: '#/components/schemas/XInput' + time: + description: Temporal attributes of this item. This property is used when the item exists on the catalog only for a limited period of time. + allOf: + - $ref: '#/components/schemas/Time' + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + matched: + description: Whether this item is an exact match of the request + type: boolean + related: + description: Whether this item is a related item to the exactly matched item + type: boolean + recommended: + description: Whether this item is a recommended item to a response + type: boolean + ttl: + description: Time to live in seconds for an instance of this schema + type: string + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Location: + description: The physical location of something + type: object + properties: + id: + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + map_url: + description: The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. + type: string + format: uri + gps: + description: The GPS co-ordinates of this location. + allOf: + - $ref: '#/components/schemas/Gps' + address: + description: The address of this location. + allOf: + - $ref: '#/components/schemas/Address' + city: + description: 'The city this location is, or is located within' + allOf: + - $ref: '#/components/schemas/City' + district: + description: 'The state this location is, or is located within' + type: string + state: + description: 'The state this location is, or is located within' + allOf: + - $ref: '#/components/schemas/State' + country: + description: 'The country this location is, or is located within' + allOf: + - $ref: '#/components/schemas/Country' + area_code: + type: string + circle: + $ref: '#/components/schemas/Circle' + polygon: + description: The boundary polygon of this location + type: string + 3dspace: + description: The three dimensional region describing this location + type: string + rating: + description: The rating of this location + allOf: + - $ref: '#/components/schemas/Rating/properties/value' + MediaFile: + description: This object contains a url to a media file. + type: object + properties: + mimetype: + description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" + type: string + url: + description: The URL of the file + type: string + format: uri + signature: + description: The digital signature of the file signed by the sender + type: string + dsa: + description: The signing algorithm used by the sender + type: string + Offer: + description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. + type: object + properties: + id: + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + location_ids: + type: array + items: + $ref: '#/components/schemas/Location/properties/id' + category_ids: + type: array + items: + $ref: '#/components/schemas/Category/properties/id' + item_ids: + type: array + items: + $ref: '#/components/schemas/Item/properties/id' + time: + $ref: '#/components/schemas/Time' + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Option: + description: Describes a selectable option + type: object + properties: + id: + type: string + descriptor: + $ref: '#/components/schemas/Descriptor' + Order: + description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. + type: object + properties: + id: + type: string + description: Human-readable ID of the order. This is generated at the BPP layer. The BPP can either generate order id within its system or forward the order ID created at the provider level. + ref_order_ids: + description: A list of order IDs to link this order to previous orders. + type: array + items: + type: string + description: ID of a previous order + status: + description: Status of the order. Allowed values can be defined by the network policy + type: string + enum: + - ACTIVE + - COMPLETE + - CANCELLED + type: + description: 'This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level.' + type: string + default: DEFAULT + enum: + - EMERGENCY + - SCHEDULED + - RECURRING + - SUBSCRIPTION + provider: + description: Details of the provider whose catalog items have been selected. + allOf: + - $ref: '#/components/schemas/Provider' + items: + description: The items purchased / availed in this order + type: array + items: + $ref: '#/components/schemas/Item' + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: + $ref: '#/components/schemas/AddOn' + offers: + description: The offers applied in this order + type: array + items: + $ref: '#/components/schemas/Offer' + billing: + description: The billing details of this order + allOf: + - $ref: '#/components/schemas/Billing' + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: + $ref: '#/components/schemas/Fulfillment' + cancellation: + description: The cancellation details of this order + allOf: + - $ref: '#/components/schemas/Cancellation' + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + $ref: '#/components/schemas/CancellationTerm' + refund_terms: + description: Refund terms of this item + type: array + items: + $ref: '#/components/schemas/Item/properties/refund_terms/items' + replacement_terms: + description: Replacement terms of this item + type: array + items: + $ref: '#/components/schemas/ReplacementTerm' + return_terms: + description: Return terms of this item + type: array + items: + $ref: '#/components/schemas/ReturnTerm' + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - $ref: '#/components/schemas/Quotation' + payments: + description: The terms of settlement for this order + type: array + items: + $ref: '#/components/schemas/Payment' + created_at: + description: The date-time of creation of this order + type: string + format: date-time + updated_at: + description: The date-time of updated of this order + type: string + format: date-time + xinput: + description: Additional input required from the customer to confirm this order + allOf: + - $ref: '#/components/schemas/XInput' + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Organization: + description: An organization. Usually a recognized business entity. + type: object + properties: + descriptor: + $ref: '#/components/schemas/Descriptor' + address: + description: The postal address of the organization + allOf: + - $ref: '#/components/schemas/Address' + state: + description: The state where the organization's address is registered + allOf: + - $ref: '#/components/schemas/State' + city: + description: The city where the the organization's address is registered + allOf: + - $ref: '#/components/schemas/City' + contact: + $ref: '#/components/schemas/Contact' + Payment: + description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." + type: object + properties: + id: + description: ID of the payment term that can be referred at an item or an order level in a catalog + type: string + collected_by: + description: "This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly." + type: string + enum: + - BAP + - BPP + url: + type: string + description: 'A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory.' + format: uri + params: + type: object + properties: + transaction_id: + type: string + description: The reference transaction ID associated with a payment activity + amount: + type: string + currency: + type: string + bank_code: + type: string + bank_account_number: + type: string + virtual_payment_address: + type: string + source_bank_code: + type: string + source_bank_account_number: + type: string + source_virtual_payment_address: + type: string + type: + type: string + enum: + - PRE_ORDER + - PRE_FULFILLMENT + - ON_FULFILLMENT + - POST_FULFILLMENT + status: + type: string + enum: + - PAID + - NOT_PAID + time: + $ref: '#/components/schemas/Time' + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Person: + description: Describes a person as any individual + type: object + properties: + id: + type: string + description: Describes the identity of the person + url: + description: Profile url of the person + type: string + format: uri + name: + description: the name of the person + type: string + image: + $ref: '#/components/schemas/Image' + age: + description: Age of the person + allOf: + - $ref: '#/components/schemas/Duration' + dob: + description: Date of birth of the person + type: string + format: date + gender: + type: string + description: 'Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy' + creds: + type: array + items: + $ref: '#/components/schemas/Credential' + languages: + type: array + items: + description: Describes a language known to the person. + type: object + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + properties: + code: + type: string + name: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Price: + description: Describes the price of a product or service + type: object + properties: + currency: + type: string + value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + computed_value: + $ref: '#/components/schemas/DecimalValue' + listed_value: + $ref: '#/components/schemas/DecimalValue' + offered_value: + $ref: '#/components/schemas/DecimalValue' + minimum_value: + $ref: '#/components/schemas/DecimalValue' + maximum_value: + $ref: '#/components/schemas/DecimalValue' + Provider: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: + $ref: '#/components/schemas/Descriptor' + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: + $ref: '#/components/schemas/Rating/properties/value' + time: + $ref: '#/components/schemas/Time' + categories: + type: array + items: + $ref: '#/components/schemas/Category' + fulfillments: + type: array + items: + $ref: '#/components/schemas/Fulfillment' + payments: + type: array + items: + $ref: '#/components/schemas/Payment' + locations: + type: array + items: + $ref: '#/components/schemas/Location' + offers: + type: array + items: + $ref: '#/components/schemas/Offer' + items: + type: array + items: + $ref: '#/components/schemas/Item' + exp: + type: string + description: Time after which catalog has to be refreshed + format: date-time + rateable: + description: Whether this provider can be rated or not + type: boolean + ttl: + description: 'The time-to-live in seconds, for this object. This can be overriden at deeper levels. A value of -1 indicates that this object is not cacheable.' + type: integer + minimum: -1 + tags: + type: array + items: + $ref: '#/components/schemas/TagGroup' + Quotation: + description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' + type: object + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - $ref: '#/components/schemas/Price' + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: + $ref: '#/components/schemas/Item' + title: + type: string + enum: + - ENERGY + - TAX + - DISCOUNT + - ADD_ON + price: + $ref: '#/components/schemas/Price' + ttl: + $ref: '#/components/schemas/Duration' + Rating: + description: Describes the rating of an entity + type: object + properties: + rating_category: + description: Category of the entity being rated + type: string + enum: + - ORDER + - FULFILLMENT + - CHARGING_STATION + - SUPPORT + - PAYMENT + id: + description: Id of the object being rated + type: string + value: + description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' + type: string + Region: + description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. + type: object + properties: + dimensions: + description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' + type: string + enum: + - '1' + - '2' + - '3' + type: + description: 'The type of region. This is used to specify the granularity of the region represented by this object. Various examples of two-dimensional region types are city, country, state, district, and so on. The network policy should contain a list of all possible region types supported by the network.' + type: string + name: + type: string + description: Name of the region as specified on the map where that region exists. + code: + type: string + description: A standard code representing the region. This should be interpreted in the same way by all network participants. + boundary: + type: string + description: 'A string representing the boundary of the region. One-dimensional regions are represented by polylines. Two-dimensional regions are represented by polygons, and three-dimensional regions can represented by polyhedra.' + map_url: + type: string + description: The url to the map of the region. This can be a globally recognized map or the one specified by the network policy. + ReplacementTerm: + description: The replacement policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term is applicable. + allOf: + - $ref: '#/components/schemas/State' + replace_within: + description: 'Applicable only for buyer managed returns where the buyer has to replace the item before a certain date-time, failing which they will not be eligible for replacement' + allOf: + - $ref: '#/components/schemas/Time' + external_ref: + $ref: '#/components/schemas/MediaFile' + ReturnTerm: + description: Describes the return policy of an item or an order + type: object + properties: + fulfillment_state: + description: The state of fulfillment during which this term IETF''s applicable. + allOf: + - $ref: '#/components/schemas/State' + return_eligible: + description: Indicates whether the item is eligible for return + type: boolean + return_time: + description: 'Applicable only for buyer managed returns where the buyer has to return the item to the origin before a certain date-time, failing which they will not be eligible for refund.' + allOf: + - $ref: '#/components/schemas/Time' + return_location: + description: The location where the item or order must / will be returned to + allOf: + - $ref: '#/components/schemas/Location' + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + Scalar: + description: Describes a scalar + type: object + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: + $ref: '#/components/schemas/DecimalValue' + estimated_value: + $ref: '#/components/schemas/DecimalValue' + computed_value: + $ref: '#/components/schemas/DecimalValue' + range: + type: object + properties: + min: + $ref: '#/components/schemas/DecimalValue' + max: + $ref: '#/components/schemas/DecimalValue' + unit: + type: string + Schedule: + description: 'Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times' + type: object + properties: + frequency: + $ref: '#/components/schemas/Duration' + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + State: + description: A bounded geopolitical region of governance inside a country. + type: object + properties: + name: + type: string + description: Name of the state + code: + type: string + description: State code as per country or international standards + Stop: + description: A logical point in space and time during the fulfillment of an order. + type: object + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - $ref: '#/components/schemas/Location' + type: + description: The type of stop. Allowed values of this property can be defined by the network policy. + type: string + time: + description: Timings applicable at the stop. + allOf: + - $ref: '#/components/schemas/Time' + instructions: + description: Instructions that need to be followed at the stop + allOf: + - $ref: '#/components/schemas/Descriptor' + contact: + description: Contact details of the stop + allOf: + - $ref: '#/components/schemas/Contact' + person: + description: The details of the person present at the stop + allOf: + - $ref: '#/components/schemas/Person' + authorization: + $ref: '#/components/schemas/Authorization' + Support: + description: Details of customer support + type: object + properties: + ref_id: + type: string + callback_phone: + type: string + format: phone + phone: + type: string + format: phone + email: + type: string + format: email + url: + type: string + format: uri + Tag: + description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' + type: object + properties: + descriptor: + description: 'Description of the Tag, can be used to store detailed information.' + allOf: + - $ref: '#/components/schemas/Descriptor' + value: + description: The value of the tag. This set by the BPP and rendered as-is by the BAP. + type: string + display: + description: 'This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value.' + type: boolean + TagGroup: + description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' + type: object + properties: + display: + description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' + type: boolean + default: true + descriptor: + description: 'Description of the TagGroup, can be used to store detailed information.' + allOf: + - $ref: '#/components/schemas/Descriptor' + list: + description: 'An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema.' + type: array + items: + $ref: '#/components/schemas/Tag' + Time: + description: 'Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule' + type: object + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: + $ref: '#/components/schemas/Duration' + range: + type: object + properties: + start: + type: string + format: date-time + end: + type: string + format: date-time + days: + type: string + description: comma separated values representing days of the week + schedule: + $ref: '#/components/schemas/Schedule' + Tracking: + description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. + type: object + properties: + id: + description: A unique tracking reference number + type: string + url: + description: 'A URL to the tracking endpoint. This can be a link to a tracking webpage, a webhook URL created by the BAP where BPP can push the tracking data, or a GET url creaed by the BPP which the BAP can poll to get the tracking data. It can also be a websocket URL where the BPP can push real-time tracking data.' + type: string + format: uri + location: + description: 'In case there is no real-time tracking endpoint available, this field will contain the latest location of the entity being tracked. The BPP will update this value everytime the BAP calls the track API.' + allOf: + - $ref: '#/components/schemas/Location' + status: + description: 'This value indicates if the tracking is currently active or not. If this value is `active`, then the BAP can begin tracking the order. If this value is `inactive`, the tracking URL is considered to be expired and the BAP should stop tracking the order.' + type: string + enum: + - ACTIVE + - INACTIVE + Vehicle: + description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' + type: object + properties: + category: + type: string + capacity: + type: integer + make: + type: string + model: + type: string + size: + type: string + variant: + type: string + color: + type: string + energy_type: + type: string + registration: + type: string + wheels_count: + type: string + cargo_volumne: + type: string + wheelchair_access: + type: string + code: + type: string + emission_standard: + type: string + XInput: + description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' + type: object + properties: + form: + $ref: '#/components/schemas/Form' + required: + description: Indicates whether the form data is mandatorily required by the BPP to confirm the order. + type: boolean From f970e75abba7251969bf5811795a2b87a85f69b0 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Thu, 30 May 2024 15:59:19 +0530 Subject: [PATCH 14/16] adding AUTOMATIC_DISPATCH and VIRTUAL_POWER_PURCHASE_AGREEMENTS as fulfillment types --- api/l2-config/uei_evcharging_1.1.0.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/l2-config/uei_evcharging_1.1.0.yaml b/api/l2-config/uei_evcharging_1.1.0.yaml index a838f24..0ba3334 100644 --- a/api/l2-config/uei_evcharging_1.1.0.yaml +++ b/api/l2-config/uei_evcharging_1.1.0.yaml @@ -2957,6 +2957,8 @@ components: enum: - CHARGING - BATTERY_SWAP + - AUTOMATIC_DISPATCH + - VIRTUAL_POWER_PURCHASE_AGREEMENTS rateable: description: Whether the fulfillment can be rated or not type: boolean From be5a924bf2d070967e3fbecba96a79838edd2876 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 11 Jun 2024 00:10:48 +0530 Subject: [PATCH 15/16] adding validations in the uei layer2 specification --- api/l2-config/uei_evcharging_1.1.0.yaml | 440 +++++++++++++++++++++++- 1 file changed, 423 insertions(+), 17 deletions(-) diff --git a/api/l2-config/uei_evcharging_1.1.0.yaml b/api/l2-config/uei_evcharging_1.1.0.yaml index 0ba3334..5f24e1e 100644 --- a/api/l2-config/uei_evcharging_1.1.0.yaml +++ b/api/l2-config/uei_evcharging_1.1.0.yaml @@ -118,7 +118,8 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' required: - order required: @@ -204,7 +205,10 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing required: - order required: @@ -296,7 +300,11 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BAPOrder' + required: + - billing + - payments required: - order required: @@ -579,6 +587,8 @@ paths: description: Updated order object allOf: - $ref: '#/components/schemas/Order' + required: + - id required: - update_target - order @@ -691,6 +701,7 @@ paths: properties: ratings: type: array + minItems: 1 items: $ref: '#/components/schemas/Rating' required: @@ -771,6 +782,8 @@ paths: properties: support: $ref: '#/components/schemas/Support' + required: + - ref_id required: - context - message @@ -1066,7 +1079,15 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + required: + - order error: $ref: '#/components/schemas/Error' required: @@ -1223,7 +1244,19 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - not: + required: + - id + required: + - quote + - billing + - payments + - cancellation_terms + - refund_terms + - return_terms + - replacement_terms required: - order error: @@ -1400,7 +1433,31 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - state + required: + - quote + - billing + - payments + - cancellation_terms + - refund_terms + - return_terms + - replacement_terms + - id required: - order error: @@ -1588,7 +1645,34 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - cancellation_terms + - refund_terms + - return_terms + - replacement_terms + - id + - cancellation required: - order error: @@ -1886,7 +1970,33 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - cancellation_terms + - refund_terms + - return_terms + - replacement_terms + - id required: - order error: @@ -2198,7 +2308,33 @@ paths: type: object properties: order: - $ref: '#/components/schemas/Order' + allOf: + - $ref: '#/components/schemas/BPPOrder' + - properties: + fulfillments: + type: array + items: + allOf: + - properties: + state: + allOf: + - properties: + descriptor: + required: + - code + required: + - descriptor + required: + - state + required: + - quote + - billing + - payments + - cancellation_terms + - refund_terms + - return_terms + - replacement_terms + - id required: - order error: @@ -2466,7 +2602,15 @@ paths: type: object properties: support: - $ref: '#/components/schemas/Support' + allOf: + - $ref: '#/components/schemas/Support' + - anyOf: + - required: + - phone + - required: + - email + - required: + - url error: $ref: '#/components/schemas/Error' required: @@ -2532,6 +2676,7 @@ components: Ack: description: 'Describes the acknowledgement sent in response to an API call. If the implementation uses HTTP/S, then Ack must be returned in the same session. Every API call to a BPP must be responded to with an Ack whether the BPP intends to respond with a callback or not. This has one property called `status` that indicates the status of the Acknowledgement.' type: object + additionalProperties: false properties: status: type: string @@ -2547,12 +2692,24 @@ components: AddOn: description: Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. type: object + additionalProperties: false properties: id: description: Provider-defined ID of the add-on type: string descriptor: - $ref: '#/components/schemas/Descriptor' + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + type: string + enum: + - VEHICLE_WASH + - MIRROR_CLEANING + - TIRE_CHECK + - BATTERY_HEALTH_CHECK + - FREE_WIFI + - INSURANCE price: $ref: '#/components/schemas/Price' Address: @@ -2560,6 +2717,8 @@ components: type: string Agent: description: "Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride." + type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -2572,6 +2731,7 @@ components: Authorization: description: 'Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation.' type: object + additionalProperties: false properties: type: description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. @@ -2593,6 +2753,7 @@ components: Billing: description: 'Describes the billing details of an entity.
This has properties like name,organization,address,email,phone,time,tax_number, created_at,updated_at' type: object + additionalProperties: false properties: name: description: Name of the billable entity @@ -2630,6 +2791,7 @@ components: Cancellation: description: Describes a cancellation event type: object + additionalProperties: false properties: time: description: Date-time when the order was cancelled by the buyer @@ -2648,9 +2810,13 @@ components: description: Any additional information regarding the nature of cancellation allOf: - $ref: '#/components/schemas/Descriptor' + required: + - time + - cancelled_by CancellationTerm: description: Describes the cancellation terms of an item or an order. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level. type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -2669,15 +2835,20 @@ components: $ref: '#/components/schemas/XInput' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - cancel_by + - cancellation_fee Catalog: description: 'Describes the products or services offered by a BPP. This is typically sent as the response to a search intent from a BAP. The payment terms, offers and terms of fulfillment supported by the BPP can also be included here. The BPP can show hierarchical nature of products/services in its catalog using the parent_category_id in categories. The BPP can also send a ttl (time to live) in the context which is the duration for which a BAP can cache the catalog and use the cached catalog.
This has properties like bbp/descriptor,bbp/categories,bbp/fulfillments,bbp/payments,bbp/offers,bbp/providers and exp
This is used in the following situations.
  • This is typically used in the discovery stage when the BPP sends the details of the products and services it offers as response to a search intent from the BAP.
' type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' fulfillments: description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded. type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' payments: @@ -2692,8 +2863,44 @@ components: $ref: '#/components/schemas/Offer' providers: type: array + minItems: 1 items: - $ref: '#/components/schemas/Provider' + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + - images + - short_desc + - long_desc + required: + - id + - descriptor + - price + - category_ids + - fulfillment_ids + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + required: + - name + - images + - short_desc + - long_desc + required: + - id + - categories + - descriptor + - items exp: description: Timestamp after which catalog will expire type: string @@ -2704,6 +2911,7 @@ components: Category: description: A label under which a collection of items can be grouped. type: object + additionalProperties: false properties: id: description: ID of the category @@ -2711,7 +2919,15 @@ components: parent_category_id: $ref: '#/components/schemas/Category/properties/id' descriptor: - $ref: '#/components/schemas/Descriptor' + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + code: + type: string + enum: + - STANDARD_CHARGING + - FAST_CHARGING + - ULTRA_FAST_CHARGING time: $ref: '#/components/schemas/Time' ttl: @@ -2723,6 +2939,7 @@ components: Circle: description: Describes a circular region of a specified radius centered at a specified GPS coordinate. type: object + additionalProperties: false properties: gps: $ref: '#/components/schemas/Gps' @@ -2731,6 +2948,7 @@ components: City: description: Describes a city type: object + additionalProperties: false properties: name: description: Name of the city @@ -2741,6 +2959,7 @@ components: Contact: description: Describes the contact information of an entity type: object + additionalProperties: false properties: phone: type: string @@ -2752,6 +2971,7 @@ components: Context: description: "Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields.
  1. Demographic information about the transaction using fields like `domain`, `country`, and `region`.
  2. Addressing details like the sending and receiving platform's ID and API URL.
  3. Interoperability information like the protocol version that implemented by the sender and,
  4. Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.
This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions," type: object + additionalProperties: false properties: domain: description: Domain code that is relevant to this transaction context @@ -2761,6 +2981,9 @@ components: description: The location where the transaction is intended to be fulfilled. allOf: - $ref: '#/components/schemas/Location' + required: + - country + - city action: description: The Beckn protocol method being called by the sender and executed at the receiver. type: string @@ -2772,6 +2995,8 @@ components: allOf: - description: 'A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform.' type: string + not: + format: uri bap_uri: description: Subscriber URL of the BAP for accepting callbacks from BPPs. allOf: @@ -2812,9 +3037,11 @@ components: - bap_uri - transaction_id - message_id + - ttl Country: description: Describes a country type: object + additionalProperties: false properties: name: type: string @@ -2825,6 +3052,7 @@ components: Credential: description: Describes a credential of an entity - Person or Organization type: object + additionalProperties: false properties: id: type: string @@ -2838,6 +3066,7 @@ components: Customer: description: Describes a customer buying/availing a product or a service type: object + additionalProperties: false properties: person: $ref: '#/components/schemas/Person' @@ -2850,6 +3079,7 @@ components: Descriptor: description: Physical description of something. type: object + additionalProperties: false properties: name: type: string @@ -2881,6 +3111,7 @@ components: Domain: description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large." type: object + additionalProperties: false properties: name: description: Name of the domain @@ -2900,6 +3131,7 @@ components: Error: description: 'Describes an error object that is returned by a BAP, BPP or BG as a response or callback to an action by another network participant. This object is sent when any request received by a network participant is unacceptable. This object can be sent either during Ack or with the callback.' type: object + additionalProperties: false properties: code: type: string @@ -2913,6 +3145,7 @@ components: Fee: description: A fee applied on a particular entity type: object + additionalProperties: false properties: percentage: description: Percentage of a value @@ -2925,6 +3158,7 @@ components: Form: description: Describes a form type: object + additionalProperties: false properties: url: description: 'The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form.' @@ -2947,6 +3181,7 @@ components: Fulfillment: description: Describes how a an order will be rendered/fulfilled to the end-customer type: object + additionalProperties: false properties: id: description: Unique reference ID to the fulfillment of an order @@ -2958,7 +3193,6 @@ components: - CHARGING - BATTERY_SWAP - AUTOMATIC_DISPATCH - - VIRTUAL_POWER_PURCHASE_AGREEMENTS rateable: description: Whether the fulfillment can be rated or not type: boolean @@ -3001,12 +3235,14 @@ components: FulfillmentState: description: Describes the state of fulfillment type: object + additionalProperties: false properties: descriptor: allOf: - $ref: '#/components/schemas/Descriptor' - properties: code: + type: string enum: - SLOT_BOOKED - SLOT_RESCHEDULED @@ -3026,6 +3262,7 @@ components: Image: description: Describes an image type: object + additionalProperties: false properties: url: description: URL to the image. This can be a data url or an remote url @@ -3047,9 +3284,12 @@ components: height: description: Height of the image in pixels type: string + required: + - url Intent: description: "The intent to buy or avail a product or a service. The BAP can declare the intent of the consumer containing
  • What they want (A product, service, offer)
  • Who they want (A seller, service provider, agent etc)
  • Where they want it and where they want it from
  • When they want it (start and end time of fulfillment
  • How they want to pay for it

This has properties like descriptor,provider,fulfillment,payment,category,offer,item,tags
This is typically used by the BAP to send the purpose of the user's search to the BPP. This will be used by the BPP to find products or services it offers that may match the user's intent.
For example, in Mobility, the mobility consumer declares a mobility intent. In this case, the mobility consumer declares information that describes various aspects of their journey like,
  • Where would they like to begin their journey (intent.fulfillment.start.location)
  • Where would they like to end their journey (intent.fulfillment.end.location)
  • When would they like to begin their journey (intent.fulfillment.start.time)
  • When would they like to end their journey (intent.fulfillment.end.time)
  • Who is the transport service provider they would like to avail services from (intent.provider)
  • Who is traveling (This is not recommended in public networks) (intent.fulfillment.customer)
  • What kind of fare product would they like to purchase (intent.item)
  • What add-on services would they like to avail
  • What offers would they like to apply on their booking (intent.offer)
  • What category of services would they like to avail (intent.category)
  • What additional luggage are they carrying
  • How would they like to pay for their journey (intent.payment)

For example, in health domain, a consumer declares the intent for a lab booking the describes various aspects of their booking like,
  • Where would they like to get their scan/test done (intent.fulfillment.start.location)
  • When would they like to get their scan/test done (intent.fulfillment.start.time)
  • When would they like to get the results of their test/scan (intent.fulfillment.end.time)
  • Who is the service provider they would like to avail services from (intent.provider)
  • Who is getting the test/scan (intent.fulfillment.customer)
  • What kind of test/scan would they like to purchase (intent.item)
  • What category of services would they like to avail (intent.category)
  • How would they like to pay for their journey (intent.payment)
" type: object + additionalProperties: false properties: descriptor: description: 'A raw description of the search intent. Free text search strings, raw audio, etc can be sent in this object.' @@ -3090,6 +3330,7 @@ components: ItemQuantity: description: Describes the count or amount of an item type: object + additionalProperties: false properties: allocated: description: This represents the exact quantity allocated for purchase of the item. @@ -3149,6 +3390,7 @@ components: Item: description: 'Describes a product or a service offered to the end consumer by the provider. In the mobility sector, it can represent a fare product like one way journey. In the logistics sector, it can represent the delivery service offering. In the retail domain it can represent a product like a grocery item.' type: object + additionalProperties: false properties: id: description: ID of the item. @@ -3165,6 +3407,13 @@ components: description: Physical description of the item allOf: - $ref: '#/components/schemas/Descriptor' + - properties: + code: + type: string + enum: + - STANDARD_CHARGING + - FAST_CHARGING + - ULTRA_FAST_CHARGING creator: description: The creator of this item allOf: @@ -3274,6 +3523,7 @@ components: Location: description: The physical location of something type: object + additionalProperties: false properties: id: type: string @@ -3323,6 +3573,7 @@ components: MediaFile: description: This object contains a url to a media file. type: object + additionalProperties: false properties: mimetype: description: "indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838" @@ -3340,6 +3591,7 @@ components: Offer: description: An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. type: object + additionalProperties: false properties: id: type: string @@ -3366,6 +3618,7 @@ components: Option: description: Describes a selectable option type: object + additionalProperties: false properties: id: type: string @@ -3374,6 +3627,7 @@ components: Order: description: Describes a legal purchase order. It contains the complete details of the legal contract created between the buyer and the seller. type: object + additionalProperties: false properties: id: type: string @@ -3407,6 +3661,7 @@ components: items: description: The items purchased / availed in this order type: array + minItems: 1 items: $ref: '#/components/schemas/Item' add_ons: @@ -3426,6 +3681,7 @@ components: fulfillments: description: The fulfillments involved in completing this order type: array + minItems: 1 items: $ref: '#/components/schemas/Fulfillment' cancellation: @@ -3477,9 +3733,104 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + BAPOrder: + description: Describes the order details from the perspective of the BAP. Contains the order details sent from a BAP to BPP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + required: + - id + items: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Item' + required: + - id + fulfillments: + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/Fulfillment' + required: + - id + required: + - provider + - items + - fulfillments + BPPOrder: + description: Describes the order details from the perspective of the BPP. Contains the order details sent from a BPP to BAP. + allOf: + - $ref: '#/components/schemas/Order' + - properties: + provider: + allOf: + - $ref: '#/components/schemas/Provider' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + required: + - id + - descriptor + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Item' + - properties: + descriptor: + allOf: + - $ref: '#/components/schemas/Descriptor' + - properties: + images: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Image' + required: + - name + - images + - short_desc + price: + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - id + - descriptor + - price + fulfillments: + type: array + items: + required: + - id + - type + required: + - provider + - items + - fulfillments Organization: description: An organization. Usually a recognized business entity. type: object + additionalProperties: false properties: descriptor: $ref: '#/components/schemas/Descriptor' @@ -3500,6 +3851,7 @@ components: Payment: description: "Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains
  1. the amount that has to be settled,
  2. The payment destination destination details
  3. When the settlement should happen, and
  4. A transaction reference ID
. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions." type: object + additionalProperties: false properties: id: description: ID of the payment term that can be referred at an item or an order level in a catalog @@ -3536,6 +3888,9 @@ components: type: string source_virtual_payment_address: type: string + required: + - amount + - currency type: type: string enum: @@ -3554,9 +3909,15 @@ components: type: array items: $ref: '#/components/schemas/TagGroup' + required: + - id + - collected_by + - type + - status Person: description: Describes a person as any individual type: object + additionalProperties: false properties: id: type: string @@ -3612,6 +3973,7 @@ components: Price: description: Describes the price of a product or service type: object + additionalProperties: false properties: currency: type: string @@ -3632,6 +3994,7 @@ components: Provider: description: Describes the catalog of a business. type: object + additionalProperties: false properties: id: type: string @@ -3647,6 +4010,7 @@ components: $ref: '#/components/schemas/Time' categories: type: array + minItems: 1 items: $ref: '#/components/schemas/Category' fulfillments: @@ -3667,6 +4031,7 @@ components: $ref: '#/components/schemas/Offer' items: type: array + minItems: 1 items: $ref: '#/components/schemas/Item' exp: @@ -3687,6 +4052,7 @@ components: Quotation: description: 'Describes a quote. It is the estimated price of products or services from the BPP.
This has properties like price, breakup, ttl' type: object + additionalProperties: false properties: id: description: ID of the quote. @@ -3696,9 +4062,13 @@ components: description: The total quoted price allOf: - $ref: '#/components/schemas/Price' + required: + - currency + - value breakup: description: the breakup of the total quoted price type: array + minItems: 1 items: type: object properties: @@ -3712,12 +4082,24 @@ components: - DISCOUNT - ADD_ON price: - $ref: '#/components/schemas/Price' + allOf: + - $ref: '#/components/schemas/Price' + required: + - currency + - value + required: + - title + - price ttl: $ref: '#/components/schemas/Duration' + required: + - price + - breakup + - ttl Rating: description: Describes the rating of an entity type: object + additionalProperties: false properties: rating_category: description: Category of the entity being rated @@ -3734,9 +4116,14 @@ components: value: description: 'Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||.' type: string + required: + - rating_category + - id + - value Region: description: Describes an arbitrary region of space. The network policy should contain a published list of supported regions by the network. type: object + additionalProperties: false properties: dimensions: description: 'The number of dimensions that are used to describe any point inside that region. The most common dimensionality of a region is 2, that represents an area on a map. There are regions on the map that can be approximated to one-dimensional regions like roads, railway lines, or shipping lines. 3 dimensional regions are rarer, but are gaining popularity as flying drones are being adopted for various fulfillment services.' @@ -3763,6 +4150,7 @@ components: ReplacementTerm: description: The replacement policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term is applicable. @@ -3774,9 +4162,12 @@ components: - $ref: '#/components/schemas/Time' external_ref: $ref: '#/components/schemas/MediaFile' + required: + - replace_within ReturnTerm: description: Describes the return policy of an item or an order type: object + additionalProperties: false properties: fulfillment_state: description: The state of fulfillment during which this term IETF''s applicable. @@ -3799,9 +4190,12 @@ components: enum: - CONSUMER - PROVIDER + required: + - return_time Scalar: description: Describes a scalar type: object + additionalProperties: false properties: type: type: string @@ -3826,6 +4220,7 @@ components: Schedule: description: 'Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.
This has properties like frequency, holidays, times' type: object + additionalProperties: false properties: frequency: $ref: '#/components/schemas/Duration' @@ -3842,6 +4237,7 @@ components: State: description: A bounded geopolitical region of governance inside a country. type: object + additionalProperties: false properties: name: type: string @@ -3852,6 +4248,7 @@ components: Stop: description: A logical point in space and time during the fulfillment of an order. type: object + additionalProperties: false properties: id: type: string @@ -3885,24 +4282,28 @@ components: Support: description: Details of customer support type: object + additionalProperties: false properties: ref_id: type: string callback_phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' phone: type: string - format: phone + pattern: '^\+?[1-9]\d{1,14}$' email: type: string format: email url: type: string format: uri + required: + - ref_id Tag: description: 'Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service.' type: object + additionalProperties: false properties: descriptor: description: 'Description of the Tag, can be used to store detailed information.' @@ -3917,6 +4318,7 @@ components: TagGroup: description: 'A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316' type: object + additionalProperties: false properties: display: description: 'Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search.' @@ -3934,6 +4336,7 @@ components: Time: description: 'Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations
This has properties like label, time stamp,duration,range, days, schedule' type: object + additionalProperties: false properties: label: type: string @@ -3959,6 +4362,7 @@ components: Tracking: description: Contains tracking information that can be used by the BAP to track the fulfillment of an order in real-time. which is useful for knowing the location of time sensitive deliveries. type: object + additionalProperties: false properties: id: description: A unique tracking reference number @@ -3980,6 +4384,7 @@ components: Vehicle: description: 'Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
This has properties like category, capacity, make, model, size,variant,color,energy_type,registration' type: object + additionalProperties: false properties: category: type: string @@ -4012,6 +4417,7 @@ components: XInput: description: 'Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on the nature of shipment in order to confirm the shipping. A recruiting firm may require additional details on the applicant in order to confirm a job application. For all such purposes, the BPP can choose to send this object attached to any object in the catalog that is required to be sent while placing the order. This object can typically be sent at an item level or at the order level. The item level XInput will override the Order level XInput as it indicates a special requirement of information for that particular item. Hence the BAP must render a separate form for the Item and another form at the Order level before confirmation.' type: object + additionalProperties: false properties: form: $ref: '#/components/schemas/Form' From fd36df1d57545d9cc93e939dbd280152ca0d85ad Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Tue, 11 Jun 2024 18:51:27 +0530 Subject: [PATCH 16/16] fixning the example jsons in the layer2 config according to the layer2 config changes --- api/l2-config/uei_evcharging_1.1.0.yaml | 1982 ++++++++++++----------- 1 file changed, 1039 insertions(+), 943 deletions(-) diff --git a/api/l2-config/uei_evcharging_1.1.0.yaml b/api/l2-config/uei_evcharging_1.1.0.yaml index 5f24e1e..ecf61ba 100644 --- a/api/l2-config/uei_evcharging_1.1.0.yaml +++ b/api/l2-config/uei_evcharging_1.1.0.yaml @@ -37,37 +37,40 @@ paths: The BAP looks for EV charging providers: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: search location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 timestamp: '2023-07-16T04:41:16Z' + ttl: 'PT5M' message: intent: item: descriptor: - code: energy + name: Energy quantity: - required: - value: '4.0' - unit: kWH - category: - descriptor: - code: green-tariff + available: + measure: + value: '4.0' + unit: kWH + category: + descriptor: + code: GREEN_TARIFF location: - gps: 12.423423,77.325647 - radius: - type: CONSTANT - value: '5' - unit: km + circle: + gps: 12.423423,77.325647 + radius: + type: CONSTANT + value: '5' + unit: km responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -129,13 +132,13 @@ paths: The BAP selects an EV charging service from a provider: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: select location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -149,12 +152,16 @@ paths: provider: id: chargezone.in items: - - id: pe-charging-01 - quantity: - selected: - measure: - value: '4' - unit: kWh + - id: pe-charging-01 + quantity: + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 + fulfillments: + - id: '1' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -218,13 +225,13 @@ paths: The BAP initiates an order for the EV charging service from a provider: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: init location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -238,18 +245,25 @@ paths: provider: id: chargezone.in items: - - id: pe-charging-01 + - id: pe-charging-01 + quantity: + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 billing: name: John Doe email: abc@example.com - phone: +91-9876522222 + phone: "+91-9876522222" fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -314,13 +328,13 @@ paths: The BAP confirms the order to charge the EV: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: confirm location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -334,41 +348,34 @@ paths: providers: id: chargezone.in items: - - id: pe-charging-01 + - id: pe-charging-01 + quantity: + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 billing: name: John Doe email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" payments: - - collected_by: BPP - params: - amount: '40' - currency: INR - status: PAID - type: PRE-ORDER - quote: - price: - value: '40' + - id: '1234' + collected_by: BPP + status: PAID + type: PRE_ORDER + params: + amount: '40' currency: INR - breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR + transaction_id: asjdhw8e238e3 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -426,16 +433,16 @@ paths: - context - message examples: - The BAP checks for the status of the charging: + The BAP sends an status to get the status of the order: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: status location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -510,13 +517,13 @@ paths: The BAP cancels the order for the EV charging: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: cancel location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -527,10 +534,10 @@ paths: timestamp: '2023-07-16T04:41:16Z' message: order: + order_id: 6743e9e2-4fb5-487c-92b7 cancellation_reason_id: '5' descriptor: short_desc: can't attend booking - order_id: 6743e9e2-4fb5-487c-92b7 responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -599,13 +606,13 @@ paths: The BAP sends an update to start charging the EV: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: update location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -617,22 +624,22 @@ paths: message: update_target: order.fulfillments[0].state order: + id: "1234" fulfillments: - id: '1' - type: CHARGING state: descriptor: - code: start-charging + code: end-charging The BAP sends an update to stop charging the EV: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: update location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -644,12 +651,13 @@ paths: message: update_target: order.fulfillments[0].state order: + id: "1234" fulfillments: - id: '1' type: CHARGING state: descriptor: - code: end-charging + code: start-charging responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -711,13 +719,13 @@ paths: The BAP rates the service provided: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: rating location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -729,7 +737,7 @@ paths: message: ratings: - id: 6743e9e2-4fb5-487c-92b7 - rating_category: charger + rating_category: CHARGING_STATION value: '5' responses: '200': @@ -791,13 +799,13 @@ paths: The BAP wants to contact support: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: support location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -808,8 +816,8 @@ paths: timestamp: '2023-07-16T04:41:16Z' message: support: - order_id: 6743e9e2-4fb5-487c-92b7 - phone: '+919876543210' + ref_id: 6743e9e2-4fb5-487c-92b7 + phone: "+919876543210" email: john.doe@gmail.com responses: '200': @@ -873,13 +881,13 @@ paths: The provider returns a list of catalogs: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_search location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -891,144 +899,153 @@ paths: message: catalog: providers: - - id: chargezone.in + - id: chargezone.in + descriptor: + name: Chargezone + short_desc: Chargezone Technologies Pvt Ltd + images: + - url: https://chargezone.in/images/logo.png + locations: + - id: '1' + gps: 12.345345,77.389754 + - id: '2' + gps: 12.247934,77.876987 + categories: + - id: '1' descriptor: - name: Chargezone - short_desc: Chargezone Technologies Pvt Ltd - images: - - url: https://chargezone.in/images/logo.png - categories: - - id: '1' - descriptor: - code: green-tariff - name: green tariff - locations: - - id: '1' - gps: 12.345345,77.389754 - - id: '2' - gps: 12.247934,77.876987 - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR / kWH - quantity: - available: - measure: - value: '100' - unit: kWH - category_ids: - - '1' - location_ids: - - '1' - - '2' - fulfillment_ids: - - '1' - - '2' - add_ons: - - id: pe-charging-01-addon-1 - descriptor: - name: Free car wash - price: - value: '0' - currency: INR - fulfillments: - - id: '1' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point Specifications - list: - - descriptor: - name: Charger type - code: charger-type - value: AC - - descriptor: - name: Connector type - code: connector-type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - - id: '2' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true - - id: log9.in + code: GREEN_TARIFF + name: green tariff + fulfillments: + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + - id: '2' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true + items: + - id: pe-charging-01 descriptor: - name: Log9 Inc - categories: - - id: '1' - descriptor: - code: green-tariff - name: green tariff - items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '10' - currency: INR / kWH - quantity: - available: '1000' - category_ids: - - '1' - fulfillment_ids: - - '3' - - '4' - add_ons: - - id: pe-charging-01-addon-1 - descriptor: - name: Free tyre pressure check - price: - value: '0' - currency: INR - fulfillments: - - id: '3' - type: BATTERY-SWAP - stops: - - location: - gps: 12.745675, 77.987393 - - id: '4' - type: MOBILE-BATTERY-SWAP - stops: - - location: - url: https://log9.in/track/bswap/3234242 + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + unit: kWH + value: '100' + category_ids: + - '1' + location_ids: + - '1' + - '2' + fulfillment_ids: + - '1' + - '2' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free car wash + price: + value: '0' + currency: INR + - id: log9.in + descriptor: + name: Log9 Inc + short_desc: "" + categories: + - id: '1' + descriptor: + code: GREEN_TARIFF + name: green tariff + fulfillments: + - id: '3' + type: BATTERY_SWAP + stops: + - location: + gps: 12.745675, 77.987393 + - id: '4' + type: MOBILE_BATTERY_SWAP + stops: + - location: + url: https://log9.in/track/bswap/3234242 + items: + - id: pe-charging-01 + descriptor: + code: FAST_CHARGING + name: fast charging + short_desc: "" + price: + value: '10' + currency: INR / kWH + quantity: + available: + measure: + unit: kWH + value: '1000' + category_ids: + - '1' + fulfillment_ids: + - '3' + - '4' + add_ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free tyre pressure check + price: + value: '0' + currency: INR + responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1096,13 +1113,13 @@ paths: The provider sends the details of the item selected, along with a quote: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_select location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -1119,81 +1136,88 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 - descriptor: - code: energy - price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - - id: pe-charging-01-addon-1 - descriptor: - code: add-on-item - name: Free car wash - price: - value: '0' - currency: INR + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: "abc" + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + - id: pe-charging-01-addon-1 + descriptor: + code: add-on-item + name: Free car wash + price: + value: '0' + currency: INR fulfillments: - - id: '1' - type: CHARGING - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point Specifications - list: - - descriptor: - name: Charger type - code: charger-type - value: AC - - descriptor: - name: Connector type - code: connector-type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + type: CHARGING + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point Specifications + list: + - descriptor: + name: Charger type + code: charger-type + value: AC + - descriptor: + name: Connector type + code: connector-type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true quote: price: value: '32' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - - item: - descriptor: - name: Free car wash - price: - value: '0' - currency: INR + - item: + id: pe-charging-01 + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: '32' + currency: INR + - item: + add-ons: + - id: pe-charging-01-addon-1 + descriptor: + name: Free car wash + title: ADD_ON + price: + value: '0' + currency: INR responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1254,9 +1278,6 @@ paths: - billing - payments - cancellation_terms - - refund_terms - - return_terms - - replacement_terms required: - order error: @@ -1267,13 +1288,13 @@ paths: The BPP intiates the order, sends the payment link: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_init location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -1290,99 +1311,110 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: order-initiated - stops: - - type: start - time: - timestamp: 01-06-2023 10:00:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: order-initiated + stops: + - type: start + time: + timestamp: 01-06-2023 10:00:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: value: '32' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - url: https://payment.gateway.in - type: PRE-ORDER - status: NOT-PAID - params: - amount: '40' + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: '32' currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - url: https://payment.gateway.in + type: PRE_ORDER + status: NOT_PAID + params: + amount: '40' + currency: INR + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: upto 2 hours before the booked slot + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1454,9 +1486,6 @@ paths: - billing - payments - cancellation_terms - - refund_terms - - return_terms - - replacement_terms - id required: - order @@ -1468,13 +1497,13 @@ paths: The BAP sends an order confirmation: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_confirm location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -1492,109 +1521,123 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: payment-completed - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - instructions: - name: Charging instructions - short_desc: To start your charging, go to charger number 987, and click on 'start' on your app - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: payment-completed + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + instructions: + name: Charging instructions + short_desc: To start your charging, go to charger number 987, and click + on 'start' on your app + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: value: '40' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: '32' currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - id: testid + type: PRE_ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: "upto 2 hours before the booked slot" + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1668,9 +1711,6 @@ paths: - billing - payments - cancellation_terms - - refund_terms - - return_terms - - replacement_terms - id - cancellation required: @@ -1683,13 +1723,13 @@ paths: The provider cancels the order after the BAP requested for a cancellation: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_cancel location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -1708,106 +1748,120 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: order-cancelled - stops: - - time: - range: - start: '10:00' - end: '10:30' - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: order-cancelled + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: - value: '-32' + value: "-32" currency: INR breakup: - - item: - descriptor: - name: payment refund - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '-32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: "-32" currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - id: testid + type: PRE_ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: upto 2 hours before the booked slot + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider cancels the order after the there was an error in the charger: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_cancel location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -1826,100 +1880,114 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + allocated: + measure: + value: '2' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - allocated: - measure: - value: '2' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charger-error - stops: - - time: - range: - start: '10:00' - end: '10:30' - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: charger-error + stops: + - time: + range: + start: '10:00' + end: '10:30' + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: - value: '-12' + value: "-12" currency: INR breakup: - - item: - descriptor: - name: payment refund - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '-12' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: payment refund + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: "-12" currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - id: testid + type: PRE_ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: upto 2 hours before the booked slot + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -1993,9 +2061,6 @@ paths: - billing - payments - cancellation_terms - - refund_terms - - return_terms - - replacement_terms - id required: - order @@ -2007,13 +2072,13 @@ paths: The provider sends an updated object to start charging: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_update location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -2031,116 +2096,130 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charging-started - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: charging-started + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: value: '40' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: '32' currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - id: testid + type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: upto 2 hours before the booked slot + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html + The provider sends an updated object to stop charging: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_update location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -2158,106 +2237,113 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: energy + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - code: charging-ended - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + code: charging-ended + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: value: '40' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + price: + value: '32' currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2331,9 +2417,6 @@ paths: - billing - payments - cancellation_terms - - refund_terms - - return_terms - - replacement_terms - id required: - order @@ -2345,13 +2428,13 @@ paths: The provider sends status of the charging: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_status location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -2369,106 +2452,119 @@ paths: name: Chargezone short_desc: Chargezone Technologies Pvt Ltd images: - - url: https://chargezone.in/images/logo.png + - url: https://chargezone.in/images/logo.png items: - - id: pe-charging-01 + - id: pe-charging-01 + descriptor: + code: STANDARD_CHARGING + name: abc + short_desc: "" + price: + value: '8' + currency: INR/kWH + quantity: + available: + measure: + value: '100' + unit: kWh + selected: + measure: + value: '4' + unit: kWh + add_ons: + - id: pe-charging-01-addon-1 descriptor: - code: energy + code: add-on-item + name: Free car wash price: - value: '8' - currency: INR/kWH - quantity: - available: - measure: - value: '100' - unit: kWh - selected: - measure: - value: '4' - unit: kWh - fulfillments: - - '1' + value: '0' + currency: INR fulfillments: - - id: '1' - customer: - person: - name: John Doe - contact: - phone: +91-9887766554 - type: CHARGING - state: - descriptor: - name: vehicle 65% charged - stops: - - type: start - location: - gps: 12.423423,77.325647 - time: - timestamp: 01-06-2023 10:00:00 - range: - start: 01-06-2023 10:00:00 - end: 01-06-2023 10:10:00 - - type: end - time: - timestamp: 01-06-2023 10:30:00 - range: - start: 01-06-2023 10:30:00 - end: 01-06-2023 10:40:00 - tags: - - descriptor: - name: Charging Point - list: - - descriptor: - name: Charger type - value: AC - - descriptor: - name: Connector type - value: CCS2 - - descriptor: - name: Power Rating - value: greater than 50kW - - descriptor: - name: Availability - value: Available - display: true + - id: '1' + customer: + person: + name: John Doe + contact: + phone: "+91-9887766554" + type: CHARGING + state: + descriptor: + name: vehicle 65% charged + stops: + - type: start + location: + gps: 12.423423,77.325647 + time: + timestamp: 01-06-2023 10:00:00 + range: + start: 01-06-2023 10:00:00 + end: 01-06-2023 10:10:00 + - type: end + time: + timestamp: 01-06-2023 10:30:00 + range: + start: 01-06-2023 10:30:00 + end: 01-06-2023 10:40:00 + tags: + - descriptor: + name: Charging Point + list: + - descriptor: + name: Charger type + value: AC + - descriptor: + name: Connector type + value: CCS2 + - descriptor: + name: Power Rating + value: greater than 50kW + - descriptor: + name: Availability + value: Available + display: true billing: email: abc@example.com - number: +91-9876522222 + number: "+91-9876522222" quote: price: value: '32' currency: INR breakup: - - item: - descriptor: - name: Estimated units consumed - quantity: - selected: - measure: - value: '4' - unit: kWh - price: - value: '32' - currency: INR - payments: - - type: PRE-ORDER - status: PAID - params: - amount: '40' + - item: + descriptor: + name: Estimated units consumed + quantity: + selected: + measure: + value: '4' + unit: kWh + title: ENERGY + price: + value: '32' currency: INR - time: - range: - start: '2023-08-10T10:00:00Z' - end: '2023-08-10T10:30:00Z' + payments: + - id: testid + type: PRE-ORDER + status: PAID + params: + amount: '40' + currency: INR + transaction_id: asjdhw8e238e3 + time: + range: + start: '2023-08-10T10:00:00Z' + end: '2023-08-10T10:30:00Z' cancellation_terms: - - fulfillment_state: - descriptor: - code: charging-start - cancellation_fee: - percentage: 30% - external_ref: - mimetype: text/html - url: https://chargezone.in/charge/tnc.html + - fulfillment_state: + descriptor: + code: charging-start + cancel_by: + label: upto 2 hours before the booked slot + cancellation_fee: + percentage: 30% + external_ref: + mimetype: text/html + url: https://chargezone.in/charge/tnc.html responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2531,13 +2627,13 @@ paths: The provider responds with a form URL for rating: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_rating location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -2548,10 +2644,9 @@ paths: timestamp: '2023-07-16T04:41:16Z' message: feedback_form: - xinput: - form: - url: https://api.example-bpp.com/pilot/bpp/feedback/portal - required: 'false' + form: + url: https://api.example-bpp.com/pilot/bpp/feedback/portal + required: 'false' responses: '200': description: Acknowledgement of message received after successful validation of schema and signature @@ -2619,13 +2714,13 @@ paths: The provider returns support details: value: context: - domain: dent:0.1.0 + domain: uei:evcharging action: on_support location: country: - name: India code: IND - city: std:080 + city: + code: std:080 version: 1.1.0 bap_id: example-bap.com bap_uri: https://api.example-bap.com/pilot/bap/energy/v1 @@ -2636,7 +2731,7 @@ paths: timestamp: '2023-07-16T04:41:16Z' message: support: - order_id: 6743e9e2-4fb5-487c-92b7 + ref_id: 6743e9e2-4fb5-487c-92b7 phone: 1800 1080 email: customer.care@chargezone.com url: https://www.chargezone.com/helpdesk @@ -2879,9 +2974,7 @@ components: - $ref: '#/components/schemas/Descriptor' required: - name - - images - short_desc - - long_desc required: - id - descriptor @@ -2928,6 +3021,7 @@ components: - STANDARD_CHARGING - FAST_CHARGING - ULTRA_FAST_CHARGING + - GREEN_TARIFF time: $ref: '#/components/schemas/Time' ttl: @@ -3193,6 +3287,7 @@ components: - CHARGING - BATTERY_SWAP - AUTOMATIC_DISPATCH + - MOBILE_BATTERY_SWAP rateable: description: Whether the fulfillment can be rated or not type: boolean @@ -3414,6 +3509,7 @@ components: - STANDARD_CHARGING - FAST_CHARGING - ULTRA_FAST_CHARGING + - GREEN_TARIFF creator: description: The creator of this item allOf: