Beckn QR is a product that generates interoperable QR codes similar to UPI QR codes that allow a consumer on any beckn-enabled application to connect to and transact with any provider that has their catalog exposed as a beckn-endpoint
MIT License
4
stars
2
forks
source link
Implement Beckn Search and Catalog Management APIs #5
Implement Beckn Search and Catalog Management APIs
Description
Background:
As part of enhancing our Beckn protocol implementation, we need to focus on fetching catalogs using the Beckn search mechanism. This will involve encoding a selected provider as a search request and then saving the resulting JSON data. Additionally, we need to implement functionalities to generate QR codes based on the saved data.
Objectives:
Implement the generateSearchRequest API to create a search request body for a given provider ID fetched from the last on_search response.
Develop the saveRequest API to save the output of generateSearchRequest as a JSON file and return the URL to the file as a Beckn protocol URL.
Create the generateQR API to take the output of saveRequest and generate a QR code image.
Enable the ability to generate a search request for a provider, an item, or a category.
API Specifications
generateSearchRequest:
Input: provider.id (fetched from the last on_search response)
Output: Search request body where message.intent.provider.id is equal to the selected provider ID.
saveRequest:
Input: Output of generateSearchRequest
Output: URL to the saved JSON file as a Beckn protocol URL
generateQR:
Input: Output of saveRequest
Output: QR code image generated based on the provided data
Additional Requirements
The APIs should be well-documented with clear usage examples.
Ensure error handling for edge cases, such as missing data or invalid inputs.
Implement suitable unit tests for each API to ensure functionality and stability.
Use Cases
The implemented APIs should allow users to easily generate search requests for providers, items, or categories.
Users should be able to save these requests as JSON files and obtain URLs for sharing.
QR code generation should provide a visual representation of the saved request for easy sharing and scanning.
Note
This issue should track the development and implementation of the specified APIs, including their documentation and unit tests. Once completed, the new functionality will enhance our Beckn protocol implementation by providing efficient search, catalog management, and sharing capabilities.
Implement Beckn Search and Catalog Management APIs
Description
Background: As part of enhancing our Beckn protocol implementation, we need to focus on fetching catalogs using the Beckn search mechanism. This will involve encoding a selected provider as a search request and then saving the resulting JSON data. Additionally, we need to implement functionalities to generate QR codes based on the saved data.
Objectives:
generateSearchRequest
API to create a search request body for a given provider ID fetched from the laston_search
response.saveRequest
API to save the output ofgenerateSearchRequest
as a JSON file and return the URL to the file as a Beckn protocol URL.generateQR
API to take the output ofsaveRequest
and generate a QR code image.API Specifications
generateSearchRequest:
provider.id
(fetched from the laston_search
response)message.intent.provider.id
is equal to the selected provider ID.saveRequest:
generateSearchRequest
generateQR:
saveRequest
Additional Requirements
Use Cases
Note
This issue should track the development and implementation of the specified APIs, including their documentation and unit tests. Once completed, the new functionality will enhance our Beckn protocol implementation by providing efficient search, catalog management, and sharing capabilities.