diff --git a/DEG2.0/examples/Demand-Flexibility/confirm/on_confirm-request.json b/DEG2.0/examples/Demand-Flexibility/confirm/on_confirm-request.json index 69f9b1f..eaa357a 100644 --- a/DEG2.0/examples/Demand-Flexibility/confirm/on_confirm-request.json +++ b/DEG2.0/examples/Demand-Flexibility/confirm/on_confirm-request.json @@ -40,44 +40,11 @@ "descriptor": { "name": "Evening Peak Saver Manual Opt-in", "short_desc": "$0.20/kWh for 5-8 PM reductions (manual acceptance)", - "long_desc": "Users will receive app notifications during grid peak hours (5–8 PM). Upon manual acceptance, they can reduce usage and earn $0.20 for every kWh saved during the window.", + "long_desc": "Users will receive app notifications during grid peak hours (5-8 PM). Upon manual acceptance, they can reduce usage and earn $0.20 for every kWh saved during the window.", "additional_desc": { "url": "https://sfeu.org/flexibility/peak-saver" } - }, - "tags": [ - { - "descriptor": { - "code": "Flexibility_Event_Details" - }, - "list": [ - { - "descriptor": { - "code": "Window" - }, - "value": "5:00 PM to 8:00 PM daily during alerts" - }, - { - "descriptor": { - "code": "Reward" - }, - "value": "$0.20 per reduced kWh" - }, - { - "descriptor": { - "code": "Enrollment_Required" - }, - "value": "Yes" - }, - { - "descriptor": { - "code": "Acceptance_Mode" - }, - "value": "Manual (via app notification)" - } - ] - } - ] + } } ], "fulfillments": [ diff --git a/DEG2.0/examples/Demand-Flexibility/support/support-request.json b/DEG2.0/examples/Demand-Flexibility/support/support-request.json index c23c244..847e3f2 100644 --- a/DEG2.0/examples/Demand-Flexibility/support/support-request.json +++ b/DEG2.0/examples/Demand-Flexibility/support/support-request.json @@ -1,22 +1,25 @@ { - "context": { - "domain": "flexibility", - "action": "support", - "location": { - "country": { "code": "USA" }, - "city": { "code": "NANP:628" } + "context": { + "domain": "flexibility", + "action": "support", + "location": { + "country": { + "code": "USA" }, - "version": "1.1.0", - "bap_id": "energy-bap-network.example.com", - "bap_uri": "https://energy-bap-network.example.com", - "bpp_id": "energy-incentive-bpp.example.com", - "bpp_uri": "https://energy-incentive-bpp.example.com", - "transaction_id": "incentive-txn-1001", - "message_id": "incentive-msg-2009", - "timestamp": "2025-05-07T10:54:00Z" + "city": { + "code": "NANP:628" + } }, - "message": { - "ref_id": "order-flex-001" - } + "version": "1.1.0", + "bap_id": "energy-bap-network.example.com", + "bap_uri": "https://energy-bap-network.example.com", + "bpp_id": "energy-incentive-bpp.example.com", + "bpp_uri": "https://energy-incentive-bpp.example.com", + "transaction_id": "incentive-txn-1001", + "message_id": "incentive-msg-2009", + "timestamp": "2025-05-07T10:54:00Z" + }, + "message": { + "ref_id": "order-flex-001" } - +} \ No newline at end of file diff --git a/DEG2.0/examples/services/verification/confirm/on_confirm.json b/DEG2.0/examples/services/verification/confirm/on_confirm.json index af52aaf..fd14653 100644 --- a/DEG2.0/examples/services/verification/confirm/on_confirm.json +++ b/DEG2.0/examples/services/verification/confirm/on_confirm.json @@ -26,7 +26,13 @@ "id": "sf_solar_verification_unit", "descriptor": { "name": "sf_solar_verification_unit", - "short_desc": "third_party_service_for_verifying_installed_solar_systems" + "short_desc": "third_party_service_for_verifying_installed_solar_systems", + "long_desc": "independent_organization_providing_ground_level_and_remote_verification_of_residential_and_commercial_solar_panel_installations_for_subsidies_and_grid_compliance", + "images": [ + { + "url": "https://sfsolarverify.org/logo.png" + } + ] } }, "items": [ diff --git a/DEG2.0/examples/services/verification/init/on_init.json b/DEG2.0/examples/services/verification/init/on_init.json index 89a68d0..da96937 100644 --- a/DEG2.0/examples/services/verification/init/on_init.json +++ b/DEG2.0/examples/services/verification/init/on_init.json @@ -25,7 +25,13 @@ "id": "sf_solar_verification_unit", "descriptor": { "name": "sf_solar_verification_unit", - "short_desc": "third_party_service_for_verifying_installed_solar_systems" + "short_desc": "third_party_service_for_verifying_installed_solar_systems", + "long_desc": "independent_organization_providing_ground_level_and_remote_verification_of_residential_and_commercial_solar_panel_installations_for_subsidies_and_grid_compliance", + "images": [ + { + "url": "https://sfsolarverify.org/logo.png" + } + ] } }, "items": [ diff --git a/DEG2.0/examples/services/verification/select/on_select.json b/DEG2.0/examples/services/verification/select/on_select.json index 9ddfdb6..0794cff 100644 --- a/DEG2.0/examples/services/verification/select/on_select.json +++ b/DEG2.0/examples/services/verification/select/on_select.json @@ -25,7 +25,13 @@ "id": "sf_solar_verification_unit", "descriptor": { "name": "sf_solar_verification_unit", - "short_desc": "third_party_service_for_verifying_installed_solar_systems" + "short_desc": "third_party_service_for_verifying_installed_solar_systems", + "long_desc": "independent_organization_providing_ground_level_and_remote_verification_of_residential_and_commercial_solar_panel_installations_for_subsidies_and_grid_compliance", + "images": [ + { + "url": "https://sfsolarverify.org/logo.png" + } + ] } }, "items": [ diff --git a/DEG2.0/implementation-guides/Retail/Solar-Panel/implementation_guide_solar_panel.md b/DEG2.0/implementation-guides/Retail/Solar-Panel/implementation_guide_solar_panel.md index 28e3370..3503b22 100644 --- a/DEG2.0/implementation-guides/Retail/Solar-Panel/implementation_guide_solar_panel.md +++ b/DEG2.0/implementation-guides/Retail/Solar-Panel/implementation_guide_solar_panel.md @@ -1808,15 +1808,19 @@ Search request can contain one or more search criterion within it. Use the follo Property Name|Enums| |-------------|-----| -|Panel Categories|mono_panels
poly_panels
flex_panels
Solar_installation_service| +|Panel Categories|MONO_PANELS
POLY_PANELS
FLEX_PANELS
SOLAR_INSTALLATION_SERVICE| |Fulfillment Types|HOME_DELIVERY
STORE_PICKUP
SITE_VISIT| |Payment Types|ON-FULFILLMENT| |Payment Collected By|BPP| |Payment Status|NOT-PAID| -|Panel Specification Types|Type
Wattage
Efficiency
Warranty
IP_Rating
Weight
Use_Case| +|Panel Specification Types|TYPE
WATTAGE
EFFICIENCY
WARRANTY
IP_RATING
WEIGHT
USE_CASE| |Certification Types|SEC
PMSC| -|Installation Specification Types|installation_type
supported_panel_types
system_capacity_limit
included_services
installation_duration| -|Installer Qualification Types|empaneled_with_nodal_agency
safety_certified| +|Installation Specification Types|INSTALLATION_TYPE
SUPPORTED_PANEL_TYPES
SYSTEM_CAPACITY_LIMIT
INCLUDED_SERVICES
INSTALLATION_DURATION| +|Installer Qualification Types|EMPANELED_WITH_NODAL_AGENCY
SAFETY_CERTIFIED| +|payment type| PRE_ORDER
POST_ORDER
PRE_FULFILLMENT
POST_FULFILLMENT| +|payment status| PAID
NOT_PAID
FAILED
PROCESSING +|payment collected by| BAP
BPP
AGENT +|fulfillment stop types| START
END ## Notes on Software Integration diff --git a/DEG2.0/specifications/Demand-Flexibility.yaml b/DEG2.0/specifications/Demand-Flexibility.yaml new file mode 100644 index 0000000..833ecbe --- /dev/null +++ b/DEG2.0/specifications/Demand-Flexibility.yaml @@ -0,0 +1,2280 @@ +openapi: 3.1.0 +info: + title: Beckn Protocol Specification modeled for Demand Flexibility use case. + description: Beckn Protocol Specification modeled for Demand Flexibility use case. + version: 1.1.1 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: | + BAP declares the customer's intent to buy/avail products or services + - To perform a keyword based search, use intent.descriptor.name + - To perform a provider based search, use intent.provider.descriptor.name + 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: + Search by keywords: + value: + context: + domain: flexibility + action: search + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2000 + timestamp: '2025-05-07T10:44:00Z' + message: + intent: + descriptor: + name: Energy Incentives + Search by provider: + value: + context: + domain: deg:schemes + action: search + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: "" + bap_uri: "" + bpp_id: "" + bpp_uri: "" + transaction_id: bfef2046-c8c9-475d-b3b6-afe6f277377e + message_id: e0946bac-42b3-4b05-b679-65d6d747809d + timestamp: '1747821566' + message: + intent: + provider: + descriptor: + name: GridSmart Energy Solutions + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /confirm: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Confirm an order by providing billing and/or shipping details + - fulfillments.stops.location.address, i.e "der://ssf.meter/98765456" represents a meter. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Confirm subscription to a DFP: + value: + context: + domain: flexibility + action: confirm + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2004 + timestamp: '2025-05-07T10:48:00Z' + message: + order: + provider: + id: provider_demand_flex_001 + items: + - id: manual_optin_demand_flex + fulfillments: + - customer: + person: + name: Alex Morgan + contact: + phone: "+14155552626" + email: alex.morgan@example.com + stops: + - type: end + location: + address: der://ssf.meter/98765456 + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Fetch the latest order object + - Send the id of the order for which to check the status in the message.order_id + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + required: + - context + - message + examples: + Request to check the status of a subscription: + value: + context: + domain: flexibility + action: status + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2005 + timestamp: '2025-05-07T10:50:00Z' + message: + order_id: order-flex-001 + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /cancel: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Cancel an order + - Send the id of the order which needs to be cancelled inside message.order_id + - A list of cancellation_reason_ids can be fetched from the BPP by calling the BPP's /get_cancellation_reasons API + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - cancel + required: + - action + 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: + Cancel a DFP subscription: + value: + context: + domain: flexibility + action: cancel + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2006 + timestamp: '2025-05-07T10:51:00Z' + message: + order_id: order-flex-001 + cancellation_reason_id: cancel/id/1234 + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: BPP sends its 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: + - action + message: + type: object + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + catalog from BPP: + value: + context: + domain: flexibility + action: on_search + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2001 + timestamp: '2025-05-07T10:45:00Z' + message: + catalog: + descriptor: + name: Energy Incentives and Subsidies + providers: + - id: provider_demand_flex_001 + descriptor: + name: SF Grid LoadFlex + short_desc: San Francisco Demand Flexibility Programs + images: + - url: https://sfeu.org/assets/loadflex_logo.png + locations: + - id: '1' + city: + name: San Francisco + fulfillments: + - id: manual_optin + type: DIGITAL + tags: + - descriptor: + code: participation_mode + list: + - descriptor: + code: acceptance_type + value: MANUAL_OPTIN + categories: + - id: flex_manual + descriptor: + code: MANUAL_FLEX + name: Manual Demand Response + - id: flex_auto + descriptor: + code: AUTO_FLEX + name: Automated Load Management + items: + - id: manual_optin_demand_flex + descriptor: + name: Evening Peak Saver Manual Opt-in + short_desc: "$0.20/kWh for 5-8 PM reductions (manual acceptance)" + long_desc: Users will receive app notifications during grid peak hours (5–8 + PM). Upon manual acceptance, they can reduce usage and earn $0.20 for + every kWh saved during the window. + additional_desc: + url: https://sfeu.org/flexibility/peak-saver + location_ids: + - '1' + category_ids: + - flex_manual + fulfillment_ids: + - manual_optin + tags: + - descriptor: + code: Flexibility_Event_Details + list: + - descriptor: + code: Window + value: 5:00 PM to 8:00 PM daily during alerts + - descriptor: + code: Reward + value: "$0.20 per reduced kWh" + - descriptor: + code: Enrollment_Required + value: 'Yes' + - descriptor: + code: Acceptance_Mode + value: Manual (via app notification) + - id: provider_flex_aggregator_001 + descriptor: + name: FlexiGrid Aggregator + short_desc: Third-party aggregator for flexible load management + images: + - url: https://flexigrid.com/assets/logo.png + locations: + - id: '1' + city: + name: San Francisco + fulfillments: + - id: automated_control + type: DIGITAL + tags: + - descriptor: + code: participation_mode + list: + - descriptor: + code: acceptance_type + value: Automated via Device API + categories: + - id: flex_manual + descriptor: + code: MANUAL_FLEX + name: Manual Demand Response + - id: flex_auto + descriptor: + code: AUTO_FLEX + name: Automated Load Management + items: + - id: aggregator_optin_flex + descriptor: + name: Smart Appliance Flex Program + short_desc: "$0.15/kWh reduction via smart device control" + long_desc: FlexiGrid can adjust your smart appliances like thermostats or + EV chargers during grid alerts. You’ll earn $0.15 for each kWh avoided. + additional_desc: + url: https://flexigrid.com/programs/smart-load + location_ids: + - '1' + category_ids: + - flex_auto + fulfillment_ids: + - automated_control + tags: + - descriptor: + code: Flexibility_Event_Details + list: + - descriptor: + code: Appliance_Control_Mode + value: Automated (via device integration) + - descriptor: + code: Reward + value: "$0.15 per reduced kWh" + - descriptor: + code: Compatible_Devices + value: Nest, Tesla Wall Connector, Ecobee + - descriptor: + code: Enrollment_Required + value: Yes, with device linking + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send active order object + - BPP must generate and send an order.id which is used to uniquely identify the order. + - BPP must also send the state of the fulfillment as part of fulfillments.state.descriptor.code + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + DFP subscription confirmation response: + value: + context: + domain: flexibility + action: on_confirm + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2004 + timestamp: '2025-05-07T10:48:00Z' + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: order-flex-001 + provider: + id: provider_demand_flex_001 + descriptor: + name: SF Grid LoadFlex + short_desc: San Francisco Demand Flexibility Programs + images: + - url: https://sfeu.org/assets/loadflex_logo.png + items: + - id: manual_optin_demand_flex + descriptor: + name: Evening Peak Saver Manual Opt-in + short_desc: "$0.20/kWh for 5-8 PM reductions (manual acceptance)" + long_desc: Users will receive app notifications during grid peak hours (5–8 + PM). Upon manual acceptance, they can reduce usage and earn $0.20 for every + kWh saved during the window. + additional_desc: + url: https://sfeu.org/flexibility/peak-saver + tags: + - descriptor: + code: Flexibility_Event_Details + list: + - descriptor: + code: Window + value: 5:00 PM to 8:00 PM daily during alerts + - descriptor: + code: Reward + value: "$0.20 per reduced kWh" + - descriptor: + code: Enrollment_Required + value: 'Yes' + - descriptor: + code: Acceptance_Mode + value: Manual (via app notification) + fulfillments: + - customer: + person: + name: Alex Morgan + contact: + phone: "+14155552626" + email: alex.morgan@example.com + stops: + - type: end + location: + address: der://ssf.meter/98765456 + state: + descriptor: + code: APPLICATION_SUBMITTED + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /on_cancel: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object + - The fulfillment.state.descriptor.code must be set to reflect the cancelled state of the fulfillment. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_cancel + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + Response for a cancellation request to a DFP: + value: + context: + domain: flexibility + action: on_cancel + location: + country: + code: USA + city: + code: NANP:628 + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2006 + timestamp: '2025-05-07T10:51:00Z' + message: + order: + id: order-flex-001 + provider: + id: provider_demand_flex_001 + descriptor: + name: SF Grid LoadFlex + short_desc: San Francisco Demand Flexibility Programs + images: + - url: https://sfeu.org/assets/loadflex_logo.png + items: + - id: manual_optin_demand_flex + descriptor: + name: Evening Peak Saver Manual Opt-in + short_desc: "$0.20/kWh for 5-8 PM reductions (manual acceptance)" + long_desc: Users will receive app notifications during grid peak hours (5–8 + PM). Upon manual acceptance, they can reduce usage and earn $0.20 for every + kWh saved during the window. + additional_desc: + url: https://sfeu.org/flexibility/peak-saver + tags: + - descriptor: + code: Flexibility_Event_Details + list: + - descriptor: + code: Window + value: 5:00 PM to 8:00 PM daily during alerts + - descriptor: + code: Reward + value: "$0.20 per reduced kWh" + - descriptor: + code: Enrollment_Required + value: 'Yes' + - descriptor: + code: Acceptance_Mode + value: Manual (via app notification) + fulfillments: + - customer: + person: + name: Alex Morgan + contact: + phone: "+14155552626" + email: alex.morgan@example.com + stops: + - type: end + location: + address: der://ssf.meter/98765456 + state: + descriptor: + code: APPLICATION_CANCELLED + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /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: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + Response for a DFP subscription status check: + value: + context: + domain: flexibility + action: on_status + version: 1.1.0 + bap_id: energy-bap-network.example.com + bap_uri: https://energy-bap-network.example.com + bpp_id: energy-incentive-bpp.example.com + bpp_uri: https://energy-incentive-bpp.example.com + transaction_id: incentive-txn-1001 + message_id: incentive-msg-2005 + timestamp: '2025-05-07T10:50:00Z' + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: order-flex-001 + provider: + id: provider_demand_flex_001 + descriptor: + name: SF Grid LoadFlex + short_desc: San Francisco Demand Flexibility Programs + images: + - url: https://sfeu.org/assets/loadflex_logo.png + items: + - id: manual_optin_demand_flex + descriptor: + name: Evening Peak Saver Manual Opt-in + short_desc: "$0.20/kWh for 5-8 PM reductions (manual acceptance)" + long_desc: Users will receive app notifications during grid peak hours (5–8 + PM). Upon manual acceptance, they can reduce usage and earn $0.20 for every + kWh saved during the window. + additional_desc: + url: https://sfeu.org/flexibility/peak-saver + tags: + - descriptor: + code: Flexibility_Event_Details + list: + - descriptor: + code: Window + value: 5:00 PM to 8:00 PM daily during alerts + - descriptor: + code: Reward + value: "$0.20 per reduced kWh" + - descriptor: + code: Enrollment_Required + value: 'Yes' + - descriptor: + code: Acceptance_Mode + value: Manual (via app notification) + fulfillments: + - customer: + person: + name: Alex Morgan + contact: + phone: "+14155552626" + email: alex.morgan@example.com + stops: + - type: end + location: + address: der://ssf.meter/98765456 + state: + descriptor: + code: APPLICATION_SUCCESSFUL + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + +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: + Response: + description: Acknowledgement of message received after successful validation of schema and signature + 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 + 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 + 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.' + 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 + 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: + $ref: '#/components/schemas/Descriptor' + 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' + 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: + - DRAFT + - DEFAULT + 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.' + 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 + 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: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + 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 \ No newline at end of file diff --git a/DEG2.0/specifications/Solar-Panel-Installation-Services.yaml b/DEG2.0/specifications/Solar-Panel-Installation-Services.yaml new file mode 100644 index 0000000..70482b8 --- /dev/null +++ b/DEG2.0/specifications/Solar-Panel-Installation-Services.yaml @@ -0,0 +1,2929 @@ +openapi: 3.1.0 +info: + title: Beckn Protocol Specification modeled for Solar Panel Installation Services use case. + description: Beckn Protocol Specification modeled for Solar Panel Installation Services use case. + version: 1.1.1 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: | + BAP declares the customer's intent to buy/avail products or services + - BAP can use descriptor.name to do a keyword based search. + - provider.descriptor.name can be used to filter based on providers. + - category.descriptor.code can be used to filter based on the service category + 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: + Search intent example: + value: + context: + domain: service + action: search + 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:00Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + intent: + descriptor: + name: Solar Installation Request + provider: + descriptor: + name: SunPower Installers + category: + descriptor: + code: solar_panel_installation + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + - Consumer selects the service provider(provider ID), item ID(service) and the fulfillment ID. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Select a solar installation service: + value: + context: + domain: service + action: select + 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: certification-msg-10002 + timestamp: '2023-07-16T04:41:20Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpower_sf + items: + - id: sp-resi-001 + fulfillments: + - id: '1' + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Initialize an order by providing billing and/or shipping details + - Consumer provides their billing and fulfillment details. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Initialize a solar installation service order: + value: + context: + domain: service + action: init + 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: certification-msg-10004 + timestamp: '2023-07-16T04:41:30Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpower_sf + items: + - id: sp-resi-001 + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + responses: + default: + 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: | + Initialize an order by providing billing and/or shipping details + - Consumer reviews and accepts the payment terms. + - Id there is a payment required before confirming the order, consumer completes the payment of the network before sending a confirm request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Confirm a solar panel service order: + value: + context: + domain: service + action: confirm + 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: certification-msg-10006 + timestamp: '2023-07-16T04:41:40Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpower_sf + items: + - id: sp-resi-001 + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Fetch the latest order object + - Consumer sends the order_id to check the status. + - Consumer must have received the order ID as part of the on_confirm callback. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + required: + - context + - message + examples: + Request to check the status of a solar panel installation service: + value: + context: + domain: service + action: status + 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: certification-msg-10008 + timestamp: '2023-07-16T04:41:50Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order_id: sunpower-install-order-001 + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: | + BPP sends its catalog in response to a search request. + - Response contains a catalog from a BPP. + - The catalog contains solar panel installation services from multiple providers(service providers). + - Each provider can have multiple items(solar panel installation services) + - Items.tags contains the metadata associated with the service. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + catalog from BPP: + value: + context: + domain: service + action: on_search + location: + country: + code: USA + city: + code: NANP:628 + 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://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-07-16T04:41:16Z' + message: + catalog: + providers: + - id: sunpower_sf + descriptor: + code: SunPower_Installers + short_desc: Residential and commercial solar panel installation + long_desc: Leading provider of rooftop and industrial solar panel setup services + in San Francisco. + images: + - url: https://sunpower.com/logo.png + - url: https://sunpower.com/gallery.jpg + tags: + - descriptor: + code: provider-details + list: + - descriptor: + code: govt_subsidy_empaneled + value: 'true' + rating: 4.6/5 + categories: + - id: '1' + descriptor: + code: solar_panel_installation + name: Solar Panel Installation + locations: + - id: '1' + city: + name: San Francisco + fulfillments: + - id: '1' + type: ONSITE + items: + - id: sp-resi-001 + descriptor: + code: 2kW_Rooftop_Solar_Setup + price: + estimated_value: '85000' + currency: USD + category_ids: + - '1' + location_ids: + - '1' + fulfillment_ids: + - '1' + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + - descriptor: + code: documentation + display: true + list: + - descriptor: + code: required_docs + value: ID proof, Ownership certificate, Electricity bill, Net metering + form, Wiring diagram + - id: sp-comm-002 + descriptor: + code: 5kW_Industrial_Solar_Installation + price: + estimated_value: '130000' + currency: USD + category_ids: + - '1' + location_ids: + - '1' + fulfillment_ids: + - '1' + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 5KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Commercial + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + - id: evgrid_connect + descriptor: + code: EVGrid_Connect + short_desc: End-to-end EV charging station setup services + long_desc: Expert service provider for residential and commercial EV charger + installation and maintenance in the Bay Area. + images: + - url: https://evgridconnect.com/logo.png + rating: 4.7/5 + categories: + - id: '1' + descriptor: + code: solar_panel + name: Solar Panel + locations: + - id: '1' + city: + name: San Francisco + fulfillments: + - id: '1' + type: ONSITE + items: + - id: ev-home-001 + descriptor: + code: Residential_EV_Charger_Installation + price: + estimated_value: '15000' + currency: USD + category_ids: + - '1' + location_ids: + - '1' + fulfillment_ids: + - '1' + tags: + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: certified + value: 'true' + - id: ev-pub-002 + descriptor: + code: Commercial_EV_Charging_Station_Setup + price: + estimated_value: '45000' + currency: USD + category_ids: + - '1' + location_ids: + - '1' + fulfillment_ids: + - '1' + tags: + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Commercial + - descriptor: + code: installer_details + list: + - descriptor: + code: certified + value: 'true' + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send draft order object with quoted price for selected items + - The response must contain a quotation for the service inside "quote" object. + - quotation can be an estimate value or an actual value. + 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 + examples: + On_Select response of the selected solar installation service: + value: + context: + domain: service + action: on_select + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10003 + timestamp: '2023-07-16T04:41:25Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpower_sf + descriptor: + code: SunPower_Installers + short_desc: Residential and commercial solar panel installation + long_desc: Leading provider of rooftop and industrial solar panel setup services + in San Francisco. + images: + - url: https://sunpower.com/logo.png + - url: https://sunpower.com/gallery.jpg + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + - descriptor: + code: documentation + display: true + list: + - descriptor: + code: required_docs + value: ID proof, Ownership certificate, Electricity bill, Net metering form, + Wiring diagram + fulfillments: + - id: '1' + type: ONSITE + tracking: true + rateable: true + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + on_init examples of a solar installation service order: + value: + context: + domain: service + action: on_init + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10005 + timestamp: '2023-07-16T04:41:35Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpower_sf + descriptor: + code: SunPower_Installers + short_desc: Residential and commercial solar panel installation + long_desc: Leading provider of rooftop and industrial solar panel setup services + in San Francisco. + images: + - url: https://sunpower.com/logo.png + - url: https://sunpower.com/gallery.jpg + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + - descriptor: + code: documentation + display: true + list: + - descriptor: + code: required_docs + value: ID proof, Ownership certificate, Electricity bill, Net metering form, + Wiring diagram + xinput: + required: false + head: + descriptor: + name: Details Form + index: + min: 0 + cur: 0 + max: 1 + headings: + - Customer Details + - Technical Details + form: + mime_type: text/html + url: https://6vs8xnx5i7.scheme-finder.co.in/schems/xinput/formid/a23f2fdfbbb8ac402bfd54f + resubmit: false + auth: + descriptor: + code: jwt + value: eyJhbGciOiJIUzI.eyJzdWIiOiIxMjM0NTY3O.SflKxwRJSMeKKF2QT4 + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + tracking: true + state: + descriptor: + code: Scheduled + name: Installation Scheduled + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + contact: + phone: "+18005559999" + email: install@sunpower.com + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send active order object + - BPP must generate and send an order.id which is used to uniquely identify the order. + - BPP must also send the state of the fulfillment as part of fulfillments.state.descriptor.code + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + Confirmation of a solar panel installation service order: + value: + context: + domain: service + action: on_confirm + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10007 + timestamp: '2023-07-16T04:41:45Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: sunpower-install-order-001 + provider: + id: sunpower_sf + descriptor: + code: SunPower_Installers + short_desc: Residential and commercial solar panel installation + long_desc: Leading provider of rooftop and industrial solar panel setup services + in San Francisco. + images: + - url: https://sunpower.com/logo.png + - url: https://sunpower.com/gallery.jpg + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + tracking: true + state: + descriptor: + code: Scheduled + name: Installation Visit Scheduled + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + contact: + phone: "+18005559999" + email: install@sunpower.com + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /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: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + on_status example response 1: + value: + context: + domain: service + action: on_confirm + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10007 + timestamp: '2023-07-16T04:41:45Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: sunpower-install-order-001 + provider: + id: sunpower_sf + descriptor: + code: SunPower_Installers + short_desc: Residential and commercial solar panel installation + long_desc: Leading provider of rooftop and industrial solar panel setup services + in San Francisco. + images: + - url: https://sunpower.com/logo.png + - url: https://sunpower.com/gallery.jpg + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + tracking: true + state: + descriptor: + code: Scheduled + name: Installation Visit Scheduled + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + contact: + phone: "+18005559999" + email: install@sunpower.com + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + on_status example response 2: + value: + context: + domain: service + action: on_status + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10009 + timestamp: '2023-07-16T04:41:55Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: sunpower-install-order-001 + provider: + id: sunpower_sf + descriptor: + name: SunPower Installers + short_desc: Residential and commercial solar panel installation + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + tracking: true + state: + descriptor: + code: Approved + name: Approved + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + agent: + person: + name: David C + contact: + phone: "+1423452345" + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + contact: + phone: "+18005559999" + email: install@sunpower.com + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + on_status example response 3: + value: + context: + domain: service + action: on_status + version: 1.1.0 + bap_id: example-bap.com + bpp_id: example-bpp.com + bpp_uri: https://example-bpp.com + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + message_id: certification-msg-10009 + timestamp: '2023-07-16T04:41:55Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: sunpower-install-order-001 + provider: + id: sunpower_sf + descriptor: + name: SunPower Installers + short_desc: Residential and commercial solar panel installation + items: + - id: sp-resi-001 + descriptor: + name: 2kW Rooftop Solar Setup + price: + estimated_value: '85000' + currency: USD + tags: + - descriptor: + code: system_specification + list: + - descriptor: + code: system_capacity + value: 2KW + - descriptor: + code: installation_context + list: + - descriptor: + code: property_type + value: Residential + - descriptor: + code: installer_details + list: + - descriptor: + code: empaneled + value: 'true' + - descriptor: + code: system_capacity_kw + value: '3.0' + - descriptor: + code: panel_type + value: Mono PERC + - descriptor: + code: number_of_panels + value: '6' + - descriptor: + code: inverter_type + value: Hybrid + - descriptor: + code: mounting_type + value: Rooftop – Fixed Tilt + - descriptor: + code: installation_date + value: '2025-05-10' + - descriptor: + code: commissioning_status + value: Completed + - descriptor: + code: net_metering_enabled + value: 'Yes' + - descriptor: + code: installation_certificate_id + value: CERT-SP-20250510-00123 + - descriptor: + code: installer_empaneled + value: 'Yes' + - descriptor: + code: financial_details + list: + - descriptor: + code: financial_assistance + value: 'true' + billing: + name: Emily Tran + email: emily.tran@example.com + phone: "+14155556666" + address: 456 Glenview St, San Francisco, CA + fulfillments: + - id: '1' + type: ONSITE + tracking: true + state: + descriptor: + code: Installed + name: Installed + customer: + person: + name: Emily Tran + contact: + phone: "+14155556666" + email: emily.tran@example.com + agent: + person: + name: David C + contact: + phone: "+1423452345" + stops: + - type: end + location: + address: 456 Glenview St, San Francisco, CA + contact: + phone: "+18005559999" + email: install@sunpower.com + quote: + price: + value: '85000' + currency: USD + breakup: + - title: Installation Charge + price: + value: '85000' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + +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: + Response: + description: Acknowledgement of message received after successful validation of schema and signature + 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 + 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 + 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.' + 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 + 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: + $ref: '#/components/schemas/Descriptor' + 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' + 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: + - DRAFT + - DEFAULT + 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.' + 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 + 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: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + 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 \ No newline at end of file diff --git a/DEG2.0/specifications/Solar-Panel-Retail.yaml b/DEG2.0/specifications/Solar-Panel-Retail.yaml new file mode 100644 index 0000000..96ba097 --- /dev/null +++ b/DEG2.0/specifications/Solar-Panel-Retail.yaml @@ -0,0 +1,3070 @@ +openapi: 3.1.0 +info: + title: Beckn Protocol Specification modeled for Solar Panel Retail use case. + description: Beckn Protocol Specification modeled for Solar Panel Retail use case. + version: 1.1.1 +security: + - SubscriberAuth: [] +paths: + /search: + post: + tags: + - Beckn Provider Platform (BPP) + - Beckn Gateway (BG) + description: | + BAP declares the customer's intent to buy/avail products or services + - BAP can use descriptor.name to do a keyword based search. + - provider.descriptor.name can be used to filter based on providers. + - category.descriptor.code can be used to filter based on the service category + 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: + Search intent example: + value: + context: + domain: retail + action: search + version: 1.1.0 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-search-001 + timestamp: '2025-05-07T12:29:00Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + intent: + descriptor: + name: Solar panels for rooftop installation + category: + descriptor: + code: mono_panels + fulfillment: + type: HOME_DELIVERY + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /select: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog + - Consumer selects the service provider(provider ID), item ID(service) and the fulfillment ID. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Select a solar installation service: + value: + context: + domain: retail + action: select + version: 1.1.0 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-select-001 + timestamp: '2025-05-07T12:30:05Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpro_energy + items: + - id: sp_mono_450w + quantity: + selected: + count: 1 + - id: it/panel/12 + fulfillments: + - id: hd1 + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /init: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Initialize an order by providing billing and/or shipping details + - Consumer provides their billing and fulfillment details. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Initialize a solar installation service order: + value: + context: + domain: retail + action: init + version: 1.1.0 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-init-001 + timestamp: '2025-05-07T12:30:15Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpro_energy + items: + - id: sp_mono_450w + quantity: + selected: + count: 1 + - id: it/panel/12 + billing: + name: Evan Smith + email: evan.smith@example.com + phone: "+14155558888" + address: 456 Solar Valley Rd, San Jose, CA + fulfillments: + - id: hd1 + type: HOME_DELIVERY + stops: + - type: end + location: + address: 456 Solar Valley Rd, San Jose, CA + time: + range: + start: '2025-05-08T09:00:00Z' + end: '2025-05-08T17:00:00Z' + responses: + default: + 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: | + Initialize an order by providing billing and/or shipping details + - Consumer reviews and accepts the payment terms. + - Id there is a payment required before confirming the order, consumer completes the payment of the network before sending a confirm request. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + required: + - context + - message + examples: + Confirm a solar panel service order: + value: + context: + domain: retail + action: confirm + version: 1.1.0 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-confirm-001 + timestamp: '2025-05-07T12:30:30Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpro_energy + items: + - id: sp_mono_450w + quantity: + selected: + count: 1 + - id: it/panel/12 + billing: + name: Evan Smith + email: evan.smith@example.com + phone: "+14155558888" + address: 456 Solar Valley Rd, San Jose, CA + fulfillments: + - id: hd1 + type: HOME_DELIVERY + stops: + - type: end + location: + address: 456 Solar Valley Rd, San Jose, CA + time: + range: + start: '2025-05-08T09:00:00Z' + end: '2025-05-08T17:00:00Z' + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /status: + post: + tags: + - Beckn Provider Platform (BPP) + description: | + Fetch the latest order object + - Consumer sends the order_id to check the status. + - Consumer must have received the order ID as part of the on_confirm callback. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_id: + $ref: '#/components/schemas/Order/properties/id' + required: + - order_id + required: + - context + - message + examples: + Request to check the status of a solar panel installation service: + value: + context: + domain: retail + action: status + version: 1.1.0 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-status-001 + timestamp: '2025-05-07T12:30:40Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order_id: order-sunpro-001 + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + + /on_search: + post: + tags: + - Beckn Application Platform (BAP) + - Beckn Gateway (BG) + description: | + BPP sends its catalog in response to a search request. + - Response contains a catalog from a BPP. + - The catalog contains solar panel installation services from multiple providers(service providers). + - Each provider can have multiple items(solar panel installation services) + - Items.tags contains the metadata associated with the service. + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + catalog: + $ref: '#/components/schemas/Catalog' + required: + - catalog + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + catalog from BPP: + value: + context: + domain: retail + action: on_search + version: 1.1.0 + bpp_id: bpp-solar-store.example.com + bpp_uri: https://bpp-solar-store.example.com + location: + country: + code: USA + city: + code: NANP:628 + bap_id: bap-consumer.example.com + bap_uri: https://bap-consumer.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-solar-panel-001 + ttl: PT10M + timestamp: '2025-05-07T12:30:00Z' + message: + catalog: + descriptor: + name: Energykart Solar + short_desc: Shop solar panels by efficiency, budget, or portability + providers: + - id: sunpro_energy + descriptor: + name: SunPro Energy Systems + short_desc: Premium mono and polycrystalline solar panels + long_desc: SunPro manufactures high-efficiency solar panels for residential + and industrial installations. Known for reliability and long warranties. + images: + - url: https://example.com/images/sunpro_logo.png + size_type: sm + categories: + - id: premium_panels + descriptor: + name: High Efficiency Panels + code: mono_panels + - id: budget_panels + descriptor: + name: Economy Panels + code: poly_panels + - id: solar_installation + descriptor: + name: Solar installation service + code: Solar_installation_service + fulfillments: + - id: hd1 + type: HOME_DELIVERY + - id: sp1 + type: STORE_PICKUP + - id: sv1 + type: SITE_VISIT + locations: + - id: '1' + city: + name: San Jose + - id: '2' + city: + name: " OakLand" + rateable: true + items: + - id: sp_mono_450w + descriptor: + name: SunPro Mono 450W Panel + short_desc: High-efficiency 450W panel for rooftop systems + long_desc: 450W monocrystalline panel with superior power output and compact + size. Built for long-lasting rooftop installations with 25-year warranty. + price: + value: '320' + currency: USD + category_ids: + - premium_panels + fulfillment_ids: + - hd1 + - sp1 + location_ids: + - '1' + - '2' + rating: '4.5' + rateable: true + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Monocrystalline + - descriptor: + code: Wattage + value: 450W + - descriptor: + code: Efficiency + value: 21.4% + - descriptor: + code: Warranty + value: 25 years + - descriptor: + code: IP_Rating + value: IP68 + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: sp_poly_325w + descriptor: + name: SunPro Poly 325W Panel + short_desc: Affordable 325W solar panel for home kits + long_desc: Entry-level 325W polycrystalline panel. Suitable for small rooftop + or DIY solar applications. Offers good performance at lower cost. + price: + value: '200' + currency: USD + category_ids: + - budget_panels + fulfillment_ids: + - sp1 + location_ids: + - '1' + rating: '4.2' + rateable: true + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Polycrystalline + - descriptor: + code: Wattage + value: 325W + - descriptor: + code: Efficiency + value: 18.3% + - descriptor: + code: Warranty + value: 10 years + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter + integration, grid connection readiness, and post-installation testing. + Covers both residential and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + - id: voltedge_solar + descriptor: + name: VoltEdge Solar + short_desc: Flexible and mobile solar panel systems + long_desc: VoltEdge provides bendable and lightweight solar panels ideal for + portable energy needs, RVs, and boats. Built for rugged environments. + images: + - url: https://example.com/images/voltedge_logo.png + size_type: sm + categories: + - id: portable_panels + descriptor: + name: Portable Panels + code: flex_panels + - id: solar_installation + descriptor: + name: Solar installation service + code: Solar_installation_service + fulfillments: + - id: hd2 + type: HOME_DELIVERY + - id: sv1 + type: SITE_VISIT + locations: + - id: '1' + city: + name: San Jose + - id: '2' + city: + name: " OakLand" + rateable: true + items: + - id: ve_flex_100w + descriptor: + name: VoltEdge Flex 100W Panel + short_desc: Bendable solar panel for mobile energy use + long_desc: Flexible 100W solar panel built for curved surfaces and off-grid + portability. Ideal for campers, boats, or remote setups. Durable and water-resistant. + price: + value: '145' + currency: USD + category_ids: + - portable_panels + fulfillment_ids: + - hd2 + location_ids: + - '2' + rating: '4.6' + rateable: true + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Flexible PET + - descriptor: + code: Wattage + value: 100W + - descriptor: + code: Weight + value: 2.5 kg + - descriptor: + code: Use_Case + value: Camping, RV, Off-grid + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter + integration, grid connection readiness, and post-installation testing. + Covers both residential and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /on_select: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send draft order object with quoted price for selected items + - The response must contain a quotation for the service inside "quote" object. + - quotation can be an estimate value or an actual value. + 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 + examples: + On_Select response of the selected solar installation service: + value: + context: + domain: retail + action: on_select + version: 1.1.0 + bap_id: bap-consumer.example.com + bpp_id: bpp-solar-store.example.com + bpp_uri: https://bpp-solar-store.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-on-select-001 + timestamp: '2025-05-07T12:30:10Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpro_energy + descriptor: + name: SunPro Energy Systems + short_desc: Premium mono and polycrystalline solar panels + items: + - id: sp_mono_450w + descriptor: + name: SunPro Mono 450W Panel + short_desc: High-efficiency 450W panel for rooftop systems + price: + value: '320' + currency: USD + quantity: + selected: + count: 1 + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Monocrystalline + - descriptor: + code: Wattage + value: 450W + - descriptor: + code: Efficiency + value: 21.4% + - descriptor: + code: Warranty + value: 25 years + - descriptor: + code: IP_Rating + value: IP68 + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter integration, + grid connection readiness, and post-installation testing. Covers both residential + and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + fulfillments: + - id: hd1 + type: HOME_DELIVERY + quote: + price: + value: '345' + currency: USD + breakup: + - title: Panel Price + price: + value: '320' + currency: USD + - title: Home Delivery + price: + value: '25' + currency: USD + + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /on_init: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send order object with payment details updated + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + on_init examples of a solar installation service order: + value: + context: + domain: retail + action: on_init + version: 1.1.0 + bap_id: bap-consumer.example.com + bpp_id: bpp-solar-store.example.com + bpp_uri: https://bpp-solar-store.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-on-init-001 + timestamp: '2025-05-07T12:30:20Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + provider: + id: sunpro_energy + descriptor: + name: SunPro Energy Systems + short_desc: Premium mono and polycrystalline solar panels + items: + - id: sp_mono_450w + descriptor: + name: SunPro Mono 450W Panel + short_desc: High-efficiency 450W panel for rooftop systems + price: + value: '320' + currency: USD + quantity: + selected: + count: 1 + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Monocrystalline + - descriptor: + code: Wattage + value: 450W + - descriptor: + code: Efficiency + value: 21.4% + - descriptor: + code: Warranty + value: 25 years + - descriptor: + code: IP_Rating + value: IP68 + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter integration, + grid connection readiness, and post-installation testing. Covers both residential + and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + billing: + name: Evan Smith + email: evan.smith@example.com + phone: "+14155558888" + address: 456 Solar Valley Rd, San Jose, CA + fulfillments: + - id: hd1 + type: HOME_DELIVERY + stops: + - type: end + location: + address: 456 Solar Valley Rd, San Jose, CA + time: + range: + start: '2025-05-08T09:00:00Z' + end: '2025-05-08T17:00:00Z' + quote: + price: + value: '345' + currency: USD + breakup: + - title: Panel Price + price: + value: '320' + currency: USD + - title: Home Delivery + price: + value: '25' + currency: USD + payments: + - type: PRE-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '345' + currency: USD + transaction_id: txn-sunpro-001 + url: https://bpp-solar-store.example.com/payments/txn-sunpro-001 + cancellation_terms: + - fulfillment_state: + descriptor: + code: order_placed + name: Order Placed + reason_required: true + cancel_by: + timestamp: '2025-05-07T20:00:00Z' + cancellation_fee: + percentage: 5 + minimum_value: + currency: USD + value: '10' + xinput: + required: true + form: + url: https://example.com/cancel + external_ref: + url: https://example.com/docs/cancellation-policy.pdf + mime_type: application/pdf + + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + /on_confirm: + post: + tags: + - Beckn Application Platform (BAP) + description: | + Send active order object + - BPP must generate and send an order.id which is used to uniquely identify the order. + - BPP must also send the state of the fulfillment as part of fulfillments.state.descriptor.code + requestBody: + content: + application/json: + schema: + type: object + properties: + context: + allOf: + - $ref: '#/components/schemas/Context' + - properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + Confirmation of a solar panel installation service order: + value: + context: + domain: retail + action: on_confirm + version: 1.1.0 + bap_id: bap-consumer.example.com + bpp_id: bpp-solar-store.example.com + bpp_uri: https://bpp-solar-store.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-on-confirm-001 + timestamp: '2025-05-07T12:30:35Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: order-sunpro-001 + provider: + id: sunpro_energy + descriptor: + name: SunPro Energy Systems + short_desc: Premium mono and polycrystalline solar panels + items: + - id: sp_mono_450w + descriptor: + name: SunPro Mono 450W Panel + short_desc: High-efficiency 450W panel for rooftop systems + price: + value: '320' + currency: USD + quantity: + selected: + count: 1 + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Monocrystalline + - descriptor: + code: Wattage + value: 450W + - descriptor: + code: Efficiency + value: 21.4% + - descriptor: + code: Warranty + value: 25 years + - descriptor: + code: IP_Rating + value: IP68 + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter integration, + grid connection readiness, and post-installation testing. Covers both residential + and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + billing: + name: Evan Smith + email: evan.smith@example.com + phone: "+14155558888" + address: 456 Solar Valley Rd, San Jose, CA + fulfillments: + - id: hd1 + type: HOME_DELIVERY + state: + descriptor: + code: Order-confirmed + name: Order Confirmed + stops: + - type: end + location: + address: 456 Solar Valley Rd, San Jose, CA + time: + range: + start: '2025-05-08T09:00:00Z' + end: '2025-05-08T17:00:00Z' + quote: + price: + value: '345' + currency: USD + breakup: + - title: Panel Price + price: + value: '320' + currency: USD + - title: Home Delivery + price: + value: '25' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + cancellation_terms: + - fulfillment_state: + descriptor: + code: order_placed + name: Order Placed + reason_required: true + cancel_by: + timestamp: '2025-05-07T20:00:00Z' + cancellation_fee: + percentage: 5 + minimum_value: + currency: USD + value: '10' + xinput: + required: true + form: + url: https://example.com/cancel + external_ref: + url: https://example.com/docs/cancellation-policy.pdf + mime_type: application/pdf + + responses: + default: + description: Acknowledgement of message received after successful validation of schema and signature + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + /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: + - action + message: + type: object + properties: + order: + $ref: '#/components/schemas/Order' + required: + - order + error: + $ref: '#/components/schemas/Error' + required: + - context + examples: + on_status example response 1: + value: + context: + domain: retail + action: on_status + version: 1.1.0 + bap_id: bap-consumer.example.com + bpp_id: bpp-solar-store.example.com + bpp_uri: https://bpp-solar-store.example.com + transaction_id: tx-solar-panel-001 + message_id: msg-on-status-001 + timestamp: '2025-05-07T12:30:45Z' + ttl: PT10M + location: + country: + code: USA + city: + code: NANP:628 + message: + order: + id: order-sunpro-001 + provider: + id: sunpro_energy + descriptor: + name: SunPro Energy Systems + short_desc: Premium mono and polycrystalline solar panels + items: + - id: sp_mono_450w + descriptor: + name: SunPro Mono 450W Panel + short_desc: High-efficiency 450W panel for rooftop systems + price: + value: '320' + currency: USD + quantity: + selected: + count: 1 + tags: + - descriptor: + code: Panel_Specifications + display: true + list: + - descriptor: + code: Type + value: Monocrystalline + - descriptor: + code: Wattage + value: 450W + - descriptor: + code: Efficiency + value: 21.4% + - descriptor: + code: Warranty + value: 25 years + - descriptor: + code: IP_Rating + value: IP68 + - descriptor: + name: Certifications + list: + - descriptor: + name: solar equipment certificate + code: SEC + value: https://www.example.com/certificates/solar/CEC_LISTED/SunPower_X21_345_Module_CEC_Certification.pdf + - descriptor: + name: pv module safety certificate + code: PMSC + value: https://www.example.com/certificates/pv_module_safety_certificate/JinkoTigerNeo_UL61730_Cert.pdf + - id: it/panel/12 + descriptor: + name: Solar Panel Installation Service + short_desc: On-site installation for rooftop or ground-mounted solar panels + long_desc: Includes mounting structure setup, panel alignment, inverter integration, + grid connection readiness, and post-installation testing. Covers both residential + and commercial rooftop systems. + price: + value: '250' + currency: USD + rateable: true + rating: '4.8' + category_ids: + - solar_installation + fulfillment_ids: + - sv1 + location_ids: + - '1' + tags: + - descriptor: + code: installation_specification + display: true + list: + - descriptor: + code: installation_type + value: Rooftop / Ground-mount + - descriptor: + code: supported_panel_types + value: Mono PERC, Polycrystalline, Thin Film + - descriptor: + code: system_capacity_limit + value: Up to 10kW + - descriptor: + code: included_services + value: Mounting, inverter wiring, earthing, net-meter interface + - descriptor: + code: installation_duration + value: 4–6 hours + - descriptor: + code: installer_qualification + display: true + list: + - descriptor: + code: empaneled_with_nodal_agency + value: 'Yes' + - descriptor: + code: safety_certified + value: 'Yes' + billing: + name: Evan Smith + email: evan.smith@example.com + phone: "+14155558888" + address: 456 Solar Valley Rd, San Jose, CA + fulfillments: + - id: hd1 + type: HOME_DELIVERY + state: + descriptor: + code: Out-for-delivery + name: Out for Delivery + agent: + person: + name: Carlos Green + phone: "+14155551234" + organization: + descriptor: + name: SunPro Delivery Services + stops: + - type: end + location: + address: 456 Solar Valley Rd, San Jose, CA + time: + range: + start: '2025-05-08T09:00:00Z' + end: '2025-05-08T17:00:00Z' + quote: + price: + value: '345' + currency: USD + breakup: + - title: Panel Price + price: + value: '320' + currency: USD + - title: Home Delivery + price: + value: '25' + currency: USD + payments: + - type: ON-FULFILLMENT + collected_by: BPP + status: NOT-PAID + params: + amount: '150' + currency: USD + cancellation_terms: + - fulfillment_state: + descriptor: + code: order_placed + name: Order Placed + reason_required: true + cancel_by: + timestamp: '2025-05-07T20:00:00Z' + cancellation_fee: + percentage: 5 + minimum_value: + currency: USD + value: '10' + xinput: + required: true + form: + url: https://example.com/cancel + external_ref: + url: https://example.com/docs/cancellation-policy.pdf + mime_type: application/pdf + + responses: + default: + $ref: '#/paths/~1init/post/responses/default' + +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: + Response: + description: Acknowledgement of message received after successful validation of schema and signature + 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 + 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 + 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.' + 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 + 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: + $ref: '#/components/schemas/Descriptor' + 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' + 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: + - DRAFT + - DEFAULT + 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.' + 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 + 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: + - Item + - Order + - Fulfillment + - Provider + - Agent + - Support + 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 \ No newline at end of file diff --git a/DEG2.0/specifications/World-Engine.yaml b/DEG2.0/specifications/World-Engine.yaml new file mode 100644 index 0000000..fe33763 --- /dev/null +++ b/DEG2.0/specifications/World-Engine.yaml @@ -0,0 +1,933 @@ +openapi: 3.0.3 +info: + title: World Engine API + version: 1.0.0 + description: API for managing utilities, meters, energy resources, and appliances + +servers: + - url: https://playground.becknprotocol.io/meter-data-simulator + description: Sandbox server + +paths: + /utility/detailed: + get: + tags: + - Utility + summary: Get detailed info of all utilities + description: | + Get a list of utility companies: + - Each utility company will have a list of substations + - Each substation will have a list of transformers + - Each transformer will have a list of meters + - Each Meter is linked to a household. An ER(Energy Resource) represents a household. + - Each ER will have a list of DER(Distributed Energy Resource) + - Each DER represents an appliance, i.e a Ceiling Fan, an Electric Geyser. + + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + utilities: + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + city: + type: string + state: + type: string + latitude: + type: string + longtitude: + type: string + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + substations: + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + city: + type: string + state: + type: string + latitude: + type: string + longtitude: + type: string + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + max_capacity_KW: + type: number + transformers: + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + city: + type: string + state: + type: string + latitude: + type: string + longtitude: + type: string + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + max_capacity_KW: + type: number + meters: + type: array + items: + type: object + properties: + id: + type: integer + code: + type: string + consumptionLoadFactor: + type: number + productionLoadFactor: + type: number + type: + type: string + city: + type: string + state: + type: string + latitude: + type: number + longitude: + type: number + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + max_capacity_KW: + type: number + energyResource: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + ders: + type: array + items: + type: object + properties: + id: + type: integer + switched_on: + type: boolean + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + appliance: + type: object + properties: + id: + type: integer + name: + type: string + powerRating: + type: number + baseKWh: + type: number + description: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + + /utility/reset: + put: + tags: + - Utility + summary: Reset utility data to default + description: | + By default there is one utility(with its details) stored in the database. + - This API resets utilities data in the DB to the default value. + - Roll back the DB to a default state when required. + - No request body payload is sent as part of this API. + responses: + '200': + description: Utility data reset to default successfully + + /grid-loads: + get: + tags: + - Utility + summary: Get current transformer loads + description: | + Get the current load on the grid + - When you create new ERs and DERs into the world engine, the grid load would adjust accordingly(load will increase). + - This API is used to get the load on the grid at any point in time. + - No request body payload is sent as part of this API. + + responses: + '200': + description: Grid Loads fetched successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Grid Loads fetched successfully + data: + type: array + items: + type: object + properties: + id: + type: integer + current_transformer_load: + type: number + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + timestamp: + type: string + format: date-time + transformer: + type: object + properties: + id: + type: integer + name: + type: string + city: + type: string + state: + type: string + latitude: + type: string + longtitude: + type: string + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + max_capacity_KW: + type: number + emergency_service: + type: boolean + substation: + type: object + properties: + id: + type: integer + name: + type: string + city: + type: string + state: + type: string + latitude: + type: string + longtitude: + type: string + pincode: + type: string + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + publishedAt: + type: string + format: date-time + max_capacity_KW: + type: number + + /meters: + get: + tags: + - Meter + summary: Get list of meters + description: | + - Get the list of meters stored in the world engine + - No request body payload is sent as part of this API. + + responses: + '200': + description: Meters fetched successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Meters fetched successfully + data: + type: object + properties: + results: + type: array + items: + type: object + properties: + id: + type: integer + example: 2124 + code: + type: string + example: MTR-0036 + consumptionLoadFactor: + type: number + example: 1 + productionLoadFactor: + type: number + example: 0 + type: + type: string + example: SMART + city: + type: string + example: San Francisco + state: + type: string + example: CA + latitude: + type: number + format: float + example: 37.73 + longitude: + type: number + format: float + example: -122.48 + pincode: + type: string + example: "94103" + createdAt: + type: string + format: date-time + example: 2025-05-21T07:55:45.038Z + updatedAt: + type: string + format: date-time + example: 2025-05-21T08:46:07.380Z + publishedAt: + type: string + format: date-time + example: 2025-05-21T07:55:45.038Z + max_capacity_KW: + type: number + example: 10 + dfp_subscription_id: + type: string + nullable: true + example: "3804" + pagination: + type: object + properties: + page: + type: integer + example: 1 + pageSize: + type: integer + example: 25 + pageCount: + type: integer + example: 6 + total: + type: integer + example: 150 + post: + tags: + - Meter + summary: Create a meter record in the world engine + description: | + Create a meter record in the world engine. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + - energyResource + - consumptionLoadFactor + - productionLoadFactor + - type + - city + - state + - latitude + - longitude + - pincode + properties: + code: + type: string + description: Meter ID code + example: "MTR-0035" + parent: + type: string + nullable: true + description: If it is a child meter, this field contains parent meter ID + example: "MTR-0010" + energyResource: + type: string + description: Energy Resource ID associated with this meter + example: "3799" + consumptionLoadFactor: + type: number + format: double + description: Load scaling constant K for consumption + example: 1.0 + productionLoadFactor: + type: number + format: double + description: Load scaling constant K for production + example: 0.0 + type: + type: string + description: Type of meter installed (e.g., 1-Ph, 3-Ph, Smart, net-meter) + example: "SMART" + city: + type: string + description: City where the meter is located + example: "San Francisco" + state: + type: string + description: State where the meter is located + example: "California" + latitude: + type: number + format: double + description: Latitude coordinate of the meter + example: 37.7749 + longitude: + type: number + format: double + description: Longitude coordinate of the meter + example: -122.4194 + pincode: + type: string + description: Pincode of the location where meter is located + example: "94103" + responses: + '201': + description: Meter created successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Meter created successfully" + data: + type: object + properties: + id: + type: integer + example: 2127 + code: + type: string + example: "MTR-0035" + # additional properties can be added here matching the created meter details + '400': + description: Bad Request - Invalid input + '500': + description: Internal Server Error + + /meters/{meterId}: + get: + tags: + - Meter + summary: Get a specific meter by ID + description: | + Fetch a meter record from the world engine using meter id + - No request body payload is sent as part of this API. + + parameters: + - name: meterId + in: path + required: true + schema: + type: integer + responses: + '200': + description: Meter fetched successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Meter fetched successfully + data: + type: object + properties: + id: + type: integer + example: 2127 + code: + type: string + example: MTR-0035 + consumptionLoadFactor: + type: number + example: 1 + productionLoadFactor: + type: number + example: 0 + type: + type: string + example: SMART + city: + type: string + example: San Francisco + state: + type: string + example: CA + latitude: + type: number + format: float + example: 37.73 + longitude: + type: number + format: float + example: -122.44 + pincode: + type: string + example: "94103" + createdAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.038Z" + updatedAt: + type: string + format: date-time + example: "2025-05-21T08:41:13.397Z" + publishedAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.038Z" + max_capacity_KW: + type: number + example: 10 + dfp_subscription_id: + type: string + nullable: true + example: "3799" + user: + nullable: true + example: null + energyResource: + type: object + properties: + id: + type: integer + example: 2992 + name: + type: string + example: Daryl Collins + type: + type: string + example: CONSUMER + createdAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.550Z" + updatedAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.550Z" + publishedAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.550Z" + transformer: + type: object + properties: + id: + type: integer + example: 222 + name: + type: string + example: Fogline MSN33-TX1 + city: + type: string + example: San Francisco + state: + type: string + example: CA + latitude: + type: string + example: "37.729064" + longtitude: + type: string + example: "-122.430954" + pincode: + type: string + example: "94103" + createdAt: + type: string + format: date-time + example: "2025-05-21T07:55:44.978Z" + updatedAt: + type: string + format: date-time + example: "2025-05-21T07:55:44.978Z" + publishedAt: + type: string + format: date-time + example: "2025-05-21T07:55:44.978Z" + max_capacity_KW: + type: number + example: 90 + emergency_service: + type: boolean + example: false + delete: + tags: + - Meter + summary: Delete a specific meter + description: | + Delete a meter record from the world engine using meter id + - No request body payload is sent as part of this API. + parameters: + - name: meterId + in: path + required: true + schema: + type: integer + responses: + '200': + description: Meter deleted successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Meter deleted successfully + + /meters/add-subscription: + put: + tags: + - Meter + summary: Add subscription to meter + description: | + Add a user's DFP subscription record into the World Engine. + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + Meter_id: + type: string + description: Meter ID of the user + Subscription_order_id: + type: string + description: Order ID the user received when they subscribed to a DFP program. + responses: + '200': + description: Subscription added + + /meter-datasets/{meterId}: + get: + tags: + - Meter + summary: Get meter dataset by meter ID + description: | + Get historical energy consumption data corresponding to a meter id. + - No request body payload is sent as part of this API. + parameters: + - name: meterId + in: path + required: true + schema: + type: integer + responses: + '200': + description: Meter Dataset fetched successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Meter Dataset fetched successfully + data: + type: array + items: + type: object + properties: + id: + type: integer + example: 1321189 + consumptionKWh: + type: number + format: float + example: 2.0698 + productionKWh: + type: number + format: float + example: 1.2 + consumptionKVAh: + type: number + format: float + example: 2.555308641975308 + avgCurrent: + type: number + format: float + example: 0.1169456366237482 + avgVoltage: + type: integer + example: 233 + reactivePowerKVAR: + type: number + format: float + example: 2.3672943333768792 + powerFactor: + type: number + format: float + example: 0.81 + timestamp: + type: string + format: date-time + example: "2026-08-29T02:42:09.768Z" + createdAt: + type: string + format: date-time + example: "2025-05-21T07:56:00.324Z" + updatedAt: + type: string + format: date-time + example: "2025-05-21T07:56:00.324Z" + publishedAt: + type: string + format: date-time + example: "2025-05-21T07:56:00.184Z" + + /energy-resources: + post: + tags: + - ER (Energy Resource) + summary: Create a new energy resource + description: | + Create a new ER(Energy Resource) + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + type: + type: string + enum: [CONSUMER, PROSUMER] + meter: + type: number + responses: + '201': + description: Energy resource created + + /energy-resources/{erId}: + get: + tags: + - ER (Energy Resource) + summary: Get energy resource by ID + description: | + Get an energy resource by ER(Energy Resource) ID + parameters: + - name: erId + in: path + required: true + schema: + type: integer + responses: + '200': + description: Energy resource fetched successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Energy resource fetched successfully + data: + type: object + properties: + id: + type: integer + example: 2796 + name: + type: string + example: Adam Conley + type: + type: string + enum: [CONSUMER, PRODUCER] + example: CONSUMER + createdAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.555Z" + updatedAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.555Z" + publishedAt: + type: string + format: date-time + example: "2025-05-21T07:55:45.555Z" + delete: + tags: + - ER (Energy Resource) + summary: Delete energy resource by ID + description: | + Delete an energy resource by ER(Energy Resource) ID + parameters: + - name: erId + in: path + required: true + schema: + type: string + responses: + '204': + description: Energy resource deleted + + /der: + post: + tags: + - DER (Distributed Energy Resource) + summary: Create a DER (appliance) + description: | + Create a DER + - A DER is created when we install any electrical appliance in a household. + - DER associates an ER(household) with an appliance(Electrical Geyer). + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + Energy_resource: + type: number + Appliance: + type: number + responses: + '201': + description: DER created + + /toggle-der/{derid}: + post: + tags: + - DER (Distributed Energy Resource) + summary: Toggle DER on or off + description: | + Switching an DER, i.e, energy appliance on and off using DER ID , i.e, switching on or off your Ceiling Fan, or Electric Geyser. + - While switched off, the device will not generate any load on the grid. No consumption data will be generated for respective appliances. + - Used in the Demand-Dlexibility use case, in response to a Demand-Dlexibility notification. + + parameters: + - name: derid + in: path + required: true + schema: + type: string + responses: + '200': + description: DER toggled successfully