UBA Network

Introduction

This document outlines the steps required to publish the benefits on the ONEST network to be accessed from the seeker side.

Architecture

For architecture refer to the documentation in the following link https://github.com/ONEST-Network/protocol-server/blob/master/README.md#architecture

Key Features

  • Data storage

    • Mongo Db, redis, rabbitMq

Technical Details

For a technical overview refer to the documentation in the following link https://starterpack.onest.network/learn/beckn-protocol-video-library

Installation and Deployment

POST api/search :Gets list of benefits from provider
curl --location '
https://your-uba-network-api-domain.com/api/search' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
        "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "intent": {
            "item": {
                "descriptor": {
                    "name": ""
                }
            }
        }
    }
}'


As the response time of search API can be more so we are having cron job to add the response from search API to hasura DB using below API

  • POST api/content/create :get response from search API and store in hasura DB

curl --location --request POST https://your-uba-network-api-domain.com/api/content/create' \
            --data ''

The following API is used to get a list of benefits from Hasura DB

  • POST api/content/create :get a response from search API and store in hasura DB

curl --location --request POST 'https://your-uba-network-api-domain.com/api/content/search \
            --data ''

  1. POST api/content/search :used to filter the benefits for seeker based on profile details and search

curl --location 'https://dev-uba-bap.tekdinext.com/api/content/search' \
--header 'Content-Type: application/json' \
--data '{"filters":{"caste":"st","annualIncome":""},"search":""}'

2. POST api/select :Gets details of benefits from provider such as details of benefit ,description , eligibility criteria etc

curl --location 'https://your-uba-network-api-domain.com/api/select' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
     "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

3. POST api/init :Gets form from provider side in response on applying to benefit to send details of seeker to provider such as name, address, gender etc

curl --location 'https://your-uba-network-api-domain.com/api/init' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token
--data '{
    "context": {
  "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

4. POST api/confirm :returns the order_id in response for application after confirmation of submission using which we can track status of application

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/confirm' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token
--data '{
    "context": {
        ""domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
        "transaction_id": "bde29d69-9720-469b-aa5f-656723ddad7a",
        "message_id": "1f4adbea-ed1d-4208-87b4-c399da4f4b96"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

5. POST api/status :returns the status of the application in response to tracking status changes from provider side such as submitted, approved , pending for review, etc

curl --location 'https://your-uba-network-bpp-domain.com/api/status' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token
--data '{
    "context": {
   "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order_id": "TLEXP_24091541_1733376328236"
    }
}'

Provider side mapping of Response in ONEST-supported format

The below API returns the response from the Provider side in a format supported by ONEST by mapping the response from the DIGIT API with the standard protocol of ONEST

(For details of DIGIT API used to map response please refer to documentation of Digit Service)

  1. POST api/dsep/search :Gets list of benefits from DIGIT API maps it with in standard format of ONEST and return to seeker

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/search' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
        "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order_id": "TLEXP_24091541_1733376328236"
    }
}'

  1. POST api/dsep/select :Gets details of benefits using benefit id from DIGIT such as details of benefit ,description , eligibility criteria etc using API maps it with in standard format of ONEST and return to seeker

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/select' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
    "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

  1. POST api/dsep/init :Gets form from provider (DIGIT API) side in response on applying to benefit to send to provider

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/init' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
        "domain": "onest:financial-support",
     "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

  1. POST api/dsep/confirm :returns the order_id in response for application after confirmation of submission to seeker

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/confirm' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token
--data '{
    "context": {
        "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
        "order": {
            "items": [
                {
                    "id": "PB-BTR-2024-12-02-000726"
                }
            ],
            "provider": {
                "id": "PB-BTR-2024-12-02-000726"
            }
        }
    }
}'

5. POST api/dsep/status :maps response from DIGIT API to return status of application changed by provider to seeker side

curl --location 'https://your-uba-network-bpp-domain.com/api/dsep/status' \
--header 'Content-Type: application/json' \
--data '{
    "context": {
        "domain": "onest:financial-support",
        "action": "search",
        "timestamp": "2023-08-02T07:21:58.448Z",
        "ttl": "PT10M",
        "version": "1.1.0",
        "bap_id": "your-uba-network-api-domain.com",
        "bap_uri": "https://your-uba-network-api-domain.com",
      "bpp_id": "your-uba-network-bpp-domain.com",
        "bpp_uri": "https://your-uba-network-bpp-domain.com",
        "transaction_id": "5fa1f5a3-d9bb-436b-af25-9c456b57e1d7",
        "message_id": "33d31943-c664-4e24-933c-117b2be059d8"
    },
    "message": {
      "order_id" : "TLEXP_24091541_1733376328236"
    }
}'

Last updated

Was this helpful?