From 9e4a3dcfaf80b7f45144f2306899d512b7f4097f Mon Sep 17 00:00:00 2001 From: Chakradhar Date: Tue, 9 Jan 2024 14:20:00 +0530 Subject: [PATCH] second commit --- Dockerfile | 2 +- app.js | 13 +- b2b_collection.json | 1 + build/resolved.yaml | 18376 ++++++++++++++++++++ config.yaml | 28 +- package.json | 3 +- server.yaml | 78 + services/service.js | 128 +- services/triggerService.js | 2 +- services/validation.js | 5 + store_ids.json | 8 + utils/config.js | 2 +- v1/ONDC:TRV10/confirm.yaml | 8 + v1/ONDC:TRV10/init.yaml | 7 + v1/ONDC:TRV10/on_confirm.yaml | 8 + v1/ONDC:TRV10/on_init.yaml | 7 + v1/ONDC:TRV10/on_search.yaml | 7 + v1/ONDC:TRV10/on_select.yaml | 7 + v1/ONDC:TRV10/operations/req_body.yaml | 25 + v1/ONDC:TRV10/payloads/confirm.yaml | 61 + v1/ONDC:TRV10/payloads/init.yaml | 67 + v1/ONDC:TRV10/payloads/on_confirm.yaml | 95 + v1/ONDC:TRV10/payloads/on_init.yaml | 85 + v1/ONDC:TRV10/payloads/on_search.yaml | 96 + v1/ONDC:TRV10/payloads/on_select.yaml | 100 + v1/ONDC:TRV10/payloads/on_update.yaml | 53 + v1/ONDC:TRV10/payloads/search.yaml | 55 + v1/ONDC:TRV10/payloads/select.yaml | 47 + v1/ONDC:TRV10/rating.yaml | 7 + v1/ONDC:TRV10/schema/cancel.json | 164 + v1/ONDC:TRV10/schema/confirm.json | 1982 +++ v1/ONDC:TRV10/schema/init.json | 1978 +++ v1/ONDC:TRV10/schema/on_cancel.json | 2013 +++ v1/ONDC:TRV10/schema/on_confirm.json | 2014 +++ v1/ONDC:TRV10/schema/on_init.json | 2013 +++ v1/ONDC:TRV10/schema/on_rating.json | 157 + v1/ONDC:TRV10/schema/on_search.json | 3808 ++++ v1/ONDC:TRV10/schema/on_select.json | 1998 +++ v1/ONDC:TRV10/schema/on_status.json | 2013 +++ v1/ONDC:TRV10/schema/on_support.json | 161 + v1/ONDC:TRV10/schema/on_track.json | 169 + v1/ONDC:TRV10/schema/on_update.json | 2006 +++ v1/ONDC:TRV10/schema/rating.json | 169 + v1/ONDC:TRV10/schema/search.json | 3949 +++++ v1/ONDC:TRV10/schema/select.json | 1982 +++ v1/ONDC:TRV10/schema/status.json | 125 + v1/ONDC:TRV10/schema/support.json | 122 + v1/ONDC:TRV10/schema/track.json | 129 + v1/ONDC:TRV10/schema/update.json | 1987 +++ v1/ONDC:TRV10/search.yaml | 7 + v1/ONDC:TRV10/select.yaml | 7 + v1/ONDC:TRV10/status.yaml | 7 + v1/ONDC:TRV10/support.yaml | 7 + v1/ONDC:TRV10/template/confirm.yaml | 41 + v1/ONDC:TRV10/template/init.yaml | 41 + v1/ONDC:TRV10/template/on_confirm.yaml | 38 + v1/ONDC:TRV10/template/on_init.yaml | 38 + v1/ONDC:TRV10/template/on_rating.yaml | 38 + v1/ONDC:TRV10/template/on_search.yaml | 38 + v1/ONDC:TRV10/template/on_select.yaml | 38 + v1/ONDC:TRV10/template/on_status.yaml | 38 + v1/ONDC:TRV10/template/on_support.yaml | 38 + v1/ONDC:TRV10/template/on_track.yaml | 38 + v1/ONDC:TRV10/template/on_update.yaml | 38 + v1/ONDC:TRV10/template/select.yaml | 41 + v1/ONDC:TRV10/track.yaml | 7 + v1/ONDC:TRV10/update.yaml | 7 + v1/ONDC:TRV10/v1.yaml | 117 + v1/nic2004:63032/confirm.yaml | 7 + v1/nic2004:63032/init.yaml | 7 + v1/nic2004:63032/on_init.yaml | 7 + v1/nic2004:63032/on_search.yaml | 7 + v1/nic2004:63032/on_select.yaml | 7 + v1/nic2004:63032/operations/req_body.yaml | 25 + v1/nic2004:63032/payloads/confirm.yaml | 144 + v1/nic2004:63032/payloads/init.yaml | 82 + v1/nic2004:63032/payloads/on_confirm.yaml | 153 + v1/nic2004:63032/payloads/on_init.yaml | 144 + v1/nic2004:63032/payloads/on_rating.yaml | 17 + v1/nic2004:63032/payloads/on_search.yaml | 133 + v1/nic2004:63032/payloads/on_select.yaml | 122 + v1/nic2004:63032/payloads/on_status.yaml | 153 + v1/nic2004:63032/payloads/on_support.yaml | 17 + v1/nic2004:63032/payloads/on_track.yaml | 19 + v1/nic2004:63032/payloads/on_update.yaml | 154 + v1/nic2004:63032/payloads/rating.yaml | 17 + v1/nic2004:63032/payloads/search.yaml | 20 + v1/nic2004:63032/payloads/select.yaml | 26 + v1/nic2004:63032/payloads/status.yaml | 15 + v1/nic2004:63032/payloads/support.yaml | 15 + v1/nic2004:63032/payloads/track.yaml | 15 + v1/nic2004:63032/rating.yaml | 7 + v1/nic2004:63032/schema/cancel.json | 164 + v1/nic2004:63032/schema/confirm.json | 1982 +++ v1/nic2004:63032/schema/init.json | 1982 +++ v1/nic2004:63032/schema/on_cancel.json | 2013 +++ v1/nic2004:63032/schema/on_confirm.json | 2013 +++ v1/nic2004:63032/schema/on_init.json | 2013 +++ v1/nic2004:63032/schema/on_rating.json | 157 + v1/nic2004:63032/schema/on_search.json | 3808 ++++ v1/nic2004:63032/schema/on_select.json | 2013 +++ v1/nic2004:63032/schema/on_status.json | 2013 +++ v1/nic2004:63032/schema/on_support.json | 161 + v1/nic2004:63032/schema/on_track.json | 169 + v1/nic2004:63032/schema/on_update.json | 2013 +++ v1/nic2004:63032/schema/rating.json | 169 + v1/nic2004:63032/schema/search.json | 3949 +++++ v1/nic2004:63032/schema/select.json | 1982 +++ v1/nic2004:63032/schema/status.json | 125 + v1/nic2004:63032/schema/support.json | 122 + v1/nic2004:63032/schema/track.json | 129 + v1/nic2004:63032/schema/update.json | 1987 +++ v1/nic2004:63032/search.yaml | 7 + v1/nic2004:63032/select.yaml | 7 + v1/nic2004:63032/status.yaml | 7 + v1/nic2004:63032/support.yaml | 7 + v1/nic2004:63032/template/confirm.yaml | 41 + v1/nic2004:63032/template/init.yaml | 41 + v1/nic2004:63032/template/on_confirm.yaml | 38 + v1/nic2004:63032/template/on_init.yaml | 38 + v1/nic2004:63032/template/on_rating.yaml | 38 + v1/nic2004:63032/template/on_search.yaml | 38 + v1/nic2004:63032/template/on_select.yaml | 38 + v1/nic2004:63032/template/on_status.yaml | 38 + v1/nic2004:63032/template/on_support.yaml | 38 + v1/nic2004:63032/template/on_track.yaml | 38 + v1/nic2004:63032/template/on_update.yaml | 38 + v1/nic2004:63032/template/select.yaml | 41 + v1/nic2004:63032/track.yaml | 7 + v1/nic2004:63032/update.yaml | 7 + v1/nic2004:63032/v1.yaml | 117 + v2/ONDC:RET10/confirm.yaml | 7 + v2/ONDC:RET10/init.yaml | 7 + v2/ONDC:RET10/on_confirm.yaml | 7 + v2/ONDC:RET10/on_init.yaml | 7 + v2/ONDC:RET10/on_search.yaml | 7 + v2/ONDC:RET10/on_select.yaml | 7 + v2/ONDC:RET10/on_status.yaml | 7 + v2/ONDC:RET10/on_update.yaml | 7 + v2/ONDC:RET10/operations/req_body.yaml | 40 + v2/ONDC:RET10/payloads/confirm.yaml | 166 + v2/ONDC:RET10/payloads/init.yaml | 96 + v2/ONDC:RET10/payloads/on_confirm.yaml | 184 + v2/ONDC:RET10/payloads/on_init.yaml | 149 + v2/ONDC:RET10/payloads/on_search.yaml | 309 + v2/ONDC:RET10/payloads/on_select.yaml | 87 + v2/ONDC:RET10/payloads/on_status.yaml | 171 + v2/ONDC:RET10/payloads/on_update.yaml | 50 + v2/ONDC:RET10/payloads/search.yaml | 56 + v2/ONDC:RET10/payloads/select.yaml | 75 + v2/ONDC:RET10/payloads/status.yaml | 19 + v2/ONDC:RET10/payloads/update.yaml | 51 + v2/ONDC:RET10/schema/confirm.yaml | 1634 ++ v2/ONDC:RET10/schema/init.yaml | 1634 ++ v2/ONDC:RET10/schema/on_confirm.yaml | 1658 ++ v2/ONDC:RET10/schema/on_init.yaml | 1658 ++ v2/ONDC:RET10/schema/on_search.yaml | 1484 ++ v2/ONDC:RET10/schema/on_select.yaml | 1656 ++ v2/ONDC:RET10/schema/on_status.yaml | 1658 ++ v2/ONDC:RET10/schema/on_update.yaml | 1658 ++ v2/ONDC:RET10/schema/search.yaml | 1508 ++ v2/ONDC:RET10/schema/select.yaml | 1634 ++ v2/ONDC:RET10/schema/status.yaml | 332 + v2/ONDC:RET10/schema/update.yaml | 1680 ++ v2/ONDC:RET10/search.yaml | 7 + v2/ONDC:RET10/select.yaml | 7 + v2/ONDC:RET10/status.yaml | 7 + v2/ONDC:RET10/template/confirm.yaml | 34 + v2/ONDC:RET10/template/init.yaml | 34 + v2/ONDC:RET10/template/on_confirm.yaml | 34 + v2/ONDC:RET10/template/on_init.yaml | 34 + v2/ONDC:RET10/template/on_search.yaml | 34 + v2/ONDC:RET10/template/on_select.yaml | 34 + v2/ONDC:RET10/template/on_status.yaml | 34 + v2/ONDC:RET10/template/on_update.yaml | 34 + v2/ONDC:RET10/template/search.yaml | 34 + v2/ONDC:RET10/template/select.yaml | 34 + v2/ONDC:RET10/template/status.yaml | 34 + v2/ONDC:RET10/template/update.yaml | 34 + v2/ONDC:RET10/update.yaml | 7 + v2/ONDC:RET10/v2.yaml | 79 + yaml-templates/exampleConfig.yaml | 2 +- 182 files changed, 100033 insertions(+), 32 deletions(-) create mode 100644 b2b_collection.json create mode 100644 build/resolved.yaml create mode 100644 server.yaml create mode 100644 store_ids.json create mode 100644 v1/ONDC:TRV10/confirm.yaml create mode 100644 v1/ONDC:TRV10/init.yaml create mode 100644 v1/ONDC:TRV10/on_confirm.yaml create mode 100644 v1/ONDC:TRV10/on_init.yaml create mode 100644 v1/ONDC:TRV10/on_search.yaml create mode 100644 v1/ONDC:TRV10/on_select.yaml create mode 100644 v1/ONDC:TRV10/operations/req_body.yaml create mode 100644 v1/ONDC:TRV10/payloads/confirm.yaml create mode 100644 v1/ONDC:TRV10/payloads/init.yaml create mode 100644 v1/ONDC:TRV10/payloads/on_confirm.yaml create mode 100644 v1/ONDC:TRV10/payloads/on_init.yaml create mode 100644 v1/ONDC:TRV10/payloads/on_search.yaml create mode 100644 v1/ONDC:TRV10/payloads/on_select.yaml create mode 100644 v1/ONDC:TRV10/payloads/on_update.yaml create mode 100644 v1/ONDC:TRV10/payloads/search.yaml create mode 100644 v1/ONDC:TRV10/payloads/select.yaml create mode 100644 v1/ONDC:TRV10/rating.yaml create mode 100644 v1/ONDC:TRV10/schema/cancel.json create mode 100644 v1/ONDC:TRV10/schema/confirm.json create mode 100644 v1/ONDC:TRV10/schema/init.json create mode 100644 v1/ONDC:TRV10/schema/on_cancel.json create mode 100644 v1/ONDC:TRV10/schema/on_confirm.json create mode 100644 v1/ONDC:TRV10/schema/on_init.json create mode 100644 v1/ONDC:TRV10/schema/on_rating.json create mode 100644 v1/ONDC:TRV10/schema/on_search.json create mode 100644 v1/ONDC:TRV10/schema/on_select.json create mode 100644 v1/ONDC:TRV10/schema/on_status.json create mode 100644 v1/ONDC:TRV10/schema/on_support.json create mode 100644 v1/ONDC:TRV10/schema/on_track.json create mode 100644 v1/ONDC:TRV10/schema/on_update.json create mode 100644 v1/ONDC:TRV10/schema/rating.json create mode 100644 v1/ONDC:TRV10/schema/search.json create mode 100644 v1/ONDC:TRV10/schema/select.json create mode 100644 v1/ONDC:TRV10/schema/status.json create mode 100644 v1/ONDC:TRV10/schema/support.json create mode 100644 v1/ONDC:TRV10/schema/track.json create mode 100644 v1/ONDC:TRV10/schema/update.json create mode 100644 v1/ONDC:TRV10/search.yaml create mode 100644 v1/ONDC:TRV10/select.yaml create mode 100644 v1/ONDC:TRV10/status.yaml create mode 100644 v1/ONDC:TRV10/support.yaml create mode 100644 v1/ONDC:TRV10/template/confirm.yaml create mode 100644 v1/ONDC:TRV10/template/init.yaml create mode 100644 v1/ONDC:TRV10/template/on_confirm.yaml create mode 100644 v1/ONDC:TRV10/template/on_init.yaml create mode 100644 v1/ONDC:TRV10/template/on_rating.yaml create mode 100644 v1/ONDC:TRV10/template/on_search.yaml create mode 100644 v1/ONDC:TRV10/template/on_select.yaml create mode 100644 v1/ONDC:TRV10/template/on_status.yaml create mode 100644 v1/ONDC:TRV10/template/on_support.yaml create mode 100644 v1/ONDC:TRV10/template/on_track.yaml create mode 100644 v1/ONDC:TRV10/template/on_update.yaml create mode 100644 v1/ONDC:TRV10/template/select.yaml create mode 100644 v1/ONDC:TRV10/track.yaml create mode 100644 v1/ONDC:TRV10/update.yaml create mode 100644 v1/ONDC:TRV10/v1.yaml create mode 100644 v1/nic2004:63032/confirm.yaml create mode 100644 v1/nic2004:63032/init.yaml create mode 100644 v1/nic2004:63032/on_init.yaml create mode 100644 v1/nic2004:63032/on_search.yaml create mode 100644 v1/nic2004:63032/on_select.yaml create mode 100644 v1/nic2004:63032/operations/req_body.yaml create mode 100644 v1/nic2004:63032/payloads/confirm.yaml create mode 100644 v1/nic2004:63032/payloads/init.yaml create mode 100644 v1/nic2004:63032/payloads/on_confirm.yaml create mode 100644 v1/nic2004:63032/payloads/on_init.yaml create mode 100644 v1/nic2004:63032/payloads/on_rating.yaml create mode 100644 v1/nic2004:63032/payloads/on_search.yaml create mode 100644 v1/nic2004:63032/payloads/on_select.yaml create mode 100644 v1/nic2004:63032/payloads/on_status.yaml create mode 100644 v1/nic2004:63032/payloads/on_support.yaml create mode 100644 v1/nic2004:63032/payloads/on_track.yaml create mode 100644 v1/nic2004:63032/payloads/on_update.yaml create mode 100644 v1/nic2004:63032/payloads/rating.yaml create mode 100644 v1/nic2004:63032/payloads/search.yaml create mode 100644 v1/nic2004:63032/payloads/select.yaml create mode 100644 v1/nic2004:63032/payloads/status.yaml create mode 100644 v1/nic2004:63032/payloads/support.yaml create mode 100644 v1/nic2004:63032/payloads/track.yaml create mode 100644 v1/nic2004:63032/rating.yaml create mode 100644 v1/nic2004:63032/schema/cancel.json create mode 100644 v1/nic2004:63032/schema/confirm.json create mode 100644 v1/nic2004:63032/schema/init.json create mode 100644 v1/nic2004:63032/schema/on_cancel.json create mode 100644 v1/nic2004:63032/schema/on_confirm.json create mode 100644 v1/nic2004:63032/schema/on_init.json create mode 100644 v1/nic2004:63032/schema/on_rating.json create mode 100644 v1/nic2004:63032/schema/on_search.json create mode 100644 v1/nic2004:63032/schema/on_select.json create mode 100644 v1/nic2004:63032/schema/on_status.json create mode 100644 v1/nic2004:63032/schema/on_support.json create mode 100644 v1/nic2004:63032/schema/on_track.json create mode 100644 v1/nic2004:63032/schema/on_update.json create mode 100644 v1/nic2004:63032/schema/rating.json create mode 100644 v1/nic2004:63032/schema/search.json create mode 100644 v1/nic2004:63032/schema/select.json create mode 100644 v1/nic2004:63032/schema/status.json create mode 100644 v1/nic2004:63032/schema/support.json create mode 100644 v1/nic2004:63032/schema/track.json create mode 100644 v1/nic2004:63032/schema/update.json create mode 100644 v1/nic2004:63032/search.yaml create mode 100644 v1/nic2004:63032/select.yaml create mode 100644 v1/nic2004:63032/status.yaml create mode 100644 v1/nic2004:63032/support.yaml create mode 100644 v1/nic2004:63032/template/confirm.yaml create mode 100644 v1/nic2004:63032/template/init.yaml create mode 100644 v1/nic2004:63032/template/on_confirm.yaml create mode 100644 v1/nic2004:63032/template/on_init.yaml create mode 100644 v1/nic2004:63032/template/on_rating.yaml create mode 100644 v1/nic2004:63032/template/on_search.yaml create mode 100644 v1/nic2004:63032/template/on_select.yaml create mode 100644 v1/nic2004:63032/template/on_status.yaml create mode 100644 v1/nic2004:63032/template/on_support.yaml create mode 100644 v1/nic2004:63032/template/on_track.yaml create mode 100644 v1/nic2004:63032/template/on_update.yaml create mode 100644 v1/nic2004:63032/template/select.yaml create mode 100644 v1/nic2004:63032/track.yaml create mode 100644 v1/nic2004:63032/update.yaml create mode 100644 v1/nic2004:63032/v1.yaml create mode 100644 v2/ONDC:RET10/confirm.yaml create mode 100644 v2/ONDC:RET10/init.yaml create mode 100644 v2/ONDC:RET10/on_confirm.yaml create mode 100644 v2/ONDC:RET10/on_init.yaml create mode 100644 v2/ONDC:RET10/on_search.yaml create mode 100644 v2/ONDC:RET10/on_select.yaml create mode 100644 v2/ONDC:RET10/on_status.yaml create mode 100644 v2/ONDC:RET10/on_update.yaml create mode 100644 v2/ONDC:RET10/operations/req_body.yaml create mode 100644 v2/ONDC:RET10/payloads/confirm.yaml create mode 100644 v2/ONDC:RET10/payloads/init.yaml create mode 100644 v2/ONDC:RET10/payloads/on_confirm.yaml create mode 100644 v2/ONDC:RET10/payloads/on_init.yaml create mode 100644 v2/ONDC:RET10/payloads/on_search.yaml create mode 100644 v2/ONDC:RET10/payloads/on_select.yaml create mode 100644 v2/ONDC:RET10/payloads/on_status.yaml create mode 100644 v2/ONDC:RET10/payloads/on_update.yaml create mode 100644 v2/ONDC:RET10/payloads/search.yaml create mode 100644 v2/ONDC:RET10/payloads/select.yaml create mode 100644 v2/ONDC:RET10/payloads/status.yaml create mode 100644 v2/ONDC:RET10/payloads/update.yaml create mode 100644 v2/ONDC:RET10/schema/confirm.yaml create mode 100644 v2/ONDC:RET10/schema/init.yaml create mode 100644 v2/ONDC:RET10/schema/on_confirm.yaml create mode 100644 v2/ONDC:RET10/schema/on_init.yaml create mode 100644 v2/ONDC:RET10/schema/on_search.yaml create mode 100644 v2/ONDC:RET10/schema/on_select.yaml create mode 100644 v2/ONDC:RET10/schema/on_status.yaml create mode 100644 v2/ONDC:RET10/schema/on_update.yaml create mode 100644 v2/ONDC:RET10/schema/search.yaml create mode 100644 v2/ONDC:RET10/schema/select.yaml create mode 100644 v2/ONDC:RET10/schema/status.yaml create mode 100644 v2/ONDC:RET10/schema/update.yaml create mode 100644 v2/ONDC:RET10/search.yaml create mode 100644 v2/ONDC:RET10/select.yaml create mode 100644 v2/ONDC:RET10/status.yaml create mode 100644 v2/ONDC:RET10/template/confirm.yaml create mode 100644 v2/ONDC:RET10/template/init.yaml create mode 100644 v2/ONDC:RET10/template/on_confirm.yaml create mode 100644 v2/ONDC:RET10/template/on_init.yaml create mode 100644 v2/ONDC:RET10/template/on_search.yaml create mode 100644 v2/ONDC:RET10/template/on_select.yaml create mode 100644 v2/ONDC:RET10/template/on_status.yaml create mode 100644 v2/ONDC:RET10/template/on_update.yaml create mode 100644 v2/ONDC:RET10/template/search.yaml create mode 100644 v2/ONDC:RET10/template/select.yaml create mode 100644 v2/ONDC:RET10/template/status.yaml create mode 100644 v2/ONDC:RET10/template/update.yaml create mode 100644 v2/ONDC:RET10/update.yaml create mode 100644 v2/ONDC:RET10/v2.yaml diff --git a/Dockerfile b/Dockerfile index f9ab503..965a655 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,4 @@ COPY package.json . COPY . . RUN npm install EXPOSE 5500 -CMD ["node","app.js","./on_demand.yaml"] +CMD ["node","app.js","./v1.yaml"] diff --git a/app.js b/app.js index 39087a4..a73f5cf 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,7 @@ const express = require("express"); const log = require("./utils/logger"); const app = express(); -var https = require('https'); +var http = require('http'); const config = require("./utils/config.js"); const router = require("./routes/route"); @@ -197,7 +197,7 @@ async function createCollectionItem(requestName, requestPayload, method) { name: `${requestName}`, request: { header: createRequestHeader(), - url: `https://localhost:5500/${requestName}`, + url: `http://localhost:5500/${requestName}`, method: method, body: { mode: "raw", @@ -232,15 +232,18 @@ async function generatePostmanCollecion(postmanCollection, generateCollection) { var folderPath; async function createInstructionSet(file) { + console.log("createInstructionSet"); try { if (args[0]) { - const path = args[0]; - const file = `./${path}/${path}.yaml`; + // const path = args[0]; + // const file = `./${path}/${path}.yaml`; + const file = `server.yaml`; startUp(file); } else{ + console.log("build.yaml file not provided"); const buildFile = await baseYMLFile(file); const examples = buildFile["x-examples"]; const paths = buildFile["paths"]; @@ -332,7 +335,7 @@ async function startUp(file) { }; app.use(express.json()); const logger = log.init(); - https.createServer(options, app).listen(server.port, () => { + http.createServer(options, app).listen(server.port, () => { logger.info(`This app is running on port number : ${server.port}`); }); // app.listen(server.port, () => { diff --git a/b2b_collection.json b/b2b_collection.json new file mode 100644 index 0000000..324bcbe --- /dev/null +++ b/b2b_collection.json @@ -0,0 +1 @@ +{"item":[{"id":"4defd3c0-9cbb-4b77-a09b-2a07b44b4741","name":"search","request":{"url":{"protocol":"http","port":"5500","path":["search"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"search\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:00.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"intent\":{\"item\":{\"descriptor\":{\"name\":\"oil\"}},\"fulfillment\":{\"type\":\"Delivery\",\"stops\":[{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"area_code\":\"680230\"}},{\"type\":\"end\",\"location\":{\"gps\":\"1.3813081446741677, 103.74788789072721\",\"area_code\":\"680207\"}},{\"type\":\"end\",\"location\":{\"gps\":\"1.3826059101531494, 103.743617819222\",\"area_code\":\"680354\"}}]},\"payment\":{\"type\":\"ON-FULFILLMENT\"},\"tags\":[{\"descriptor\":{\"code\":\"bap_terms\"},\"list\":[{\"descriptor\":{\"code\":\"finder_fee_type\"},\"value\":\"percent\"},{\"descriptor\":{\"code\":\"finder_fee_amount\"},\"value\":\"0\"}]},{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}]}}}"}},"response":[],"event":[]},{"id":"2f939c48-ea83-49d1-8b06-a0145bffe86a","name":"select","request":{"url":{"protocol":"http","port":"5500","path":["select"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"select\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"provider\":{\"id\":\"P1\",\"locations\":[{\"id\":\"L1\"}],\"ttl\":\"P1D\"},\"items\":[{\"id\":\"I1\",\"location_ids\":[\"L1\"],\"quantity\":{\"selected\":{\"count\":200}},\"tags\":[{\"descriptor\":{\"code\":\"BUYER_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"ITEM_REQ\"},\"value\":\"free text on Item Customization\"},{\"descriptor\":{\"code\":\"PACKAGING_REQ\"},\"value\":\"free text on packaging Customization\"}]}]}],\"fulfillments\":[{\"stops\":[{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"area_code\":\"680230\"}}],\"customer\":{\"person\":{\"creds\":[{\"id\":\"ESG-12345678\",\"type\":\"License\",\"url\":\"http://abcd.dnb.com/verify?id=ESG-12345678\"}]}},\"tags\":[{\"descriptor\":{\"code\":\"DELIVERY_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"INCOTERMS\"},\"value\":\"CIF\"},{\"descriptor\":{\"code\":\"DELIVERY_DUTY\"},\"value\":\"DDP\"}]}]}],\"payments\":[{\"type\":\"ON-FULFILLMENT\"}],\"tags\":[{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}]}}}"}},"response":[],"event":[]},{"id":"1ad8d160-cbba-41fd-b50e-48dc676ff99a","name":"init","request":{"url":{"protocol":"http","port":"5500","path":["init"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"init\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"provider\":{\"id\":\"P1\",\"locations\":[{\"id\":\"L1\"}],\"ttl\":\"P1D\"},\"items\":[{\"id\":\"I1\",\"fulfillment_ids\":[\"F1\"],\"quantity\":{\"selected\":{\"count\":200}},\"tags\":[{\"descriptor\":{\"code\":\"BUYER_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"ITEM_REQ\"},\"value\":\"free text on Item Customization\"},{\"descriptor\":{\"code\":\"PACKAGING_REQ\"},\"value\":\"free text on packaging Customization\"}]}]}],\"billing\":{\"name\":\"ONDC buyer\",\"address\":\"B005 aaspire heights, Jurong East, SGP, 680230\",\"state\":{\"name\":\"Jurong East\"},\"city\":{\"name\":\"Jurong East\"},\"tax_id\":\"XXXXXXXXXXXXXXX\",\"email\":\"nobody@nomail.com\",\"phone\":\"9886098860\"},\"fulfillments\":[{\"id\":\"F1\",\"type\":\"Delivery\",\"stops\":[{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"address\":\"My House #, My buildin\",\"city\":{\"name\":\"Jurong East\"},\"country\":{\"code\":\"SGP\"},\"area_code\":\"680230\",\"state\":{\"name\":\"\"}},\"contact\":{\"phone\":\"9886098860\"}}],\"customer\":{\"person\":{\"creds\":[{\"id\":\"ESG-12345678\",\"type\":\"License\",\"url\":\"http://abcd.dnb.com/verify?id=ESG-12345678\"}]}},\"tags\":[{\"descriptor\":{\"code\":\"DELIVERY_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"INCOTERMS\"},\"value\":\"CIF\"},{\"descriptor\":{\"code\":\"DELIVERY_DUTY\"},\"value\":\"DDP\"}]}]}],\"payments\":[{\"type\":\"ON-FULFILLMENT\"}],\"tags\":[{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}]}}}"}},"response":[],"event":[]},{"id":"957554dc-96cd-4f0b-9f3b-1827886441bb","name":"confirm","request":{"url":{"protocol":"http","port":"5500","path":["confirm"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"confirm\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"id\":\"O1\",\"status\":\"ACTIVE\",\"provider\":{\"id\":\"P1\",\"locations\":[{\"id\":\"L1\"}]},\"items\":[{\"id\":\"I1\",\"fulfillment_ids\":[\"F1\"],\"quantity\":{\"selected\":{\"count\":200}},\"add_ons\":[{\"id\":\"78787723\"}],\"tags\":[{\"descriptor\":{\"code\":\"BUYER_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"ITEM_REQ\"},\"value\":\"free text on Item Customization\"},{\"descriptor\":{\"code\":\"PACKAGING_REQ\"},\"value\":\"free text on packaging Customization\"}]}]}],\"billing\":{\"name\":\"ONDC buyer\",\"address\":\"B005 aaspire heights, Jurong East, SGP, 680230\",\"state\":{\"name\":\"Jurong East\"},\"city\":{\"name\":\"Jurong East\"},\"tax_id\":\"XXXXXXXXXXXXXXX\",\"email\":\"nobody@nomail.com\",\"phone\":\"9886098860\"},\"fulfillments\":[{\"id\":\"F1\",\"type\":\"Delivery\",\"tracking\":false,\"stops\":[{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"address\":\"My House #, My buildin\",\"city\":{\"name\":\"Jurong East\"},\"country\":{\"code\":\"SGP\"},\"area_code\":\"680230\",\"state\":{\"name\":\"\"}},\"contact\":{\"phone\":\"9886098860\",\"email\":\"nobody@nomail.com\"}}],\"customer\":{\"person\":{\"name\":\"Ramu\"}},\"tags\":[{\"descriptor\":{\"code\":\"DELIVERY_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"INCOTERMS\"},\"value\":\"CIF\"},{\"descriptor\":{\"code\":\"DELIVERY_DUTY\"},\"value\":\"DDP\"}]}]}],\"quote\":{\"price\":{\"currency\":\"INR\",\"value\":\"53600\"},\"breakup\":[{\"@ondc/org/item_id\":\"I1\",\"@ondc/org/item_quantity\":{\"count\":200},\"title\":\"Dhara Mustard Oil\",\"@ondc/org/title_type\":\"item\",\"price\":{\"currency\":\"INR\",\"value\":\"50000\"},\"item\":{\"price\":{\"currency\":\"INR\",\"value\":\"250\"}}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Delivery charges\",\"@ondc/org/title_type\":\"delivery\",\"price\":{\"currency\":\"INR\",\"value\":\"4000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Packing charges\",\"@ondc/org/title_type\":\"packing\",\"price\":{\"currency\":\"INR\",\"value\":\"500\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Tax\",\"@ondc/org/title_type\":\"tax\",\"price\":{\"currency\":\"INR\",\"value\":\"0\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Discount\",\"@ondc/org/title_type\":\"discount\",\"price\":{\"currency\":\"INR\",\"value\":\"-1000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Convenience Fee\",\"@ondc/org/title_type\":\"misc\",\"price\":{\"currency\":\"INR\",\"value\":\"100\"}}],\"ttl\":\"P1D\"},\"payments\":[{\"params\":{\"currency\":\"INR\",\"transaction_id\":\"3937\",\"amount\":\"53600\"},\"status\":\"NOT-PAID\",\"type\":\"ON-ORDER\",\"collected_by\":\"BPP\",\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"0\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"buyer-app\",\"settlement_phase\":\"sale-amount\",\"settlement_type\":\"upi\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"beneficiary_name\":\"xxxxx\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}],\"tags\":[{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}],\"created_at\":\"2023-02-03T09:30:00.000Z\",\"updated_at\":\"2023-02-03T09:30:00.000Z\"}}}"}},"response":[],"event":[]},{"id":"f89add08-7aca-4781-8570-bc75df197a9c","name":"update","request":{"url":{"protocol":"http","port":"5500","path":["update"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"update\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"update_target\":\"item\",\"order\":{\"id\":\"O1\",\"status\":\"ACTIVE\",\"provider\":{\"id\":\"P1\"},\"items\":[{\"id\":\"I1\",\"quantity\":{\"selected\":{\"count\":200}}}],\"payments\":[{\"url\":\"http://ondc.transaction.com/payment\",\"tl_method\":\"http/get\",\"params\":{\"currency\":\"INR\",\"transaction_id\":\"3937\",\"amount\":\"53600\"},\"status\":\"PAID\",\"type\":\"ON-ORDER\",\"collected_by\":\"BPP\",\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"0\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"buyer-app\",\"settlement_phase\":\"sale-amount\",\"settlement_type\":\"upi\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"beneficiary_name\":\"xxxxx\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}]}}}"}},"response":[],"event":[]},{"id":"f31d6e0a-502b-4c94-8b9c-f3d0c74e3262","name":"status","request":{"url":{"protocol":"http","port":"5500","path":["status"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"status\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order_id\":\"O1\"}}"}},"response":[],"event":[]},{"id":"cbdee6d4-26f0-429b-bfb2-9e3589cebb4e","name":"on_search","request":{"url":{"protocol":"http","port":"5500","path":["on_search"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_search\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"catalog\":{\"fulfillments\":[{\"id\":\"1\",\"type\":\"Delivery\"},{\"id\":\"2\",\"type\":\"Self-Pickup\"}],\"payments\":[{\"id\":\"1\",\"type\":\"ON-ORDER\"},{\"id\":\"2\",\"type\":\"ON-FULFILLMENT\"},{\"id\":\"3\",\"type\":\"POST-FULFILLMENT\"}],\"descriptor\":{\"name\":\"ABC store\",\"short_desc\":\"Online eCommerce Store\",\"long_desc\":\"Online eCommerce Store\",\"images\":[{\"url\":\"http://abc.com/images/1-shop-img\"}]},\"providers\":[{\"id\":\"P1\",\"descriptor\":{\"name\":\"ABC store\",\"code\":\"P001\",\"short_desc\":\"ABC store\",\"long_desc\":\"ABC store\",\"additional_desc\":{\"url\":\"chat link\",\"content_type\":\"text/html\"},\"images\":[{\"url\":\"http://abc.com/images/1-shop-img\"}]},\"rating\":\"4.4\",\"ttl\":\"86400\",\"locations\":[{\"id\":\"L1\",\"gps\":\"12.967555,77.749666\",\"address\":\"Jayanagar 4th Block\",\"city\":{\"code\":\"std:080\",\"name\":\"Bengaluru\"},\"state\":{\"code\":\"KA\"},\"country\":{\"code\":\"IND\"},\"area_code\":\"560076\"}],\"creds\":[{\"id\":\"ESG-12345678\",\"type\":\"License\",\"desc\":\"Export License No. ESG-12345678\",\"url\":\"http://abcd.cdn.com/images/license-img\"}],\"tags\":[{\"descriptor\":{\"code\":\"serviceability\"},\"list\":[{\"descriptor\":{\"code\":\"location\"},\"value\":\"L1\"},{\"descriptor\":{\"code\":\"category\"},\"value\":\"RET10-1042\"},{\"descriptor\":{\"code\":\"type\"},\"value\":\"12\"},{\"descriptor\":{\"code\":\"val\"},\"value\":\"SGP\"},{\"descriptor\":{\"code\":\"unit\"},\"value\":\"country\"}]},{\"descriptor\":{\"code\":\"seller_terms\"},\"list\":[{\"descriptor\":{\"code\":\"gst_credit_invoice\"},\"value\":\"Y\"}]},{\"descriptor\":{\"code\":\"seller_id\"},\"list\":[{\"descriptor\":{\"code\":\"seller_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"seller_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}],\"items\":[{\"id\":\"I1\",\"parent_item_id\":\"PI1\",\"descriptor\":{\"name\":\"Dhara Mustard Oil\",\"code\":\"UPC / EAN code\",\"short_desc\":\"Dhara refined mustard oil\",\"long_desc\":\"Dhara refined mustard oil\",\"images\":[{\"url\":\"http://abc.com/images/207.png\"}],\"media\":[{\"mimetype\":\"video/mp4\",\"url\":\"http://video_url.com\"}]},\"creator\":{\"descriptor\":{\"name\":\"Mother Dairy\"},\"contact\":{\"phone\":\"18001801018\",\"email\":\"consumer.services@motherdairy.com\"}},\"price\":{\"currency\":\"INR\",\"value\":\"300.00\",\"offered_value\":\"250.00\",\"maximum_value\":\"350.00\"},\"quantity\":{\"unitized\":{\"measure\":{\"unit\":\"millilitre\",\"value\":\"500\"}},\"available\":{\"measure\":{\"unit\":\"millilitre\",\"value\":\"500\"},\"count\":2000},\"maximum\":{\"measure\":{\"unit\":\"millilitre\",\"value\":\"500\"},\"count\":4000}},\"category_ids\":[\"RET10-1042\"],\"fulfillment_ids\":[\"1\"],\"location_ids\":[\"L1\"],\"payment_ids\":[\"2\"],\"add_ons\":[{\"id\":\"78787723\",\"descriptor\":{\"name\":\"Dhara Sunflower Oil\",\"short_desc\":\"Dhara Sunflower Oil\",\"long_desc\":\"Dhara Sunflower Oil\",\"images\":[{\"url\":\"http://abc.com/images/208.png\"}]},\"price\":{\"currency\":\"INR\",\"value\":\"170.0\",\"offered_value\":\"100.0\",\"maximum_value\":\"170.0\"}}],\"cancellation_terms\":[{\"fulfillment_state\":{\"descriptor\":{\"code\":\"Pending\"}}},{\"fulfillment_state\":{\"descriptor\":{\"code\":\"Packed\"}}},{\"fulfillment_state\":{\"descriptor\":{\"code\":\"Order-delivered\"}}}],\"time\":{\"label\":\"validity\",\"range\":{\"start\":\"2022-12-24T00:00:00.000Z\",\"end\":\"2022-12-31T00:00:00.000Z\"}},\"matched\":true,\"recommended\":true,\"tags\":[{\"descriptor\":{\"code\":\"origin\"},\"list\":[{\"descriptor\":{\"code\":\"country\"},\"value\":\"IND\"}]},{\"descriptor\":{\"code\":\"image\"},\"list\":[{\"descriptor\":{\"code\":\"type\"},\"value\":\"back_image\"},{\"descriptor\":{\"code\":\"url\"},\"value\":\"http://sellerNP.com/images/i1_back_image.png\"}]},{\"descriptor\":{\"code\":\"veg_nonveg\"},\"list\":[{\"descriptor\":{\"code\":\"veg\"},\"value\":\"yes\"}]},{\"descriptor\":{\"code\":\"variant\"},\"list\":[{\"descriptor\":{\"code\":\"variant_group_id\"},\"value\":\"V1\"},{\"descriptor\":{\"code\":\"variant_attr\"},\"value\":\"quantity.unitized.measure\"}]},{\"descriptor\":{\"code\":\"variant_seq\"},\"list\":[{\"descriptor\":{\"code\":\"variant_attr\"},\"value\":\"quantity.unitized.measure\"},{\"descriptor\":{\"code\":\"seq\"},\"value\":\"1\"}]},{\"descriptor\":{\"code\":\"g2\"},\"list\":[{\"descriptor\":{\"code\":\"time_to_ship\"},\"value\":\"P1D\"},{\"descriptor\":{\"code\":\"tax_rate\"},\"value\":\"12\"}]},{\"descriptor\":{\"code\":\"g3\"},\"list\":[{\"descriptor\":{\"code\":\"brand\"},\"value\":\"Dhara\"},{\"descriptor\":{\"code\":\"pack_size\"},\"value\":\"5\"},{\"descriptor\":{\"code\":\"num_price_slabs\"},\"value\":\"3\"}]},{\"descriptor\":{\"code\":\"price_slab\"},\"list\":[{\"descriptor\":{\"code\":\"min_pack_size\"},\"value\":\"1\"},{\"descriptor\":{\"code\":\"max_pack_size\"},\"value\":\"4\"},{\"descriptor\":{\"code\":\"unit_sale_price\"},\"value\":\"250\"}]},{\"descriptor\":{\"code\":\"price_slab\"},\"list\":[{\"descriptor\":{\"code\":\"min_pack_size\"},\"value\":\"5\"},{\"descriptor\":{\"code\":\"max_pack_size\"},\"value\":\"9\"},{\"descriptor\":{\"code\":\"unit_sale_price\"},\"value\":\"200\"}]},{\"descriptor\":{\"code\":\"price_slab\"},\"list\":[{\"descriptor\":{\"code\":\"min_pack_size\"},\"value\":\"10\"},{\"descriptor\":{\"code\":\"max_pack_size\"},\"value\":\"\"},{\"descriptor\":{\"code\":\"unit_sale_price\"},\"value\":\"175\"}]},{\"descriptor\":{\"code\":\"FSSAI_LICENSE_NO\"},\"list\":[{\"descriptor\":{\"code\":\"BRAND_OWNER\"},\"value\":\"12345678901234\"},{\"descriptor\":{\"code\":\"OTHER\"},\"value\":\"12345678901234\"},{\"descriptor\":{\"code\":\"IMPORTER\"},\"value\":\"12345678901234\"}]}]}],\"offers\":[{\"id\":\"offer-1\",\"descriptor\":{\"name\":\"Dhara Olive Oil\",\"code\":\"FREEBIE\",\"short_desc\":\"Dhara Olive Oil\",\"long_desc\":\"Dhara Olive Oil\",\"images\":[{\"url\":\"http://abc.com/images/207.png\"}]},\"location_ids\":[],\"category_ids\":[],\"item_ids\":[],\"time\":{\"label\":\"validity\",\"range\":{\"start\":\"2023-01-08T00:00:00.000Z\",\"end\":\"2023-01-15T00:00:00.000Z\"}}}],\"fulfillments\":[{\"contact\":{\"phone\":\"9886098860\",\"email\":\"abc@xyz.com\"}}]}]}}}"}},"response":[],"event":[]},{"id":"8dada573-fd7e-4851-b729-c5b581bdd957","name":"on_select","request":{"url":{"protocol":"http","port":"5500","path":["on_select"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_select\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"provider\":{\"id\":\"P1\"},\"items\":[{\"fulfillment_ids\":[\"F1\"],\"id\":\"I1\"}],\"fulfillments\":[{\"id\":\"F1\",\"@ondc/org/provider_name\":\"Loadshare\",\"tracking\":false,\"@ondc/org/category\":\"Express Delivery\",\"@ondc/org/TAT\":\"P7D\",\"state\":{\"descriptor\":{\"code\":\"Serviceable\"}}}],\"quote\":{\"price\":{\"currency\":\"INR\",\"value\":\"53600\"},\"breakup\":[{\"@ondc/org/item_id\":\"I1\",\"@ondc/org/item_quantity\":{\"count\":200},\"title\":\"Dhara Mustard Oil\",\"@ondc/org/title_type\":\"item\",\"price\":{\"currency\":\"INR\",\"value\":\"50000\"},\"item\":{\"quantity\":{\"available\":{\"count\":200},\"maximum\":{\"count\":200}},\"price\":{\"currency\":\"INR\",\"value\":\"250\"}}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Delivery charges\",\"@ondc/org/title_type\":\"delivery\",\"price\":{\"currency\":\"INR\",\"value\":\"4000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Packing charges\",\"@ondc/org/title_type\":\"packing\",\"price\":{\"currency\":\"INR\",\"value\":\"500\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Tax\",\"@ondc/org/title_type\":\"tax\",\"price\":{\"currency\":\"INR\",\"value\":\"0\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Discount\",\"@ondc/org/title_type\":\"discount\",\"price\":{\"currency\":\"INR\",\"value\":\"-1000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Convenience Fee\",\"@ondc/org/title_type\":\"misc\",\"price\":{\"currency\":\"INR\",\"value\":\"100\"}}],\"ttl\":\"P1D\"}}}}"}},"response":[],"event":[]},{"id":"4d60fe71-4d81-4f42-967f-4853eaa82029","name":"on_init","request":{"url":{"protocol":"http","port":"5500","path":["on_init"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_init\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"provider\":{\"id\":\"P1\"},\"items\":[{\"id\":\"I1\",\"fulfillment_ids\":[\"F1\"],\"quantity\":{\"selected\":{\"count\":200}},\"add_ons\":[{\"id\":\"78787723\"}],\"tags\":[{\"descriptor\":{\"code\":\"BUYER_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"ITEM_REQ\"},\"value\":\"free text on Item Customization\"},{\"descriptor\":{\"code\":\"PACKAGING_REQ\"},\"value\":\"free text on packaging Customization\"}]}]}],\"billing\":{\"name\":\"ONDC buyer\",\"address\":\"B005 aaspire heights, Jurong East, SGP, 680230\",\"state\":{\"name\":\"Jurong East\"},\"city\":{\"name\":\"Jurong East\"},\"tax_id\":\"XXXXXXXXXXXXXXX\",\"email\":\"nobody@nomail.com\",\"phone\":\"9886098860\"},\"fulfillments\":[{\"id\":\"F1\",\"type\":\"Delivery\",\"tracking\":false,\"stops\":[{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"address\":\"My House #, My buildin\",\"city\":{\"name\":\"Jurong East\"},\"country\":{\"code\":\"SGP\"},\"area_code\":\"680230\",\"state\":{\"name\":\"\"}},\"contact\":{\"phone\":\"9886098860\"}}],\"tags\":[{\"descriptor\":{\"code\":\"DELIVERY_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"INCOTERMS\"},\"value\":\"CIF\"},{\"descriptor\":{\"code\":\"DELIVERY_DUTY\"},\"value\":\"DDP\"}]}]}],\"quote\":{\"price\":{\"currency\":\"INR\",\"value\":\"53600\"},\"breakup\":[{\"@ondc/org/item_id\":\"I1\",\"@ondc/org/item_quantity\":{\"count\":200},\"title\":\"Dhara Mustard Oil\",\"@ondc/org/title_type\":\"item\",\"price\":{\"currency\":\"INR\",\"value\":\"50000\"},\"item\":{\"price\":{\"currency\":\"INR\",\"value\":\"250\"}}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Delivery charges\",\"@ondc/org/title_type\":\"delivery\",\"price\":{\"currency\":\"INR\",\"value\":\"4000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Packing charges\",\"@ondc/org/title_type\":\"packing\",\"price\":{\"currency\":\"INR\",\"value\":\"500\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Tax\",\"@ondc/org/title_type\":\"tax\",\"price\":{\"currency\":\"INR\",\"value\":\"0\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Discount\",\"@ondc/org/title_type\":\"discount\",\"price\":{\"currency\":\"INR\",\"value\":\"-1000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Convenience Fee\",\"@ondc/org/title_type\":\"misc\",\"price\":{\"currency\":\"INR\",\"value\":\"100\"}}],\"ttl\":\"P1D\"},\"payments\":[{\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"0\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"buyer-app\",\"settlement_phase\":\"sale-amount\",\"settlement_type\":\"upi\",\"beneficiary_name\":\"xxxxx\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}],\"tags\":[{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}]}}}"}},"response":[],"event":[]},{"id":"6b64e5c7-89c2-4a16-9c2b-093cbf2a5d11","name":"on_confirm","request":{"url":{"protocol":"http","port":"5500","path":["on_confirm"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_confirm\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"id\":\"O1\",\"status\":\"ACTIVE\",\"provider\":{\"id\":\"P1\",\"locations\":[{\"id\":\"L1\"}],\"rateable\":true},\"items\":[{\"id\":\"I1\",\"fulfillment_ids\":[\"F1\"],\"quantity\":{\"selected\":{\"count\":200}},\"add_ons\":[{\"id\":\"78787723\"}],\"tags\":[{\"descriptor\":{\"code\":\"BUYER_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"ITEM_REQ\"},\"value\":\"free text on Item Customization\"},{\"descriptor\":{\"code\":\"PACKAGING_REQ\"},\"value\":\"free text on packaging Customization\"}]}]}],\"billing\":{\"name\":\"ONDC buyer\",\"address\":\"B005 aaspire heights, Jurong East, SGP, 680230\",\"state\":{\"name\":\"Jurong East\"},\"city\":{\"name\":\"Jurong East\"},\"tax_id\":\"XXXXXXXXXXXXXXX\",\"email\":\"nobody@nomail.com\",\"phone\":\"9886098860\"},\"fulfillments\":[{\"id\":\"F1\",\"@ondc/org/provider_name\":\"Loadshare\",\"state\":{\"descriptor\":{\"code\":\"Pending\"}},\"type\":\"Delivery\",\"tracking\":false,\"stops\":[{\"type\":\"start\",\"location\":{\"id\":\"L1\",\"descriptor\":{\"name\":\"ABC Store\"},\"gps\":\"12.956399,77.636803\"},\"time\":{\"range\":{\"start\":\"2023-02-03T10:00:00.000Z\",\"end\":\"2023-02-03T10:30:00.000Z\"}},\"instructions\":{\"name\":\"Status for pickup\",\"short_desc\":\"Pickup Confirmation Code\"},\"contact\":{\"phone\":\"9886098860\",\"email\":\"nobody@nomail.com\"}},{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"address\":\"My House #, My buildin\",\"city\":{\"name\":\"Jurong East\"},\"country\":{\"code\":\"SGP\"},\"area_code\":\"680230\",\"state\":{\"name\":\"\"}},\"contact\":{\"phone\":\"9886098860\"}}],\"rateable\":true,\"tags\":[{\"descriptor\":{\"code\":\"DELIVERY_TERMS\"},\"list\":[{\"descriptor\":{\"code\":\"INCOTERMS\"},\"value\":\"CIF\"},{\"descriptor\":{\"code\":\"DELIVERY_DUTY\"},\"value\":\"DDP\"}]}]}],\"quote\":{\"price\":{\"currency\":\"INR\",\"value\":\"53600\"},\"breakup\":[{\"@ondc/org/item_id\":\"I1\",\"@ondc/org/item_quantity\":{\"count\":200},\"title\":\"Dhara Mustard Oil\",\"@ondc/org/title_type\":\"item\",\"price\":{\"currency\":\"INR\",\"value\":\"50000\"},\"item\":{\"price\":{\"currency\":\"INR\",\"value\":\"250\"}}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Delivery charges\",\"@ondc/org/title_type\":\"delivery\",\"price\":{\"currency\":\"INR\",\"value\":\"4000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Packing charges\",\"@ondc/org/title_type\":\"packing\",\"price\":{\"currency\":\"INR\",\"value\":\"500\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Tax\",\"@ondc/org/title_type\":\"tax\",\"price\":{\"currency\":\"INR\",\"value\":\"0\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Discount\",\"@ondc/org/title_type\":\"discount\",\"price\":{\"currency\":\"INR\",\"value\":\"-1000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Convenience Fee\",\"@ondc/org/title_type\":\"misc\",\"price\":{\"currency\":\"INR\",\"value\":\"100\"}}],\"ttl\":\"P1D\"},\"payments\":[{\"params\":{\"currency\":\"INR\",\"transaction_id\":\"3937\",\"amount\":\"53600\"},\"status\":\"NOT-PAID\",\"type\":\"ON-ORDER\",\"collected_by\":\"BPP\",\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"0\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"seller-app\",\"settlement_phase\":\"sale-amount\",\"beneficiary_name\":\"xxxxx\",\"settlement_type\":\"upi\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}],\"tags\":[{\"descriptor\":{\"code\":\"buyer_id\"},\"list\":[{\"descriptor\":{\"code\":\"buyer_id_code\"},\"value\":\"gst\"},{\"descriptor\":{\"code\":\"buyer_id_no\"},\"value\":\"xxxxxxxxxxxxxxx\"}]}],\"created_at\":\"2023-02-03T09:30:00.000Z\",\"updated_at\":\"2023-02-03T09:31:30.000Z\"}}}"}},"response":[],"event":[]},{"id":"5ea807cd-1ebe-4172-980b-4ebc27f6bf57","name":"on_status","request":{"url":{"protocol":"http","port":"5500","path":["on_status"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_status\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"id\":\"O1\",\"status\":\"ACTIVE\",\"provider\":{\"id\":\"P1\",\"locations\":[{\"id\":\"L1\"}]},\"items\":[{\"id\":\"I1\",\"fulfillment_ids\":[\"F1\"],\"quantity\":{\"selected\":{\"count\":200}}}],\"billing\":{\"name\":\"ONDC buyer\",\"address\":\"B005 aaspire heights, Jurong East, SGP, 680230\",\"state\":{\"name\":\"Jurong East\"},\"city\":{\"name\":\"Jurong East\"},\"email\":\"nobody@nomail.com\",\"phone\":\"9886098860\"},\"fulfillments\":[{\"id\":\"F1\",\"@ondc/org/provider_name\":\"Loadshare\",\"type\":\"Delivery\",\"tracking\":false,\"state\":{\"descriptor\":{\"code\":\"Pending\"}},\"stops\":[{\"type\":\"start\",\"location\":{\"id\":\"L1\",\"descriptor\":{\"name\":\"ABC Store\",\"images\":[{\"url\":\"http://gf-integration/images/5.png\"}]},\"gps\":\"12.956399,77.636803\"},\"time\":{\"range\":{\"start\":\"2023-02-03T10:00:00.000Z\",\"end\":\"2023-02-03T10:30:00.000Z\"},\"timestamp\":\"2023-02-03T10:25:00.000Z\"},\"instructions\":{\"name\":\"Proof of pickup\",\"short_desc\":\"Proof of pickup details\",\"long_desc\":\"Proof of pickup details\",\"images\":[{\"url\":\"http://image1_url.png\"}]},\"contact\":{\"phone\":\"9886098860\",\"email\":\"nobody@nomail.com\"}},{\"type\":\"end\",\"location\":{\"gps\":\"1.3806217468119772, 103.74636438437074\",\"address\":\"My House #, My buildin\",\"city\":{\"name\":\"Jurong East\"},\"country\":{\"code\":\"SGP\"},\"area_code\":\"680230\",\"state\":{\"name\":\"\"}},\"time\":{\"range\":{\"start\":\"2023-02-03T11:00:00.000Z\",\"end\":\"2023-02-03T11:30:00.000Z\"},\"timestamp\":\"2023-02-03T11:35:00.000Z\"},\"instructions\":{\"name\":\"Proof of delivery\",\"short_desc\":\"Proof of delivery details\",\"long_desc\":\"Proof of delivery details\",\"images\":[{\"url\":\"http://image1_url.png\"}]},\"contact\":{\"phone\":\"9886098860\"}}]}],\"quote\":{\"price\":{\"currency\":\"INR\",\"value\":\"53600\"},\"breakup\":[{\"@ondc/org/item_id\":\"I1\",\"@ondc/org/item_quantity\":{\"count\":200},\"title\":\"Dhara Mustard Oil\",\"@ondc/org/title_type\":\"item\",\"price\":{\"currency\":\"INR\",\"value\":\"50000\"},\"item\":{\"price\":{\"currency\":\"INR\",\"value\":\"250\"}}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Delivery charges\",\"@ondc/org/title_type\":\"delivery\",\"price\":{\"currency\":\"INR\",\"value\":\"4000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Packing charges\",\"@ondc/org/title_type\":\"packing\",\"price\":{\"currency\":\"INR\",\"value\":\"500\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Tax\",\"@ondc/org/title_type\":\"tax\",\"price\":{\"currency\":\"INR\",\"value\":\"0\"}},{\"@ondc/org/item_id\":\"I1\",\"title\":\"Discount\",\"@ondc/org/title_type\":\"discount\",\"price\":{\"currency\":\"INR\",\"value\":\"-1000\"}},{\"@ondc/org/item_id\":\"F1\",\"title\":\"Convenience Fee\",\"@ondc/org/title_type\":\"misc\",\"price\":{\"currency\":\"INR\",\"value\":\"100\"}}],\"ttl\":\"P1D\"},\"payments\":[{\"url\":\"http://ondc.transaction.com/payment\",\"tl_method\":\"http/get\",\"params\":{\"currency\":\"INR\",\"transaction_id\":\"3937\",\"amount\":\"53600\"},\"status\":\"PAID\",\"type\":\"ON-ORDER\",\"collected_by\":\"BAP\",\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"3\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"seller-app\",\"settlement_phase\":\"sale-amount\",\"beneficiary_name\":\"xxxxx\",\"settlement_reference\":\"XXXX\",\"settlement_status\":\"PAID\",\"settlement_timestamp\":\"2023-02-04T10:00:00.000Z\",\"settlement_type\":\"upi\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}],\"created_at\":\"2023-02-03T09:30:00.000Z\",\"updated_at\":\"2023-02-03T10:00:00.201Z\"}}}"}},"response":[],"event":[]},{"id":"92f38535-e064-4016-a2ad-4b9c88cabf58","name":"on_update","request":{"url":{"protocol":"http","port":"5500","path":["on_update"],"host":["localhost"],"query":[],"variable":[]},"header":[{"key":"Authorization","value":""},{"key":"Content-Type","value":"application/json"},{"key":"cache-control","value":"no-cache"}],"method":"POST","body":{"mode":"raw","raw":"{\"context\":{\"domain\":\"ONDC:RET10\",\"location\":{\"city\":{\"code\":\"std:080\"},\"country\":{\"code\":\"IND\"}},\"action\":\"on_update\",\"version\":\"2.0.1\",\"bap_id\":\"buyerapp.com\",\"bap_uri\":\"http://buyerapp.com/grocery\",\"bpp_id\":\"sellerapp.com\",\"bpp_uri\":\"http://sellerapp.com/grocery\",\"transaction_id\":\"0f851fd5-f585-45b7-a302-90cd891fa2ca\",\"message_id\":\"ff9249f3-2b35-4c3a-8a7d-d4867fbfc905\",\"timestamp\":\"2023-01-08T22:00:30.000Z\",\"ttl\":\"PT30S\"},\"message\":{\"order\":{\"id\":\"O1\",\"status\":\"ACTIVE\",\"provider\":{\"id\":\"P1\"},\"items\":[{\"id\":\"I1\",\"quantity\":{\"selected\":{\"count\":200}}}],\"payments\":[{\"url\":\"http://ondc.transaction.com/payment\",\"tl_method\":\"http/get\",\"params\":{\"currency\":\"INR\",\"transaction_id\":\"3937\",\"amount\":\"53600\"},\"status\":\"PAID\",\"type\":\"ON-ORDER\",\"collected_by\":\"BPP\",\"@ondc/org/buyer_app_finder_fee_type\":\"percent\",\"@ondc/org/buyer_app_finder_fee_amount\":\"0\",\"@ondc/org/settlement_details\":[{\"settlement_counterparty\":\"buyer-app\",\"settlement_phase\":\"sale-amount\",\"settlement_type\":\"upi\",\"upi_address\":\"gft@oksbi\",\"settlement_bank_account_no\":\"XXXXXXXXXX\",\"settlement_ifsc_code\":\"XXXXXXXXX\",\"beneficiary_name\":\"xxxxx\",\"bank_name\":\"xxxx\",\"branch_name\":\"xxxx\"}]}]}}}"}},"response":[],"event":[]}],"event":[],"variable":[],"info":{"_postman_id":"f6833ae5-850b-4a67-b1c4-02d69dc85e3a","name":"Mock Server API","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"}} \ No newline at end of file diff --git a/build/resolved.yaml b/build/resolved.yaml new file mode 100644 index 0000000..b80a626 --- /dev/null +++ b/build/resolved.yaml @@ -0,0 +1,18376 @@ +info: + description: ONDC Specification + title: ONDC Specification + version: 2.0.0 +openapi: 3.0.0 +x-flows: +- details: + - description: The illustrative flow to perform a transaction of the nature where + in a buyer would like to book an airlines service form airport A to airport + B + mermaid: "sequenceDiagram\n title Airline Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the airline mode of transport + from one airport to another + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for airline services by standard airport codes + value: + context: + action: search + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 7381c78e-1eb4-47bb-96b4-ac2fce74e565 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + descriptor: + code: DEL + time: + label: Date Of Journey + timestamp: '2023-10-15T00:32:19.000Z' + type: START + - location: + descriptor: + code: BOM + type: END + vehicle: + category: AIRLINE + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + reference: if any + summary: Search for the flight by start and end airport code + - api: on_search + details: + - description: Users searches over the network to avail the airline mode of transport + from one airport to another + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK\n end" + example: + summary: Return services available for provided start and end code + value: + context: + action: on_search + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 7381c78e-1eb4-47bb-96b4-ac2fce74e565 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - size_type: xs + url: https://abc-AIRLINE.in/logos/logo.ico + name: ABC Fights Services Solutions + providers: + - categories: + - descriptor: + code: ECONOMY + name: Economy + id: C1 + - descriptor: + code: PREMIUM_ECONOMY + name: Premium Economy + id: C2 + - descriptor: + code: BUSINESS + name: Business + id: C3 + - descriptor: + code: FIRST_CLASS + name: First Class + id: C4 + descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + fulfillments: + - id: F1 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + - id: F2 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + label: DATE_TIME + timestamp: '2023-10-15T21:00:00.000Z' + type: END + - id: S3 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + duration: PT1H + type: LAYOVER + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + - id: F3 + stops: + - id: S1 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + label: DATE_TIME + timestamp: '2023-10-15T22:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BLR + name: Bengaluru + time: + label: DATE_TIME + timestamp: '2023-10-15T23:00:00.000Z' + type: END + - id: S3 + location: + descriptor: + code: BLR + name: Bengaluru + time: + duration: PT1H + type: LAYOVER + type: TRIP + vehicle: + category: AIRLINE + code: 6E285 + - id: F4 + stops: + - id: S1 + location: + descriptor: + code: BLR + name: Bengaluru + time: + label: DATE_TIME + timestamp: '2023-10-15T23:20:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-16T01:00:00.000Z' + type: END + type: TRIP + vehicle: + category: AIRLINE + code: 6E285 + id: P1 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + maximum: + count: 9 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PROHIBITED_ITEMS + name: Prohibited Items + value: list of items + - category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + id: I2 + price: + currency: INR + value: '7280' + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PROHIBITED_ITEMS + name: Prohibited Items + value: list of items + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + fulfillment_ids: + - F2 + id: I3 + parent_item_id: I2 + price: + currency: INR + value: '7280' + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + fulfillment_ids: + - F3 + - F4 + id: I4 + parent_item_id: I3 + price: + currency: INR + value: '7280' + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + reference: if any + summary: Return an airline catalog of all flights services from one airport to + another + - api: search + details: + - description: Users searches over the network to avail the airline mode of transport + from one airport to another + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant Seller\ + \ Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): search\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_search\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Search for airline services by standard airport codes + value: + context: + action: search + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 7381c78e-1eb4-47bb-96b4-ac2fce74e565 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + id: F1 + stops: + - id: S1 + - id: S2 + vehicle: + category: AIRLINE + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + reference: if any + summary: Search for the flight by start and end airport code + - api: on_search + details: + - description: Users searches over the network to avail the airline mode of transport + from one airport to another + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): search\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_search\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return services available for provided start and end code + value: + context: + action: on_search + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 7381c78e-1eb4-47bb-96b4-ac2fce74e565 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - size_type: xs + url: https://abc-AIRLINE.in/logos/logo.ico + name: ABC Fights Services Solutions + providers: + - categories: + - descriptor: + code: ECONOMY + name: Economy + id: C1 + - descriptor: + code: PREMIUM_ECONOMY + name: Premium Economy + id: C2 + - descriptor: + code: BUSINESS + name: Business + id: C3 + - descriptor: + code: FIRST_CLASS + name: First Class + id: C4 + descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + fulfillments: + - id: F1 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A1 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I1 + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + - id: F2 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + label: DATE_TIME + timestamp: '2023-10-15T21:00:00.000Z' + type: END + - id: S3 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + duration: PT1H + type: LAYOVER + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: optional + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A1 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + - id: F3 + stops: + - id: S1 + location: + descriptor: + code: GOI + name: Goa - Dabolim Airport, India + time: + label: DATE_TIME + timestamp: '2023-10-15T22:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BLR + name: Bengaluru + time: + label: DATE_TIME + timestamp: '2023-10-15T23:00:00.000Z' + type: END + - id: S3 + location: + descriptor: + code: BLR + name: Bengaluru + time: + duration: PT1H + type: LAYOVER + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A1 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + type: TRIP + vehicle: + category: AIRLINE + code: 6E285 + - id: F4 + stops: + - id: S1 + location: + descriptor: + code: BLR + name: Bengaluru + time: + label: DATE_TIME + timestamp: '2023-10-15T23:20:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-16T01:00:00.000Z' + type: END + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A1 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I2 + type: TRIP + vehicle: + category: AIRLINE + code: 6E285 + id: P1 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + maximum: + count: 9 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PROHIBITED_ITEMS + name: Prohibited Items + value: list of items + - category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + id: I2 + price: + currency: INR + value: '7280' + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PROHIBITED_ITEMS + name: Prohibited Items + value: list of items + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + fulfillment_ids: + - F2 + id: I3 + parent_item_id: I2 + price: + currency: INR + value: '7280' + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + - descriptor: + code: BAGGAGE + name: Delayed and Lost Baggage Protection + id: A2 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: FAST_FORWARD + name: Fast Forward + short_desc: Get priority check-in & baggage handling services + to save time. + id: A3 + price: + currency: INR + value: '200' + quantity: + available: + count: 1 + - descriptor: + code: TRAVEL_ASSISTANCE + name: Travel Assistance + id: A4 + price: + currency: INR + value: '500' + quantity: + available: + count: 1 + - descriptor: + code: SAVER + name: Saver + id: A5 + price: + currency: INR + value: '9280' + quantity: + available: + count: 1 + - descriptor: + code: FLEXI_PLUS + name: Flexi Plus + id: A6 + price: + currency: INR + value: '9580' + quantity: + available: + count: 1 + - descriptor: + code: FREE_CANCELLATION + name: Free Cancellation + id: A7 + - descriptor: + code: FREE_DATE_CHANGE + name: Free Date Changes + id: A8 + category_ids: + - C1 + descriptor: + code: CONNECT + name: Connect + fulfillment_ids: + - F3 + - F4 + id: I4 + parent_item_id: I3 + price: + currency: INR + value: '7280' + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + reference: if any + summary: Return an airline catalog of all flights services from one airport to + another + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the necesary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Get Quote of a selected item + value: + context: + action: select + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 614730da-eacc-46b8-9799-86f75bf35f31 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - id: S1 + - id: S2 + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: NUMBER + value: A2 + - descriptor: + code: SELECTED + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + vehicle: + category: AIRLINE + items: + - add_ons: + - id: A1 + quantity: + selected: + count: 1 + id: I1 + quantity: + selected: + count: 1 + provider: + id: P1 + reference: if any + summary: Selection of specific service + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Get Quote of a selected item + value: + context: + action: on_select + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 614730da-eacc-46b8-9799-86f75bf35f31 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: SELECTED_SEAT + value: A2 + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + selected: + count: 1 + tags: + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PR + name: Prohibited Items + value: 15 KG + provider: + descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + id: P1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + quote: + breakup: + - price: + currency: INR + value: '9280' + title: BASE_FARE + - price: + currency: INR + value: '464' + title: CGST @ 5% + - price: + currency: INR + value: '464' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - item: + id: A1 + price: + value: '300' + title: Add On + - price: + currency: INR + value: '200' + title: Seat Fare + price: + currency: INR + value: '10727' + reference: if any + summary: Provider platform provides the quote for selected service of airline + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Initialize draft order and request for terms of service + value: + context: + action: init + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: c869bea6-2397-4864-91a2-4d5d8d139ddc + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + phone: +91-9988776655 + tax_id: GSTIN:22AAAAA0000A1Z5 + fulfillments: + - customer: + contact: + email: joeadams@yahoo.com + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - id: S1 + - id: S2 + vehicle: + category: AIRLINE + code: 6E284 + items: + - add_ons: + - id: A1 + quantity: + selected: + count: 1 + id: I1 + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_AMOUNT + value: '10421' + - descriptor: + code: SETTLEMENT_TYPE + value: neft + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return draft order for transit ticket with settlement via payment link + value: + context: + action: on_init + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: c869bea6-2397-4864-91a2-4d5d8d139ddc + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + email: joeadams@yahoo.com + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - id: S1 + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - id: S2 + location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: SELECTED_SEAT + value: A2 + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: 300 + quantity: + available: + count: 1 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + selected: + count: 1 + tags: + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PR + name: Prohibited Items + value: 15 KG + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + - descriptor: + code: SETTLEMENT_AMOUNT + value: '10421' + type: PRE-ORDER + provider: + - descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + id: P1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + quote: + breakup: + - price: + currency: INR + value: '9280' + title: BASE_FARE + - price: + currency: INR + value: '464' + title: CGST @ 5% + - price: + currency: INR + value: '464' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - item: + id: A1 + price: + value: '300' + title: Add On + - price: + currency: INR + value: '200' + title: Seat Fare + price: + currency: INR + value: '10727' + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmation as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Confirm ticket booking + value: + context: + action: confirm + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 2859bc8b-8f40-41ba-bb20-30645596bf7a + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + phone: +91-9988776655 + tax_id: GSTIN:22AAAAA0000A1Z5 + fulfillments: + - customer: + contact: + email: joeadams@yahoo.com + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + vehicle: + category: AIRLINE + code: 6E284 + id: O1 + items: + - add_ons: + - id: A1 + quantity: + selected: + count: 1 + id: I1 + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + params: + amount: '10727' + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_AMOUNT + value: '10421' + - descriptor: + code: SETTLEMENT_TYPE + value: neft + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the booking and provides details. + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey upon confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Confirm ticket booking + value: + context: + action: on_confirm + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 2859bc8b-8f40-41ba-bb20-30645596bf7a + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + documents: + - descriptor: + code: AIRLINE-DOC + long_desc: Download your ticket here + name: PNR Document + short_desc: Download your ticket here + mime_type: application/pdf + url: https://abcoperator.com/manage-booking/pnr/O1.pdf + fulfillments: + - customer: + contact: + email: joeadams@yahoo.com + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: SELECTED_SEAT + value: A2 + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + id: O1 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + selected: + count: 1 + tags: + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PR + name: Prohibited Items + value: 15 KG + payments: + - collected_by: BAP + id: PA1 + params: + amount: '10727' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + - descriptor: + code: SETTLEMENT_AMOUNT + value: '10421' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + id: P1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + quote: + breakup: + - price: + currency: INR + value: '9280' + title: BASE_FARE + - price: + currency: INR + value: '464' + title: CGST @ 5% + - price: + currency: INR + value: '464' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - item: + id: A1 + price: + value: '300' + title: Add On + - price: + currency: INR + value: '200' + title: Seat Fare + price: + currency: INR + value: '10727' + status: ACTIVE + reference: if any + summary: Provider platform confirms the order + - api: cancel + details: + - description: Consumer platform request the provider platform to provide with + latest order status + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): cancel\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_cancel\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + example: + summary: Cancel a transit ticket booking before the cancellation period + value: + context: + action: cancel + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform cancels the request + - api: on_cancel + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): cancel\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_cancel\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return cancelled ticket order with cancellation charges + value: + context: + action: on_cancel + bap_id: example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: example-bpp.com + bpp_uri: https://api.example-bpp.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 2859bc8b-8f40-41ba-bb20-30645596bf7a + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation: + cancelled_by: CONSUMER + time: '2023-10-03T02:00:08.143Z' + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + email: joeadams@yahoo.com + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + location: + descriptor: + code: DEL + name: Delhi + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: START + - location: + descriptor: + code: BOM + name: Mumbai + time: + label: DATE_TIME + timestamp: '2023-10-15T20:00:00.000Z' + type: END + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: SEAT_NUMBER + value: A2 + - descriptor: + code: SELECTED + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '200' + - descriptor: + code: SELECTED_SEAT + value: A2 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: AIRLINE + code: 6E284 + id: O1 + items: + - add_ons: + - descriptor: + code: MEALS + name: meals + id: A1 + price: + currency: INR + value: '300' + quantity: + available: + count: 1 + category_ids: + - C1 + descriptor: + code: NON_STOP + name: Non Stop + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '9280' + quantity: + selected: + count: 1 + tags: + - descriptor: + code: GENERAL_INFO + name: General Info + display: true + list: + - descriptor: + code: CABIN_BAGGAGE + name: Cabin Baggage + short_desc: Allowed limit for cabin baggage + value: 7 KG + - descriptor: + code: CHECK_IN_BAGGAGE + name: Check-in Baggage + short_desc: Allowed limit for checkin baggage + value: 15 KG + - descriptor: + code: PR + name: Prohibited Items + value: 15 KG + payments: + - collected_by: BAP + id: PA1 + params: + amount: '10727' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://operator1.com/logos/logo.ico + name: ABC Operator Fights Services + id: P1 + tags: + - descriptor: + code: FARE_TYPE + name: Fare Type + display: true + list: + - descriptor: + code: REGULAR + - descriptor: + code: STUDENT + - descriptor: + code: SENIOR_CITIZEN + - descriptor: + code: ARMED_FORCES + - descriptor: + code: DOCTORS_NURSES + quote: + breakup: + - price: + currency: INR + value: '9280' + title: BASE_FARE + - price: + currency: INR + value: '464' + title: CGST @ 5% + - price: + currency: INR + value: '464' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - item: + id: A1 + price: + value: '300' + title: Add On + - price: + currency: INR + value: '200' + title: Seat Fare + price: + currency: INR + value: '10727' + refund_terms: + - fulfillment_state: + code: FLIGHT_CANCELLED + name: Flight Cancelled + refund_amount: + currency: INR + value: '10727' + refund_eligible: true + refund_within: + duration: PT1440M + status: CANCELLED + reference: if any + summary: Provider platform accepts/appends the terms of cancellation + summary: Airlines - Code Based Flow +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a metro service form station A to station B + mermaid: "sequenceDiagram\n title Metro Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the metro mode of transport + in the city + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for public transit for city and type of vehicle + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + vehicle: + category: METRO + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + reference: if any + summary: Search for the metro by city + - api: on_search + details: + - description: Provider plateform sends the catalog of all the service that can + be used for transit using metro in the city + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK\n end" + example: + summary: Return a metro catalog of available fulfillments based on search by + city + value: + context: + action: on_search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - url: https://transitsolutions.in/logos/logo.ico + name: Transit Solutions + providers: + - categories: + - descriptor: + code: TICKET + name: Ticket + id: C1 + - descriptor: + code: PASS + name: Pass + id: C2 + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + fulfillments: + - id: F1 + stops: + - instructions: + name: Stop 1 + location: + descriptor: + code: SAMAYPUR_BADLI + gps: 28.744676, 77.138332 + type: START + - instructions: + name: Stop 2 + location: + descriptor: + code: ROHINI_SECTOR18,19 + gps: 28.738416, 77.139132 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: HAIDERPUR_BADLI_MOR + gps: 28.738876, 77.119932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: JAHANGIRPURI + gps: 28.738411, 77.131132 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + code: ADARSH_NAGAR + gps: 28.738176, 77.139932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + short_desc: Change for Pink Line + location: + descriptor: + code: AZADPUR + gps: 28.738426, 77.139932 + type: TRANSIT_STOP + - instructions: + name: Stop 7 + location: + descriptor: + code: MODEL_TOWN + gps: 28.718476, 77.129932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + code: GTB_NAGAR + gps: 28.738576, 77.139532 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + code: VISHWA_VIDYALAYA + gps: 28.731406, 77.131032 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + code: VIDHAN_SABHA + gps: 28.718476, 77.133932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + code: CIVIL_LINES + gps: 28.798416, 77.119902 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + short_desc: Change for Red and Violet Line + location: + descriptor: + code: KASHMERE_GATE + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 13 + location: + descriptor: + code: CHANDNI_CHOWK + gps: 28.738446, 77.139942 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + code: CHAWRI_BAZAR + gps: 28.738477, 77.139937 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Change for Airport Express + location: + descriptor: + code: NEW_DELHI + gps: 28.738276, 77.132932 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + short_desc: Change for Blue Line + location: + descriptor: + code: RAJIV_CHOWK + gps: 28.738436, 77.139332 + type: TRANSIT_STOP + - instructions: + name: Stop 17 + location: + descriptor: + code: PATEL_CHOWK + gps: 28.738126, 77.133432 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + short_desc: Change for Violet Line + location: + descriptor: + code: CENTRAL_SECRETARIAT + gps: 28.732076, 77.1301932 + type: TRANSIT_STOP + - instructions: + name: Stop 19 + location: + descriptor: + code: UDYOG_BHAWAN + gps: 28.611076, 77.212232 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + code: LOK_KALYAN_MARG + gps: 28.738176, 77.139132 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 21 + location: + descriptor: + code: JOR_BAGH + gps: 28.587876, 77.215332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 22 + short_desc: Change for Pink Line + location: + descriptor: + code: DILLI_HAAT_INA + gps: 28.567276, 77.210032 + type: TRANSIT_STOP + - instructions: + name: Stop 23 + location: + descriptor: + code: AIIMS + gps: 28.731976, 77.139032 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 24 + location: + descriptor: + code: GREEN_PARK + gps: 28.558476, 77.202932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 25 + short_desc: Change for Magenta Line + location: + descriptor: + code: HAUZ_KHAS + gps: 28.547912, 77.203132 + type: TRANSIT_STOP + - instructions: + name: Stop 26 + location: + descriptor: + code: MALVIYA_NAGAR + gps: 28.534276, 77.209432 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 27 + location: + descriptor: + code: SAKET + gps: 28.522176, 77.210232 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 28 + location: + descriptor: + code: QUTAB_MINAR + gps: 28.524576, 77.185532 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 29 + location: + descriptor: + code: CHHATARPUR + gps: 28.495976, 77.184832 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 30 + location: + descriptor: + code: SULTANPUR + gps: 28.496776, 77.163432 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 31 + location: + descriptor: + code: GHITORNI + gps: 28.496476, 77.139432 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 32 + location: + descriptor: + code: ARJAN_GARH + gps: 28.480976, 77.125932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 33 + location: + descriptor: + code: GURU_DRONACHARYA + gps: 28.568476, 77.089932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 34 + short_desc: Change for Rapid Metro + location: + descriptor: + code: SIKANDERPUR + gps: 28.778476, 77.199932 + type: TRANSIT_STOP + - instructions: + name: Stop 35 + location: + descriptor: + code: MG_ROAD + gps: 28.418476, 77.133268 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 36 + location: + descriptor: + code: IFFCO_CHOWK + gps: 28.472276, 77.072432 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 37 + location: + descriptor: + code: HUDA_CITY_CENTRE + gps: 28.459276, 77.072532 + type: END + type: ROUTE + - id: F2 + stops: + - instructions: + name: Stop 1 + location: + descriptor: + code: NEW_DELHI + gps: 28.738216, 77.130932 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: SHIVAJI_STADIUM + gps: 28.732276, 77.132132 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + short_desc: Change for Pink Line + location: + descriptor: + code: DHAULA_KUAN + gps: 28.712276, 77.122132 + type: TRANSIT_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DELHI_AEROCITY + gps: 28.712176, 77.122932 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: IGI_AIRPORT + gps: 28.742176, 77.122332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + short_desc: Change for Blue Line + location: + descriptor: + code: DWARKA_SECTOR_21 + gps: 28.742156, 77.122232 + type: TRANSIT_STOP + - instructions: + name: Stop 6 + location: + descriptor: + code: ECC_CENTRE_DWARKA_SECTOR_25 + gps: 28.712176, 77.112332 + type: END + type: ROUTE + vehicle: + category: METRO + id: P1 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + reference: if any + summary: Return a metro catalog of all fulfillments in the city + - api: search + details: + - description: Users searches over the network to avail the metro mode of transport + from one station to another + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for public transit via station code and vehicle type + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + descriptor: + code: SHAHEED_STHAL + type: START + - location: + descriptor: + code: AZADPUR + type: END + vehicle: + category: METRO + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + reference: if any + summary: Search for the metro by station code + - api: on_search + details: + - description: Provider plateform sends the catalog of all the service that can + be used for transit using metro from station A to station B + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK\n end" + example: &id001 + summary: Return a metro catalog of fare products based on station code or gps + based search + value: + context: + action: on_search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - url: https://transitsolutions.in/logos/logo.ico + name: Transit Solutions + providers: + - categories: + - descriptor: + code: TICKET + name: Ticket + id: C1 + - descriptor: + code: PASS + name: Pass + id: C2 + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: HINDON_RIVER + name: Hindon River + gps: 28.686176, 77.442632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + name: Arthala + gps: 28.181276, 77.442332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + name: Mohan Nagar + gps: 28.981276, 77.772332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + name: Shyam Park + gps: 28.620976, 77.046732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + name: Major Mohit Sharma Rajendra Nagar + gps: 28.120976, 77.946732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + location: + descriptor: + name: Raj Bagh + gps: 28.677076, 77.346632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 7 + location: + descriptor: + name: Shaheed Nagar + gps: 28.617076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + name: Dilshad Garden + gps: 28.917076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + name: Jhilmil + gps: 28.897076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + name: Mansarovar Park + gps: 28.117076, 77.116632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + name: Shahdara + gps: 28.127076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + location: + descriptor: + name: Welcome + gps: 28.217076, 77.216632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 13 + location: + descriptor: + name: Seelampur + gps: 28.327076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + name: Shastri Park + gps: 28.427076, 77.446632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + location: + descriptor: + name: Civil Lines + gps: 28.627076, 77.646632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 17 + location: + descriptor: + name: Vidhan Sabha + gps: 28.727076, 77.746632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + location: + descriptor: + name: Vishwavidyalaya + gps: 28.827076, 77.846632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 19 + location: + descriptor: + name: Guru Tegh Bahadur Nagar + gps: 28.927076, 77.946632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + name: Model Town + gps: 28.217076, 77.496632 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + type: TRIP + vehicle: + category: METRO + - id: F2 + stops: + - location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + tags: + - descriptor: + code: TRIP_DETAILS + list: + - descriptor: + code: AVAILABLE_TRIPS + value: '30' + - descriptor: + code: UTILIZED_TRIPS + value: '0' + type: TRIP + vehicle: + category: METRO + id: P1 + items: + - category_ids: + - C1 + descriptor: + code: SJT + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '60' + quantity: + maximum: + count: 6 + minimum: + count: 1 + - category_ids: + - C1 + descriptor: + code: RJT + name: Round Journey Ticket + fulfillment_ids: + - F1 + id: I2 + price: + currency: INR + value: '110' + quantity: + maximum: + count: 6 + minimum: + count: 1 + - category_ids: + - '1' + - '2' + descriptor: + code: Pass + name: Journey Pass + fulfillment_ids: + - F2 + id: I3 + price: + currency: INR + value: '500' + quantity: + maximum: + count: 1 + minimum: + count: 1 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'TRUE' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + reference: if any + summary: Return a metro catalog of all metro service form from one station to + another + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the neccesary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id002 + summary: Get a quote for a fare product selected from a public transit catalog + value: + context: + action: select + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + items: + - id: I1 + quantity: + selected: + count: 2 + provider: + id: P1 + reference: if any + summary: Selection of specific service(Optional) + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id003 + summary: Return a quote offered by a public transit service provider + value: + context: + action: on_select + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: HINDON_RIVER + name: Hindon River + gps: 28.686176, 77.442632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + name: Arthala + gps: 28.181276, 77.442332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + name: Mohan Nagar + gps: 28.981276, 77.772332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + name: Shyam Park + gps: 28.620976, 77.046732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + name: Major Mohit Sharma Rajendra Nagar + gps: 28.120976, 77.946732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + location: + descriptor: + name: Raj Bagh + gps: 28.677076, 77.346632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 7 + location: + descriptor: + name: Shaheed Nagar + gps: 28.617076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + name: Dilshad Garden + gps: 28.917076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + name: Jhilmil + gps: 28.897076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + name: Mansarovar Park + gps: 28.117076, 77.116632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + name: Shahdara + gps: 28.127076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + location: + descriptor: + name: Welcome + gps: 28.217076, 77.216632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 13 + location: + descriptor: + name: Seelampur + gps: 28.327076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + name: Shastri + gps: 28.427076, 77.446632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + location: + descriptor: + name: Civil Lines + gps: 28.627076, 77.646632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 17 + location: + descriptor: + name: Vidhan Sabha + gps: 28.727076, 77.746632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + location: + descriptor: + name: Vishwavidyalaya + gps: 28.827076, 77.846632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 19 + location: + descriptor: + name: Guru Tegh Bahadur Nagar + gps: 28.927076, 77.946632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + name: Model Town + gps: 28.217076, 77.496632 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + vehicle: + category: METRO + items: + - category_ids: + - C1 + descriptor: + code: SJT + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '60' + quantity: + selected: + count: 2 + provider: + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + id: P1 + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '120' + title: Base Fare + price: + currency: INR + value: '60' + reference: if any + summary: Provider platform provides the quote for selected service of metro + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): init\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id004 + summary: Initialize the order by providing billing details + value: + context: + action: init + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + items: + - id: I1 + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_AMOUNT + value: '59' + - descriptor: + code: SETTLEMENT_TYPE + value: neft + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id005 + summary: Return draft order for transit ticket with settlement details + value: + context: + action: on_init + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: HINDON_RIVER + name: Hindon River + gps: 28.686176, 77.442632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + name: Arthala + gps: 28.181276, 77.442332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + name: Mohan Nagar + gps: 28.981276, 77.772332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + name: Shyam Park + gps: 28.620976, 77.046732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + name: Major Mohit Sharma Rajendra Nagar + gps: 28.120976, 77.946732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + location: + descriptor: + name: Raj Bagh + gps: 28.677076, 77.346632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 7 + location: + descriptor: + name: Shaheed Nagar + gps: 28.617076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + name: Dilshad Garden + gps: 28.917076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + name: Jhilmil + gps: 28.897076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + name: Mansarovar Park + gps: 28.117076, 77.116632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + name: Shahdara + gps: 28.127076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + location: + descriptor: + name: Welcome + gps: 28.217076, 77.216632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 13 + location: + descriptor: + name: Seelampur + gps: 28.327076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + name: Shastri + gps: 28.427076, 77.446632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + location: + descriptor: + name: Civil Lines + gps: 28.627076, 77.646632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 17 + location: + descriptor: + name: Vidhan Sabha + gps: 28.727076, 77.746632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + location: + descriptor: + name: Vishwavidyalaya + gps: 28.827076, 77.846632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 19 + location: + descriptor: + name: Guru Tegh Bahadur Nagar + gps: 28.927076, 77.946632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + name: Model Town + gps: 28.217076, 77.496632 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + vehicle: + category: METRO + items: + - category_ids: + - C1 + descriptor: + code: SJT + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '60' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + - descriptor: + code: SETTLEMENT_AMOUNT + value: '59' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + id: P1 + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '120' + title: Base Fare + price: + currency: INR + value: '60' + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmantion as per the terms of order + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer\ + \ Platform (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_confirm\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + example: &id006 + summary: Confirm ticket booking + value: + context: + action: confirm + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + id: 077b248f + items: + - id: I1 + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '120' + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '59' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey on confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer\ + \ Platform (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id007 + summary: Return confirmed ticket order with payment confirmation + value: + context: + action: on_confirm + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + valid_to: '2021-03-23T23:59:59.999Z' + location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: HINDON_RIVER + name: Hindon River + gps: 28.686176, 77.442632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + name: Arthala + gps: 28.181276, 77.442332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + name: Mohan Nagar + gps: 28.981276, 77.772332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + name: Shyam Park + gps: 28.620976, 77.046732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + name: Major Mohit Sharma Rajendra Nagar + gps: 28.120976, 77.946732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + location: + descriptor: + name: Raj Bagh + gps: 28.677076, 77.346632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 7 + location: + descriptor: + name: Shaheed Nagar + gps: 28.617076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + name: Dilshad Garden + gps: 28.917076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + name: Jhilmil + gps: 28.897076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + name: Mansarovar Park + gps: 28.117076, 77.116632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + name: Shahdara + gps: 28.127076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + location: + descriptor: + name: Welcome + gps: 28.217076, 77.216632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 13 + location: + descriptor: + name: Seelampur + gps: 28.327076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + name: Shastri + gps: 28.427076, 77.446632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + location: + descriptor: + name: Civil Lines + gps: 28.627076, 77.646632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 17 + location: + descriptor: + name: Vidhan Sabha + gps: 28.727076, 77.746632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + location: + descriptor: + name: Vishwavidyalaya + gps: 28.827076, 77.846632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 19 + location: + descriptor: + name: Guru Tegh Bahadur Nagar + gps: 28.927076, 77.946632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + name: Model Town + gps: 28.217076, 77.496632 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + vehicle: + category: METRO + id: 077b248f + items: + - category_ids: + - C1 + descriptor: + code: SJT + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '60' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '120' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + - descriptor: + code: SETTLEMENT_AMOUNT + value: '59' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + id: P1 + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '120' + title: Base Fare + price: + currency: INR + value: '60' + status: ACTIVE + reference: if any + summary: Provider platform confirms the order + - api: status + details: + - description: Consumer platform request the provider platform to provide with + latest order status + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): status-Request application\ + \ status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_status - Provide application status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK " + example: &id008 + summary: Get latest status of a transit ticket booking + value: + context: + action: status + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order_id: 077b248f + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status - Provide application status\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id009 + summary: Return transit ticket order with status - Journey Completed + value: + context: + action: on_status + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + bpp_id: api.example-bpp.com + bpp_uri: https://api.example-bpp.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: SHAHEED_STHAL + name: Shaheed Sthal(New Bus Adda) + gps: 28.686576, 77.441632 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: HINDON_RIVER + name: Hindon River + gps: 28.686176, 77.442632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + name: Arthala + gps: 28.181276, 77.442332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + name: Mohan Nagar + gps: 28.981276, 77.772332 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + name: Shyam Park + gps: 28.620976, 77.046732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 5 + location: + descriptor: + name: Major Mohit Sharma Rajendra Nagar + gps: 28.120976, 77.946732 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 6 + location: + descriptor: + name: Raj Bagh + gps: 28.677076, 77.346632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 7 + location: + descriptor: + name: Shaheed Nagar + gps: 28.617076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 8 + location: + descriptor: + name: Dilshad Garden + gps: 28.917076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 9 + location: + descriptor: + name: Jhilmil + gps: 28.897076, 77.146632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 10 + location: + descriptor: + name: Mansarovar Park + gps: 28.117076, 77.116632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 11 + location: + descriptor: + name: Shahdara + gps: 28.127076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 12 + location: + descriptor: + name: Welcome + gps: 28.217076, 77.216632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 13 + location: + descriptor: + name: Seelampur + gps: 28.327076, 77.416632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 14 + location: + descriptor: + name: Shastri + gps: 28.427076, 77.446632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 15 + short_desc: Please Change here for Yellow Line + location: + descriptor: + name: Kashmere Gate + gps: 28.738426, 77.139922 + type: TRANSIT_STOP + - instructions: + name: Stop 16 + location: + descriptor: + name: Civil Lines + gps: 28.627076, 77.646632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 17 + location: + descriptor: + name: Vidhan Sabha + gps: 28.727076, 77.746632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 18 + location: + descriptor: + name: Vishwavidyalaya + gps: 28.827076, 77.846632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 19 + location: + descriptor: + name: Guru Tegh Bahadur Nagar + gps: 28.927076, 77.946632 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 20 + location: + descriptor: + name: Model Town + gps: 28.217076, 77.496632 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: AZADPUR + name: Azadpur + gps: 28.707358, 77.180910 + type: END + vehicle: + category: METRO + id: 077b248f + items: + - category_ids: + - C1 + descriptor: + code: SJT + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '60' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '120' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT30D + - descriptor: + code: SETTLEMENT_BASIS + value: INVOICE_RECEIPT + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: STATIC_TERMS + value: https://api.example-bpp.com/booking/terms + - descriptor: + code: SETTLEMENT_AMOUNT + value: '59' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://delhimetrorail.com/logos/logo.ico + name: Delhi Metro Rail Limited + id: P1 + time: + range: + end: '2023-09-14T23:30:00.000Z' + start: '2023-09-14T05:30:00.000Z' + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '120' + title: Base Fare + price: + currency: INR + value: '60' + status: COMPLETE + reference: if any + summary: Provider platform provides latest order status + summary: Metro - Station Code Based Flow +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a metro service form location A(gps-cordinates) + to localtion B(gps-cordinates) with metro + mermaid: "sequenceDiagram\n title Metro Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK " + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the metro mode of transport + from point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK " + example: + summary: Search for a public mode of transit from a specific position + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/ondc/metro + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 12.923608, 77.614629 + type: START + - location: + gps: 12.934630, 77.615339 + type: END + vehicle: + category: METRO + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://api.example-bap.com/booking/terms + reference: if any + summary: Search for the metro from point A(gps) to point B(gps) + - api: on_search + details: + - description: Provider plateform sends the catalog of all the service that can + be used for transit using metro service form point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n title Metro Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK\n end" + example: *id001 + reference: if any + summary: Return a metro catalog of all metro service form point A(gps) to point + B(gps) + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the neccesary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: *id002 + reference: if any + summary: Selection of specific service(Optional) + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK \n end " + example: *id003 + reference: if any + summary: Provider platform provides the quote for selected service of metro + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + example: *id004 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK \n end" + example: *id005 + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmantion as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: *id006 + reference: if any + summary: Consumer confirms the + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id007 + reference: if any + summary: Provider platform confirms the order + - api: status + details: + - description: Consumer platform request the provider platform to provide with + latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform\ + \ (BPP): ACK " + example: *id008 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): status-Request\ + \ application status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform\ + \ (BPP): ACK\n end" + example: *id009 + reference: if any + summary: Provider platform provides latest order status + summary: Metro - GPS Based Flow +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a mobility service form location A(gps-cordinates) + to localtion B(gps-cordinates) + mermaid: "sequenceDiagram\n title On-Demand Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + steps: + - api: search + details: + - description: Users search over the network to avail a mobility service from + Location A to Location B (GPS) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: &id010 + summary: Search for cab services by pickup and drop location + value: + context: + action: search + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Search for ride + - api: on_search + details: + - description: Provider Platform 1, which is a mobility provider platform, sends + the catalog of all services that can be used for transit from A to B, along + with estimated fare + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end " + example: &id011 + summary: Return a mobility catalog + value: + context: + action: on_search + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee + timestamp: '2023-03-23T04:43:02Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + name: Mobility Servies BPP + providers: + - fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + - id: F2 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + type: DELIVERY + vehicle: + category: CAB + - id: F3 + stops: + - time: + range: + start: '2023-08-23T12:00:40.065Z' + type: DELIVERY + vehicle: + category: CAB + - id: F4 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + type: DELIVERY + vehicle: + category: CAB + - id: F5 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + range: + start: '2023-08-23T12:00:40.065Z' + type: START + type: DELIVERY + vehicle: + category: CAB + id: P1 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + - descriptor: + code: RIDE + name: CAB Economy Ride + fulfillment_ids: + - F1 + id: I2 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + - descriptor: + code: RIDE + name: Scheudled Ride + fulfillment_ids: + - F3 + id: I3 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + - descriptor: + code: RIDE + name: Rental Ride + fulfillment_ids: + - F4 + id: I4 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + - descriptor: + code: RIDE + name: Rental-Scheduled Ride + fulfillment_ids: + - F4 + id: I5 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + locations: + - gps: 12.916468,77.608998 + id: L1 + - gps: 12.916714,77.609298 + id: L2 + - gps: 12.916573,77.615216 + id: L3 + - gps: 12.906857,77.604456 + id: L4 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Get a list of all services from Provider Platform 1 + - api: select + details: + - description: The end consumer has selected a specific service and would like + to obtain a quotation for that service. Since the max_callbacks is set to + 1, the consumer platform will consider only one on_select response for the + quotation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id012 + summary: Get quote for a specific product from a mobility catalog + value: + context: + action: select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDCTRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b + timestamp: '2023-03-23T04:46:45Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: P120S + version: 2.0.0 + message: + order: + items: + - id: I1 + provider: + id: P1 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: The provider platform responds with detailed information and quote + for the specific service that the consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id013 + summary: Return a quote offered by a provider + value: + context: + action: on_select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides the quote for selected service + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: &id014 + summary: Initialize draft order and request for terms of service + value: + context: + action: init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of order and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id015 + summary: Return draft order with payment terms + value: + context: + action: on_init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: The consumer platform confirms the booking and provides all the + required information for confirmation, as per the terms of the order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id016 + summary: Confirm ride booking + value: + context: + action: confirm + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + id: PA1 + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the ride + - api: on_confirm + details: + - description: Provider platform confirms the order and provides ride details + on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id019 + summary: Return confirmed order with latest fulfillment details + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_ASSIGNED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: on_update + details: + - description: Provider platform provides the latest update on ride details to + the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Return updated order with payment status + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + update_target: order.payment + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: The consumer platform requests the provider platform to provide + the latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: &id017 + summary: Get latest fulfillment status of a booking + value: + context: + action: status + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):\ + \ on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id018 + summary: Return order with status - Driver at pickup + value: + context: + action: on_status + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: DRIVER_AT_PICKUP + name: Driver Arrived at Pickup Location + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides latest order status + summary: On-Demand - Assign driver on on-confrim +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a mobility service form location A(gps-cordinates) + to localtion B(gps-cordinates) + mermaid: "sequenceDiagram\n title On-Demand Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + steps: + - api: search + details: + - description: Users search over the network to avail a mobility service from + Location A to Location B (GPS) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: *id010 + reference: if any + summary: Search for ride + - api: on_search + details: + - description: Provider Platform 1, which is a mobility provider platform, sends + the catalog of all services that can be used for transit from A to B, along + with estimated fare + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: *id011 + reference: if any + summary: Get a list of all services from Provider Platform 1 + - api: select + details: + - description: The end consumer has selected a specific service and would like + to obtain a quotation for that service. Since the max_callbacks is set to + 1, the consumer platform will consider only one on_select response for the + quotation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: *id012 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: The provider platform responds with detailed information and quote + for the specific service that the consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id013 + reference: if any + summary: Provider platform provides the quote for selected service + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: *id014 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of order and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id015 + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: The consumer platform confirms the booking and provides all the + required information for confirmation, as per the terms of the order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: *id016 + reference: if any + summary: Consumer confirms the ride + - api: on_confirm + details: + - description: Provider platform confirms the order. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return confirmed order with latest fulfillment details + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: on_update + details: + - description: Provider platform provides the agent details when assigned. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Return updated order with updated agent details + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: jane.doe@example.com + name: Jane Doe + phone: +91-9897867564 + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_ASSIGNED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + update_target: order.fulfillment.agent + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: The consumer platform requests the provider platform to provide + the latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: *id017 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):\ + \ on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: *id018 + reference: if any + summary: Provider platform provides latest order status + summary: On-Demand - Assign driver post on-confrim +- details: + - description: Detailed process of cancelling a ride with soft & confirm status. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant Seller\ + \ Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK \n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): cancel - with soft_cancel request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_cancel\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): cancel - with confirm_cancel request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_cancel\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK " + reference: if any + steps: + - api: on_confirm + details: + - description: Provider platform confirms the order and provides ride details + on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_confirm\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK \n end\n Buyer Platform (BAP)->>Seller Platform (BPP): cancel - with\ + \ soft_cancel request\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_cancel\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: *id019 + reference: if any + summary: Provider platform confirms the order + - api: cancel + details: + - description: Consumer platform requests for cancellation of ride + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK \n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): cancel - with soft_cancel\ + \ request\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_cancel\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + example: + summary: Initiates cancelling a ride with soft cancel status + value: + context: + action: cancel + bap_id: https://api.beckn.juspay.in/pilot/bap/cab/v1 + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: be6a495a-e941-4fbf-9d59-f1e6166cccc8 + timestamp: '2023-03-23T05:15:08Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + cancellation_reason_id: '7' + descriptor: + code: SOFT_CANCEL + name: Ride Cancellation + order_id: O1 + reference: if any + summary: Consumer platform cancels the request + - api: on_cancel + details: + - description: Provider platform accepts the terms of cancel request and provides + with latest order update + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK \n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): cancel - with soft_cancel request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_cancel\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end" + example: + summary: Return current order status after soft-cancel + value: + context: + action: on_cancel + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.icicibank.com/personal-banking/loans/personal-loan + - descriptor: + code: SETTLEMENT_AMOUNT + value: '85' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + - price: + currency: INR + value: '100' + title: CURRENT_FARE_CHARGE + - price: + currency: INR + value: '10' + title: CANCELLATION_CHARGES + price: + currency: INR + value: '86' + ttl: P200S + status: SOFT_CANCEL + reference: if any + summary: Provider platform accepts/appends the terms of cancellation + - api: cancel + details: + - description: Consumer platform requests for cancellation of ride + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): cancel - with confirm_cancel request\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_cancel\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Initiates cancelling a ride with confirm cancel status + value: + context: + action: cancel + bap_id: https://api.beckn.juspay.in/pilot/bap/cab/v1 + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: be6a495a-e941-4fbf-9d59-f1e6166cccc8 + timestamp: '2023-03-23T05:15:08Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + cancellation_reason_id: '7' + descriptor: + code: CONFIRM_CANCEL + name: Ride Cancellation + order_id: O1 + reference: if any + summary: Consumer platform cancels the request + - api: on_cancel + details: + - description: Provider platform accepts the terms of cancel request and provides + with latest order update + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): cancel\ + \ - with confirm_cancel request\n Seller Platform (BPP)-->>Buyer Platform\ + \ (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP):on_cancel\n Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n\ + \ end" + example: + summary: Return current order status after confirm-cancel + value: + context: + action: on_cancel + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CANCELLED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.icicibank.com/personal-banking/loans/personal-loan + - descriptor: + code: SETTLEMENT_AMOUNT + value: '85' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + - price: + currency: INR + value: '100' + title: CURRENT_FARE_CHARGE + price: + currency: INR + value: '86' + ttl: P200S + status: CONFIRM_CANCEL + reference: if any + summary: Provider platform accepts/appends the terms of cancellation + summary: On-Demand - Ride cancel +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a schedule service form location A(gps-cordinates) + to localtion B(gps-cordinates) with timestamp + mermaid: "sequenceDiagram\n title On-Demand Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + steps: + - api: search + details: + - description: Users search over the network to avail a mobility service from + Location A to Location B (GPS) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for on-schedule cab services by pickup and drop location using + timestamp + value: + context: + action: search + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - time: + timestamp: '2023-09-15T00:32:19.000Z' + type: START + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Search for ride + - api: on_search + details: + - description: Provider Platform 1, which is a mobility provider platform, sends + the catalog of all services that can be used for transit from A to B, along + with estimated fare + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: + summary: Return a mobility catalog + value: + context: + action: on_search + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee + timestamp: '2023-03-23T04:43:02Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + name: Mobility Servies BPP + providers: + - fulfillments: + - id: F1 + stops: + - time: + range: + start: '2023-08-23T12:00:40.065Z' + type: DELIVERY + - id: F2 + stops: + - time: + range: + start: '2023-08-23T03:50:40.065Z' + type: DELIVERY + id: P1 + items: + - descriptor: + code: RIDE + name: Scheudled Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + locations: + - gps: 12.916468,77.608998 + id: L1 + - gps: 12.916714,77.609298 + id: L2 + - gps: 12.916573,77.615216 + id: L3 + - gps: 12.906857,77.604456 + id: L4 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Get a list of all services from Provider Platform 1 + - api: select + details: + - description: The end consumer has selected a specific service and would like + to obtain a quotation for that service. Since the max_callbacks is set to + 1, the consumer platform will consider only one on_select response for the + quotation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Get quote for a specific product from a mobility catalog + value: + context: + action: select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDCTRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b + timestamp: '2023-03-23T04:46:45Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: P120S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T13:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + type: DELIVERY + items: + - id: I1 + provider: + id: P1 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: The provider platform responds with detailed information and quote + for the specific service that the consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return a quote offered by a provider(schedule-ride) + value: + context: + action: on_select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T12:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + items: + - descriptor: + code: RIDE + name: Schedule Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides the quote for selected service + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Initialize draft order and request for terms of service(schedule-ride) + value: + context: + action: init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T13:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + vehicle: + category: CAB + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of order and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return draft order with payment terms(schedule-ride) + value: + context: + action: on_init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T13:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - descriptor: + code: RIDE + name: Schedule Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: The consumer platform confirms the booking and provides all the + required information for confirmation, as per the terms of the order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Confirm ride booking(schedule-ride) + value: + context: + action: confirm + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T12:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + id: PA1 + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the ride + - api: on_confirm + details: + - description: Provider platform confirms the order. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return confirmed order with latest fulfillment details(schedule-ride) + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T12:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: Schedule Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: on_update + details: + - description: Provider platform provides the agent details when assigned. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Return updated order with updated agent details(schedule-ride) + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + email: jane.doe@example.com + name: Jane Doe + phone: +91-9897867564 + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_ASSIGNED + stops: + - location: + gps: 13.008935, 77.644408 + time: + timestamp: '2023-08-23T12:00:40.065Z' + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Schedule Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + update_target: order.fulfillment.agent + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: The consumer platform requests the provider platform to provide + the latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: *id017 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: *id018 + reference: if any + summary: Provider platform provides latest order status + summary: On-Demand - Schedule Ride +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to rent a ride for a certain duration of time. + mermaid: "sequenceDiagram\n title On-Demand Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + steps: + - api: search + details: + - description: Users search over the network to avail a mobility service from + Location A for certain duration of time. + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for cab services by pickup and drop location + value: + context: + action: search + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Search for ride + - api: on_search + details: + - description: Provider Platform 1, which is a mobility provider platform, sends + the catalog of all services including the one which can be used for rental + purpose + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: + summary: Return a mobility catalog + value: + context: + action: on_search + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee + timestamp: '2023-03-23T04:43:02Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + name: Mobility Servies BPP + providers: + - fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + type: DELIVERY + vehicle: + category: CAB + - id: F2 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT4H + type: START + type: DELIVERY + vehicle: + category: CAB + id: P1 + items: + - descriptor: + code: RIDE + name: Rental Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + locations: + - gps: 12.916468,77.608998 + id: L1 + - gps: 12.916714,77.609298 + id: L2 + - gps: 12.916573,77.615216 + id: L3 + - gps: 12.906857,77.604456 + id: L4 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Get a list of all services from Provider Platform 1 + - api: select + details: + - description: The end consumer has selected a specific service and would like + to obtain a quotation for that service. Since the max_callbacks is set to + 1, the consumer platform will consider only one on_select response for the + quotation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Get quote for a specific product from a mobility catalog(rental) + value: + context: + action: select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDCTRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b + timestamp: '2023-03-23T04:46:45Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: P120S + version: 2.0.0 + message: + order: + items: + - id: I1 + provider: + id: P1 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: The provider platform responds with detailed information and quote + for the specific service that the consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return a quote offered by a provider + value: + context: + action: on_select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + items: + - descriptor: + code: RIDE + name: Cab Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides the quote for selected service + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Initialize draft order and request for terms of service(rental) + value: + context: + action: init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + vehicle: + category: CAB + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of order and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return draft order with payment terms(rental) + value: + context: + action: on_init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: The consumer platform confirms the booking and provides all the + required information for confirmation, as per the terms of the order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Confirm ride booking(rental) + value: + context: + action: confirm + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + id: PA1 + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the ride + - api: on_confirm + details: + - description: Provider platform confirms the order. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return confirmed order with latest fulfillment details(rental) + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_ASSIGNED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: on_update + details: + - description: Provider platform provides the ride details with updated context. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Return updated order with updated agent details(RENTAL) + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + billing: + email: jane.doe@example.com + name: Jane Doe + phone: +91-9897867564 + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_UPDATED + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT3H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + update_target: order.payment + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: The consumer platform requests the provider platform to provide + the latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: *id017 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP): on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):\ + \ on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return order with status - Driver at pickup(rental) + value: + context: + action: on_status + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: DRIVER_AT_PICKUP + name: Driver Arrived at Pickup Location + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + make: Mahindra + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Cab Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides latest order status + summary: On-Demand - Rental Ride +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to schedule a rental a ride for a certain duration of + time. + mermaid: "sequenceDiagram\n title On-Demand Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + steps: + - api: search + details: + - description: Users search over the network to schedule a rental service from + Location A for certain duration of time. + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for on-schedule cab services by pickup and drop location using + timestamp + value: + context: + action: search + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - time: + duration: PT2H + timestamp: '2023-09-15T00:32:19.000Z' + type: START + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Search for ride + - api: on_search + details: + - description: Provider Platform 1, which is a mobility provider platform, sends + the catalog of all services including the one which can be used for rental + purpose + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: + summary: Return a mobility catalog + value: + context: + action: on_search + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 21e54d3c-9c3b-47c1-aa3b-b0e7b20818ee + timestamp: '2023-03-23T04:43:02Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + name: Mobility Servies BPP + providers: + - fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + range: + start: '2023-08-23T12:00:40.065Z' + type: START + type: DELIVERY + vehicle: + category: CAB + - id: F2 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT3H + range: + start: '2023-08-23T12:00:40.065Z' + type: START + type: DELIVERY + vehicle: + category: CAB + id: P1 + items: + - descriptor: + code: RIDE + name: Rental-Scheduled Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L2 + - L4 + price: + currency: INR + maximum_value: '236' + minimum_value: '206' + value: '206' + locations: + - gps: 12.916468,77.608998 + id: L1 + - gps: 12.916714,77.609298 + id: L2 + - gps: 12.916573,77.615216 + id: L3 + - gps: 12.906857,77.604456 + id: L4 + payments: + - tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + reference: if any + summary: Get a list of all services from Provider Platform 1 + - api: select + details: + - description: The end consumer has selected a specific service and would like + to obtain a quotation for that service. Since the max_callbacks is set to + 1, the consumer platform will consider only one on_select response for the + quotation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Get quote for a specific product from a mobility catalog(Scheduled-rental) + value: + context: + action: select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDCTRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 432fdfd6-0457-47b6-9fac-80cbe5c0a75b + timestamp: '2023-03-23T04:46:45Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + ttl: P120S + version: 2.0.0 + message: + order: + items: + - id: I1 + provider: + id: P1 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: The provider platform responds with detailed information and quote + for the specific service that the consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return a quote offered by a provider(Scheduled-rental) + value: + context: + action: on_select + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: 870782be-6757-43f1-945c-8eeaf9536259 + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + items: + - descriptor: + code: RIDE + name: Cab Ride + fulfillment_ids: + - b68bb35b-63b8-469b-8d30-b87ce5d305f4 + id: I1 + location_ids: + - d3ebf05b-867d-495f-bb66-2bb2eadb11f5 + - b0aa3718-c33a-4496-940a-28ab9ea8cb9c + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + provider: + id: 450dec0f-5c9b-4abc-8029-d6bbdcf34ac3 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides the quote for selected service + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Initialize draft order and request for terms of service(rental) + value: + context: + action: init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + vehicle: + category: CAB + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of order and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return draft order with payment terms(rental) + value: + context: + action: on_init + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: The consumer platform confirms the booking and provides all the + required information for confirmation, as per the terms of the order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Confirm ride booking(Scheduled-rental) + value: + context: + action: confirm + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + vehicle: + category: AUTO_RICKSHAW + id: O1 + items: + - id: I1 + payments: + - collected_by: BAP + id: PA1 + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the ride + - api: on_confirm + details: + - description: Provider platform confirms the order. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return confirmed order with latest fulfillment details(Scheduled-rental) + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: on_update + details: + - description: Provider platform provides the agent details when assigned. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller\ + \ Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: + summary: Return updated order with updated agent details(Scheduled-rental) + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + billing: + email: jane.doe@example.com + name: Jane Doe + phone: +91-9897867564 + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_ASSIGNED + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT3H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + update_target: order.fulfillment.agent + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: The consumer platform requests the provider platform to provide + the latest order status + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): status\n Seller Platform\ + \ (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK" + example: *id017 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return order with status - Driver at pickup(Scheduled-rental) + value: + context: + action: on_status + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: DRIVER_AT_PICKUP + name: Driver Arrived at Pickup Location + stops: + - location: + gps: 13.008935, 77.644408 + time: + duration: PT2H + timestamp: '2023-08-23T12:00:40.065Z' + type: START + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: CAB + make: Mahindra + model: Compact RE + registration: KA-01-AD-9876 + items: + - descriptor: + code: RIDE + name: Cab Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform provides latest order status + summary: On-Demand - Schedule Rental Ride +- details: + - description: Detailed process of updating a ride with soft & confirm status. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant Seller\ + \ Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK \n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update - with soft_update request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update - with confirm_update request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK" + reference: if any + steps: + - api: on_confirm + details: + - description: Provider platform confirms the order and provides ride details + on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_confirm\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end\n Buyer Platform (BAP)->>Seller Platform (BPP): update - with\ + \ soft_update request\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Return confirmed order with latest fulfillment details(Scheduled-rental) + value: + context: + action: on_confirm + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.971186, 77.586812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + amount: '176' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: ON-ORDER + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '146' + title: DISTANCE_FARE + price: + currency: INR + value: '176' + ttl: P200S + reference: if any + summary: Provider platform confirms the order + - api: update + details: + - description: The consumer platform updates the ride with some certain details. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n rect rgb(191, 223,\ + \ 255)\n Buyer Platform (BAP)->>Seller Platform (BPP): update - with soft_update\ + \ request\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + example: + summary: Update stops for an on-going ride(soft-update) + value: + context: + action: update + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.972186, 77.686812 + type: END + id: O1 + provider: + id: P4 + status: SOFT_UPDATE + update_target: order.fulfillments.stops[1] + reference: if any + summary: Consumer updates the ride with soft-update + - api: on_update + details: + - description: Provider platform provides the ride details with updated context. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update - with soft_update request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_update\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK\n end" + example: + summary: Return updated order with updated order details (soft-update status) + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.972186, 77.686812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + - PA2 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + amount: '176' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + - collected_by: BAP + id: PA2 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '223' + type: POST-FULFILLMENT + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '196' + title: DISTANCE_FARE + price: + currency: INR + value: '226' + ttl: P200S + status: SOFT_UPDATE + reference: if any + summary: Provider platform provides latest update on the order + - api: update + details: + - description: The consumer platform updates the ride with some certain details. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update - with soft_update request\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK" + example: + summary: Update stops for an on-going ride(confirm-update) + value: + context: + action: update + bap_id: https://example-test-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + timestamp: '2023-03-23T04:41:16Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + version: 2.0.0 + message: + order: + id: O1 + payments: + - collected_by: BAP + id: PA2 + params: + amount: '226' + currency: INR + transaction_id: 146f3ab2-f301-4faa-ab2c-a3b6a1323d2c + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + type: POST-FULFILLMENT + provider: + id: P4 + status: CONFIRM_UPDATE + update_target: '' + reference: if any + summary: Consumer updates the ride & confirm the payment with confirm-update + - api: on_update + details: + - description: Provider platform provides the ride details with updated context. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): update\ + \ - with soft_update request\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return updated order with updated order details (confirm-update status) + value: + context: + action: on_update + bap_id: https://example-bap.com + bap_uri: https://api.example-bap.com/pilot/bap/cab/v1 + bpp_id: https://example-bpp.com + bpp_uri: https://api.example-bpp.com/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + domain: ONDC:TRV10 + location: + city: + code: std:080 + country: + code: IND + message_id: 8926b747-0362-4fcc-b795-0994a6287700 + timestamp: '2023-03-23T04:48:53Z' + transaction_id: b580c989-f84d-4abe-af28-2c818aafce3b + version: 2.0.0 + message: + order: + cancellation_terms: + - cancellation_fee: + percentage: '0' + fulfillment_state: + descriptor: + code: RIDE_ASSIGNED + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '30' + fulfillment_state: + descriptor: + code: RIDE_ENROUTE_PICKUP + reason_required: true + - cancellation_fee: + amount: + currency: INR + value: '50' + fulfillment_state: + descriptor: + code: RIDE_ARRIVED_PICKUP + reason_required: true + - cancellation_fee: + percentage: '100' + fulfillment_state: + descriptor: + code: RIDE_STARTED + reason_required: true + fulfillments: + - customer: + contact: + phone: '9876556789' + person: + name: Joe Adams + id: F1 + state: + descriptor: + code: RIDE_CONFIRMED + stops: + - authorization: + token: '234234' + type: OTP + location: + gps: 13.008935, 77.644408 + type: START + - location: + gps: 12.972186, 77.686812 + type: END + tags: + - descriptor: + code: ROUTE_INFO + name: Route Information + display: true + list: + - descriptor: + code: encoded_polyline + name: Path + value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + - descriptor: + code: waypoints + name: Waypoints + value: '[{"gps":"12.909982, 77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982,77.611822"},{"gps":"12.909982, + 77.611822"}]' + type: DELIVERY + vehicle: + category: AUTO_RICKSHAW + make: Bajaj + model: Compact RE + registration: KA-01-AD-9876 + id: O1 + items: + - descriptor: + code: RIDE + name: CAB Ride + fulfillment_ids: + - F1 + id: I1 + location_ids: + - L1 + - L3 + payment_ids: + - PA1 + - PA2 + price: + currency: INR + maximum_value: '176' + minimum_value: '156' + value: '146' + tags: + - descriptor: + code: FARE_POLICY + name: Daytime Charges + display: true + list: + - descriptor: + code: MIN_FARE + value: '30' + - descriptor: + code: MIN_FARE_DISTANCE_KM + value: '2' + - descriptor: + code: PER_KM_CHARGE + value: '15' + - descriptor: + code: PICKUP_CHARGE + value: '10' + - descriptor: + code: WAITING_CHARGE_PER_MIN + value: '2' + - descriptor: + code: NIGHT_CHARGE_MULTIPLIER + value: '1.5' + - descriptor: + code: NIGHT_SHIFT_START_TIME + value: '22:00:00' + - descriptor: + code: NIGHT_SHIFT_END_TIME + value: 05:00:00 + - descriptor: + code: INFO + name: General Information + display: true + list: + - descriptor: + code: DISTANCE_TO_NEAREST_DRIVER_METER + value: '661' + - descriptor: + code: ETA_TO_NEAREST_DRIVER_MIN + value: '3' + payments: + - collected_by: BAP + id: PA1 + params: + amount: '176' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '174' + type: PRE-ORDER + - collected_by: BAP + id: PA2 + params: + amount: '226' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 146f3ab2-f301-4faa-ab2c-a3b6a1323d2c + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '223' + type: POST-FULFILLMENT + provider: + id: P1 + quote: + breakup: + - price: + currency: INR + value: '30' + title: BASE_FARE + - price: + currency: INR + value: '196' + title: DISTANCE_FARE + price: + currency: INR + value: '226' + ttl: P200S + status: CONFIRM_UPDATE + reference: if any + summary: Provider platform provides latest update on the order + summary: On-Demand - Ride Update +- details: + - description: The illustrative flow to perform a transaction of the nature where + in a buyer would like to book an intercity service form location A(gps-cordinates) + to location B(gps-cordinates) with bus + mermaid: "sequenceDiagram\n title Inter-city Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK " + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the intercity bus mode + of transport based on gps + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK " + example: + summary: Search for all services from given start and end location(gps) + value: + context: + action: search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 7a95183e-6812-431e-9bfc-e09e392d3adc + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 12.979759, 77.590427 + type: START + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for intercity bus + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service based on gps + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: &id020 + summary: Return services available for provided start code or gps + value: + context: + action: on_search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 7a95183e-6812-431e-9bfc-e09e392d3adc + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - url: https://abc-bus.in/logos/logo.ico + name: ABC Bus Services Solutions + providers: + - descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: std:080 + name: Bangalore + gps: 12.979759, 77.590427 + type: START + - location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + type: PICKUP + - location: + descriptor: + code: std:080-pincode:560103 + name: Bellandur + gps: 12.930839, 77.677941 + type: PICKUP + - location: + descriptor: + code: std:040 + name: Hyderabad + gps: 17.399832, 78.505532 + type: END + - location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + type: DROP + - location: + descriptor: + code: std:040-pincode:500012 + name: Central Bus Station + gps: 17.379024, 78.482443 + type: DROP + type: TRIP + vehicle: + category: BUS + - id: F2 + stops: + - location: + descriptor: + code: std:080 + name: Bangalore + gps: 12.979759, 77.590427 + type: START + - location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + type: PICKUP + - location: + descriptor: + code: std:080-pincode:560103 + name: Bellandur + gps: 12.930839, 77.677941 + type: PICKUP + - location: + descriptor: + code: std:040 + name: CHENNAI + gps: 17.399832, 78.505532 + type: END + - location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + type: DROP + - location: + descriptor: + code: std:040-pincode:500012 + name: Central Bus Station + gps: 17.379024, 78.482443 + type: DROP + type: TRIP + vehicle: + category: BUS + id: P1 + reference: if any + summary: Return an intercity bus catalog of all fulfillments + - api: search + details: + - description: Users searches over the network to avail the intercity bus mode + of transport from point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK " + example: + summary: Search for all services from given start and end location(gps) + value: + context: + action: search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 1ba2dca2-144d-41a2-add5-2cc65014fa23 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 12.979759, 77.590427 + time: + label: DATE_OF_JOURNEY + timestamp: '2023-09-06T00:00:00.000Z' + type: START + - location: + gps: 17.399832, 78.471200 + type: END + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for the bus from point A(gps) to point B(gps) + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service form point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: &id021 + summary: Return services available for provided start and end code or gps with + journey date + value: + context: + action: on_search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 1ba2dca2-144d-41a2-add5-2cc65014fa23 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - url: https://abc-bus.in/logos/logo.ico + name: ABC Bus Services Solutions + providers: + - descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: std:080 + name: Bangalore + type: START + - id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S2 + location: + descriptor: + code: std:080-pincode:560103 + name: Bellandur + gps: 12.930839, 77.677941 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:45:00.000Z' + type: PICKUP + - location: + descriptor: + code: std:040 + name: Hyderabad + type: END + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + - id: S4 + location: + descriptor: + code: std:040-pincode:500012 + name: Central Bus Station + gps: 17.379024, 78.482443 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:30:00.000Z' + type: DROP + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: VEHICLE_AMENITIES + list: + - value: WATER_BOTTLE + - value: WIFI + - value: BLANKET + - value: CCTV + type: TRIP + vehicle: + category: BUS + - id: F2 + stops: + - location: + descriptor: + code: std:080 + name: Bangalore + gps: 12.979759, 77.590427 + time: + label: DATE_TIME + timestamp: '2023-09-06T20:00:00.000Z' + type: START + - location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T20:30:00.000Z' + type: PICKUP + - location: + descriptor: + code: std:080-pincode:560103 + name: Bellandur + gps: 12.930839, 77.677941 + time: + label: DATE_TIME + timestamp: '2023-09-06T20:50:00.000Z' + type: PICKUP + - location: + descriptor: + code: std:040 + name: Hyderabad + gps: 17.399832, 78.505532 + time: + label: DATE_TIME + timestamp: '2023-09-07T06:00:00.000Z' + type: END + - location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-07T06:10:00.000Z' + type: DROP + - location: + descriptor: + code: std:040-pincode:500012 + name: Central Bus Station + gps: 17.379024, 78.482443 + time: + label: DATE_TIME + timestamp: '2023-09-07T06:30:00.000Z' + type: DROP + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '22' + - descriptor: + code: VEHICLE_AMENITIES + list: + - value: WIFI + - value: BLANKET + - value: CCTV + type: TRIP + vehicle: + category: BUS + id: P1 + reference: if any + summary: Return an intercity bus catalog of all fulfillments form point A(gps) + to point B(gps) + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the necesary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id022 + summary: Get Quote of a selected seat + value: + context: + action: select + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: f05fea5e-ca35-449d-b653-f31b6d94ec33 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - id: S1 + - id: S3 + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: SELECTED + value: 'true' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: ITEM_ID + value: I1 + items: + - id: I1 + quantity: + selected: + count: 1 + provider: + id: P1 + reference: if any + summary: Selection of a specific service + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id023 + summary: Return a quote offered by a intercity bus service provider + value: + context: + action: on_select + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: f05fea5e-ca35-449d-b653-f31b6d94ec33 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED + value: 'true' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '800' + quantity: + selected: + count: 1 + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + reference: if any + summary: Provider platform provides the quote for selected service of bus + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + example: &id024 + summary: Initialize the order by providing billing details + value: + context: + action: init + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + phone: +91-9988776655 + tax_id: GSTIN:22AAAAA0000A1Z5 + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - id: S1 + - id: S3 + items: + - id: I1 + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id025 + summary: Return draft order for transit ticket with settlement via payment link + value: + context: + action: on_init + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '800' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmation as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: &id026 + summary: Confirm ticket booking + value: + context: + action: confirm + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + billing: + name: Joe Adams + phone: +91-9988776655 + tax_id: GSTIN:22AAAAA0000A1Z5 + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - id: S1 + - id: S3 + id: O1 + items: + - id: I1 + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + params: + amount: '899' + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the booking and provides details. + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey upon confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id027 + summary: Return confirmed ticket order with payment confirmation + value: + context: + action: on_confirm + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + id: O1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '800' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '949' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + status: ACTIVE + reference: if any + summary: Provider platform confirms the order + - api: update + details: + - description: The consumer platform updates the ride with some certain details + he wants to be updated. + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id028 + summary: Update customer details + value: + context: + action: update + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Lopez + id: F1 + id: O1 + update_target: order.fulfillments.customer.name + reference: if any + summary: Consumer platform updates the ride details + - api: on_update + details: + - description: Provider platform provides the ride details with updated context. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): update\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return updated order with customer details + value: + context: + action: on_update + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Lopez + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + id: O1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '800' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '949' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + status: ACTIVE + reference: if any + summary: Provider platform provides latest update on the order + - api: status + details: + - description: Consumer platform request the provider platform to provide with + latest order status + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): status-Request application\ + \ status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_status - Provide application status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Get latest status of a transit ticket booking + value: + context: + action: status + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status - Provide application status\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return transit ticket order with status - Journey Completed + value: + context: + action: on_status + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + id: O1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '899' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '120' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + status: COMPLETE + reference: if any + summary: Provider platform provides latest order status + summary: InterCity(Bus) - GPS Based Flow +- details: + - description: The illustrative flow to perform a transaction of the nature where + in a buyer would like to book an intercity service form station A to station + B + mermaid: "sequenceDiagram\n title Inter-city Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK" + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the intercity bus mode + of transport based on station code + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for all services form the given start location(code) + value: + context: + action: search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 7a95183e-6812-431e-9bfc-e09e392d3adc + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + descriptor: + code: std:080 + type: START + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for intercity bus + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service based on station code + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: *id020 + reference: if any + summary: Return an intercity bus catalog of all fulfillments + - api: search + details: + - description: Users searches over the network to avail the intercity bus mode + of transport from one station to another + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for all services from given start and end location(code) + value: + context: + action: search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 1ba2dca2-144d-41a2-add5-2cc65014fa23 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + descriptor: + code: std:080 + time: + label: DATE_OF_JOURNEY + timestamp: '2023-09-06T00:00:00.000Z' + type: START + - location: + descriptor: + code: std:040 + type: END + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for the bus by start and end station code + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus from station A to station B + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: *id021 + reference: if any + summary: Return an intercity catalog of all bus services from one station to another + - api: search + details: + - description: Users searches over the network to avail the intercity bus mode + of transport from one station to another + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for all services from given start and end location(code) + value: + context: + action: search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 1ba2dca2-144d-41a2-add5-2cc65014fa23 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + id: F1 + stops: + - id: S1 + - id: S3 + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + provider: + id: P1 + reference: if any + summary: Search for the specific bus service + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus from station A to station B + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end" + example: + summary: Return services available seat layout for provided start and end code + with journey date + value: + context: + action: on_search + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 1ba2dca2-144d-41a2-add5-2cc65014fa23 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + catalog: + descriptor: + images: + - url: https://abc-bus.in/logos/logo.ico + name: ABC Bus Services Solutions + providers: + - categories: + - descriptor: + code: SEATER + name: Seater + id: C1 + - descriptor: + code: SLEEPER + name: Sleeper + id: C2 + - descriptor: + code: SEMI_SLEEPER + name: Semi Sleeper + id: C3 + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: std:080 + name: Bangalore + type: START + - id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S2 + location: + descriptor: + code: std:080-pincode:560103 + name: Bellandur + gps: 12.930839, 77.677941 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:45:00.000Z' + type: PICKUP + - location: + descriptor: + code: std:040 + name: Hyderabad + type: END + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + - id: S4 + location: + descriptor: + code: std:040-pincode:500012 + name: Central Bus Station + gps: 17.379024, 78.482443 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:30:00.000Z' + type: DROP + tags: + - descriptor: + code: VEHICLE_GRID + display: false + list: + - descriptor: + code: X_MAX + value: '14' + - descriptor: + code: Y_MAX + value: '3' + - descriptor: + code: Z_MAX + value: '1' + - descriptor: + code: X_LOBBY_START + value: '0' + - descriptor: + code: X_LOBBY_SIZE + value: '12' + - descriptor: + code: Y_LOBBY_START + value: '1' + - descriptor: + code: Y_LOBBY_SIZE + value: '1' + - descriptor: + code: SEAT_SELECTION + value: mandatory + - descriptor: + code: VEHICLE_AVAIBALITY + display: false + list: + - descriptor: + code: AVALIABLE_SEATS + value: '20' + - descriptor: + code: VEHICLE_AMENITIES + list: + - value: WATER_BOTTLE + - value: WIFI + - value: BLANKET + - value: CCTV + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: MALE + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: ITEM_ID + value: I1 + - descriptor: + code: AVAILABLE + value: 'true' + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '1' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '2' + - descriptor: + code: NUMBER + value: S1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: ITEM_ID + value: I2 + - descriptor: + code: AVAILABLE + value: 'true' + type: TRIP + vehicle: + category: BUS + id: P1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '899' + quantity: + available: + count: 1 + maximum: + count: 1 + - category_ids: + - C2 + descriptor: + code: SEAT + name: Sleeper Ticket + fulfillment_ids: + - F1 + id: I2 + price: + currency: INR + value: '1899' + quantity: + available: + count: 1 + reference: if any + summary: Return an intercity specific bus services + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the necesary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: *id022 + reference: if any + summary: Selection of specific service + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: *id023 + reference: if any + summary: Provider platform provides the quote for selected service of bus + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: *id024 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id025 + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmation as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: *id026 + reference: if any + summary: Consumer confirms the booking and provides details. + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey upon confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: *id027 + reference: if any + summary: Provider platform confirms the order + - api: update + details: + - description: The consumer platform updates the ride with some certain details + he wants to be updated. + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): update\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK " + example: *id028 + reference: if any + summary: Consumer platform updates the ride details + - api: on_update + details: + - description: Provider platform provides the ride details with updated context. + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): update\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_update\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: + summary: Return updated order with agent details + value: + context: + action: on_update + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - agent: + contact: + phone: '9856798567' + person: + name: Jason Roy + customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + id: O1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '800' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '949' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + status: ACTIVE + update_target: order.fulfillments + reference: if any + summary: Provider platform provides latest update on the order + - api: cancel + details: + - description: Consumer platform request the provider platform to provide with + latest order status + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): status-Request application\ + \ status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_status - Provide application status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Cancel a transit ticket booking before the cancellation period + value: + context: + action: cancel + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform cancels the request + - api: on_cancel + details: + - description: Provider platform provides the updated order status to the consumer + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status - Provide application status\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Return cancelled ticket order with cancellation charges + value: + context: + action: on_cancel + bap_id: example-bap.com + bap_uri: https://api.example-bap.com/beckn + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV13 + location: + country: + code: IND + message_id: 537c8bc0-bec5-473c-977c-0843df158d26 + timestamp: '2023-09-03T01:55:08.143Z' + transaction_id: 6743e9e2-4fb5-487c-92b7-13ba8018f176 + ttl: PT30S + version: 2.0.0 + message: + order: + cancellation: + cancelled_by: CONSUMER + time: '2023-09-03T02:00:08.143Z' + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - customer: + contact: + phone: +91-9988776655 + person: + age: '30' + gender: MALE + name: Joe Adams + id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + id: S1 + location: + descriptor: + code: std:080-pincode:560034 + name: Agara + gps: 12.924479, 77.648999 + time: + label: DATE_TIME + timestamp: '2023-09-06T06:30:00.000Z' + type: PICKUP + - id: S3 + location: + descriptor: + code: std:040-pincode:500016 + name: Ameerpet + gps: 17.441586, 78.441581 + time: + label: DATE_TIME + timestamp: '2023-09-06T15:10:00.000Z' + type: DROP + tags: + - descriptor: + code: SEAT_GRID + list: + - descriptor: + code: X + value: '0' + - descriptor: + code: Y + value: '0' + - descriptor: + code: Z + value: '0' + - descriptor: + code: X_SIZE + value: '1' + - descriptor: + code: Y_SIZE + value: '1' + - descriptor: + code: NUMBER + value: A1 + - descriptor: + code: RESTRICTED_GENDER + value: ANY + - descriptor: + code: SINGLE_SEAT + value: 'TRUE' + - descriptor: + code: SEAT_PRICE + value: '50' + - descriptor: + code: SELECTED + value: 'true' + - descriptor: + code: SELECTED_SEAT + value: A1 + - descriptor: + code: ITEM_ID + value: I1 + type: TRIP + vehicle: + category: BUS + id: O1 + items: + - category_ids: + - C1 + descriptor: + code: SEAT + name: Seater Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '899' + quantity: + selected: + count: 1 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '949' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: a1644304-d150-4a58-93fe-69e8ab6e3cdc + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - url: https://operator1.com/logos/logo.ico + name: ABC Operator 1 Bus Services + id: P1 + quote: + breakup: + - price: + currency: INR + value: '800' + title: BASE_FARE + - price: + currency: INR + value: '40' + title: CGST @ 5% + - price: + currency: INR + value: '40' + title: SGST @ 5% + - price: + currency: INR + value: '19' + title: CONVEANCE_FEE + - price: + currency: INR + value: '50' + title: Seat Fare + price: + currency: INR + value: '949' + refund_terms: + - fulfillment_state: + code: RIDE_CANCELLED + name: Ride Cancelled + refund_amount: + currency: INR + value: '899' + refund_eligible: true + refund_within: + duration: PT1440M + status: CANCELLED + reference: if any + summary: Provider platform accepts/appends the terms of cancellation + summary: InterCity(Bus) - Station Code Based Flow +- details: + - description: The illustrative flow to perform a transaction of the nature where + a buyer would like to book a intracity bus service from location A(gps-cordinates) + to localtion B(gps-cordinates) + mermaid: "sequenceDiagram\n title Intra-city Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK " + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the intracity bus mode + of transport from point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK " + example: + summary: Search for intra city bus service mode of transit from a specific position + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + gps: 28.666576, 77.233332 + type: START + - location: + gps: 28.548230, 77.238039 + type: END + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for the intracity bus from point A(gps) to point B(gps) + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service from point A(gps) to point B(gps) + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end " + example: &id029 + summary: Return a public transit catalog of fare products + value: + context: + action: on_search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + catalog: + descriptor: + images: + - size_type: xs + url: https://transitsolutions.in/logos/logo.ico + name: Transit Solutions + providers: + - descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + - descriptor: + code: OPERATIONAL_START_TIME + value: '2023-09-14T05:30:00.000Z' + - descriptor: + code: OPERATIONAL_END_TIME + value: '2023-09-14T20:30:00.000Z' + vehicle: + category: BUS + - id: F3 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '241' + - descriptor: + code: ROUTE_DIRECTION + value: UP + - descriptor: + code: OPERATION_START_TIME + value: '2023-09-14T05:30:00.000Z' + - descriptor: + code: OPERATION_END_TIME + value: '2023-09-14T20:30:00.000Z' + vehicle: + category: BUS + id: P1 + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + maximum: + count: 6 + minimum: + count: 1 + - descriptor: + code: SFSJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Special Fair Single Journey Ticket + fulfillment_ids: + - F1 + id: I2 + price: + currency: INR + value: '25' + quantity: + maximum: + count: 6 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_POLICY + list: + - descriptor: + code: RESTRICTED_PERSON + value: STUDENT + - descriptor: + code: RESTRICTION_PROOF + value: STUDENT_ID + - descriptor: + code: SFSJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Special Fair Single Journey Ticket + fulfillment_ids: + - F1 + id: I3 + price: + currency: INR + value: '20' + quantity: + maximum: + count: 6 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_POLICY + list: + - descriptor: + code: RESTRICTED_PERSON + value: SENIOR_CITIZEN + - descriptor: + code: RESTRICTION_PROOF + value: GOVERMENT_ID + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F3 + id: I4 + price: + currency: INR + value: '30' + quantity: + maximum: + count: 6 + minimum: + count: 1 + - descriptor: + code: SFSJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Special Fair Single Journey Ticket + fulfillment_ids: + - F3 + id: I5 + price: + currency: INR + value: '20' + quantity: + maximum: + count: 6 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_POLICY + list: + - descriptor: + code: RESTRICTED_PERSON + value: STUDENT + - descriptor: + code: RESTRICTION_PROOF + value: STUDENT_ID + - descriptor: + code: SFSJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Special Fair Single Journey Ticket + fulfillment_ids: + - F3 + id: I6 + price: + currency: INR + value: '15' + quantity: + maximum: + count: 6 + minimum: + count: 1 + tags: + - descriptor: + code: FARE_POLICY + list: + - descriptor: + code: RESTRICTED_PERSON + value: SENIOR_CITIZEN + - descriptor: + code: RESTRICTION_PROOF + value: GOVERMENT_ID + - descriptor: + code: PASS + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Journey Pass + fulfillment_ids: + - F1 + - F3 + id: I7 + price: + currency: INR + value: '350' + quantity: + maximum: + count: 1 + minimum: + count: 1 + reference: if any + summary: Return a bus catalog of all intracity bus services from point A(gps) + to point B(gps) + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the necessary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id030 + summary: Get a quote for a fare product selected from a intra city bus service + catalog + value: + context: + action: select + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: c5342e0e-d1ae-4d8b-89d1-b5242f5cd601 + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + items: + - id: I1 + quantity: + selected: + count: 2 + provider: + id: P1 + reference: if any + summary: Selection of specific service + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id031 + summary: Return a quote offered by a public transit service provider + value: + context: + action: on_select + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: c5342e0e-d1ae-4d8b-89d1-b5242f5cd601 + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + price: + currency: INR + value: '70' + reference: if any + summary: Provider platform provides the quote for selected service of intracity + bus + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: &id032 + summary: Initialize the order by providing billing details + value: + context: + action: init + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 85216bd7-8ce4-4e27-b0f6-07287e5ede32 + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + id: O1 + items: + - id: I1 + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + status: NOT-PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: &id033 + summary: Return draft order for transit ticket with settlement via payment link + value: + context: + action: on_init + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 85216bd7-8ce4-4e27-b0f6-07287e5ede32 + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + virtual_payment_address: 9988199772@okicic + status: NOT-PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + price: + currency: INR + value: '70' + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmation as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: &id034 + summary: Confirm ticket booking + value: + context: + action: confirm + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 33145cb7-88f8-4f41-9784-b1a760c7a4eb + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + id: O1 + items: + - id: I1 + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '70' + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + status: PAID + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + id: P1 + reference: if any + summary: Consumer confirms the booking and provides details. + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: &id035 + summary: Return confirmed ticket order with payment confirmation + value: + context: + action: on_confirm + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 33145cb7-88f8-4f41-9784-b1a760c7a4eb + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + valid_to: '2021-03-23T23:59:59.999Z' + location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + id: O1 + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '70' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + price: + currency: INR + value: '70' + status: ACTIVE + reference: if any + summary: Provider platform confirms the order + - api: status + details: + - description: Consumer platform request the provider platform to provide with + latest order status. + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n rect rgb(191, 223, 255)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): status-Request application\ + \ status\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n end\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_status - Provide application status\n\ + \ Buyer Platform (BAP)-->>Seller Platform (BPP): ACK " + example: + summary: Get latest status of a transit ticket booking + value: + context: + action: status + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV10 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform requests for latest status + - api: on_status + details: + - description: Provider platform provides the updated order status to the consumer. + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n rect rgb(191, 223, 255)\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP):on_status - Provide application status\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: + summary: Provider platform provides latest order status + value: + context: + action: on_status + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 33145cb7-88f8-4f41-9784-b1a760c7a4eb + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john_doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + valid_to: '2021-03-23T23:59:59.999Z' + location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + id: O1 + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '70' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + price: + currency: INR + value: '70' + status: COMPLETE + reference: if any + summary: Provider platform provides latest order status + - api: cancel + details: + - description: Consumer platform requests for cancellation of order + example: + summary: Cancel a ticket booking before the cancellation period + value: + context: + action: cancel + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV10 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 1.1.0 + message: + order_id: O1 + reference: if any + summary: Consumer platform cancels the order + - api: on_cancel + details: + - description: Provider platform accepts the terms of cancel request and provides + with latest order update + example: + summary: Return cancelled ticket order with cancellation charges + value: + context: + action: on_cancel + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john.doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + valid_to: '2021-03-23T23:59:59.999Z' + location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + id: O1 + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '70' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + - price: + currency: INR + value: '70' + title: Cancellation Charges + price: + currency: INR + value: '70' + status: CANCELLED + reference: if any + summary: Provider platform accepts/appends the terms of cancellation + summary: IntraCity - GPS Based Flow +- details: + - description: The illustraive flow to perform a transaction of the nature where + in a buyer would like to book a bus service(intracity) form location A(code) + to localtion B(code) + mermaid: "sequenceDiagram\n title Intra-city Discovery\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n Seller Platform (BPP)->>Buyer Platform\ + \ (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): ACK " + - description: Ordering + mermaid: "sequenceDiagram\n title Selection\n participant Buyer Platform (BAP)\n\ + \ participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform\ + \ (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n Seller\ + \ Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK" + - description: Initializing the order + mermaid: "sequenceDiagram\n title Initializing Order\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform (BAP)-->>Seller\ + \ Platform (BPP): ACK " + - description: Order Confirmation + mermaid: "sequenceDiagram\n title Order Confirmation\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK " + - description: Fulfillment + mermaid: "sequenceDiagram\n title Order Fulfillment\n participant Buyer Platform\ + \ (BAP)\n participant Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): status-Request application status\n Seller Platform (BPP)-->>Buyer\ + \ Platform (BAP):ACK\n Seller Platform (BPP)->>Buyer Platform (BAP):on_status\ + \ - Provide application status\n Buyer Platform (BAP)-->>Seller Platform (BPP):\ + \ ACK " + reference: if any + steps: + - api: search + details: + - description: Users searches over the network to avail the intracity bus mode + of transport from a point(code) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for intra city bus service, with city and type of vehicle + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for all the intracity bus for a city + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service from a given point(code) + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end " + example: + summary: Return a public transit catalog of all routes in serverd + value: + context: + action: on_search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + catalog: + descriptor: + images: + - size_type: xs + url: https://transitsolutions.in/logos/logo.ico + name: Transit Solutions + providers: + - descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + fulfillments: + - id: F1 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + - id: F2 + stops: + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: DOWN + vehicle: + category: BUS + - id: F3 + stops: + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '241' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + - id: F4 + stops: + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '241' + - descriptor: + code: ROUTE_DIRECTION + value: DOWN + vehicle: + category: BUS + id: P1 + reference: if any + summary: Return a bus catalog of all intracity bus services from the given point(code) + - api: search + details: + - description: Users searches over the network to avail the intracity bus mode + of transport from point A(code) to point B(code) + mermaid: "sequenceDiagram\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Gateway\ + \ (BG): search\n Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry:\ + \ Lookup Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller\ + \ Platforms (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller\ + \ Platform (BPP)->>Gateway (BG) : ACK\n end\n Seller Platform (BPP)->>Buyer\ + \ Platform (BAP): Publish Catalog of Seller 1 (on_search)\n Buyer Platform\ + \ (BAP)->>Seller Platform (BPP): ACK" + example: + summary: Search for intra city bus service, with city and type of vehicle + value: + context: + action: search + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: fde8b8b6-c2e5-49f7-b254-720843d528bd + timestamp: '2023-03-23T04:41:16.000Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + ttl: PT30S + version: 2.0.0 + message: + intent: + fulfillment: + stops: + - location: + descriptor: + code: KASHMERE_GATE + type: START + - location: + descriptor: + code: GREATER_KAILASH + type: END + vehicle: + category: BUS + payment: + tags: + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + reference: if any + summary: Search for the intracity bus from point A to point B + - api: on_search + details: + - description: Provider platform sends the catalog of all the service that can + be used for transit using bus service from point A(code) to point B(code) + mermaid: "sequenceDiagram\n Buyer Platform (BAP)->>Gateway (BG): search\n \ + \ Gateway (BG) ->> Buyer Platform (BAP): ACK\n Gateway (BG)->>Registry: Lookup\ + \ Seller Platforms (lookup)\n Registry->>Gateway (BG): List of Seller Platforms\ + \ (200 OK)\n Gateway (BG)->>Seller Platform (BPP): search\n Seller Platform\ + \ (BPP)->>Gateway (BG) : ACK\n rect rgb(191, 223, 255)\n Seller Platform\ + \ (BPP)->>Buyer Platform (BAP): Publish Catalog of Seller 1 (on_search)\n\ + \ Buyer Platform (BAP)->>Seller Platform (BPP): ACK \n end " + example: *id029 + reference: if any + summary: Return a bus catalog of all intracity bus services from point A(code) + to point B(code) + - api: select + details: + - description: The end consumer have to select the specific service and would + like to have the necessary details + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): select\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: *id030 + reference: if any + summary: Selection of specific service + - api: on_select + details: + - description: Provider platform responds with the service detailed information + and quotes for the specific service that consumer would like to avail + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): select\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_select\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id031 + reference: if any + summary: Provider platform provides the quote for selected service of intracity + bus + - api: init + details: + - description: Consumer platform shares the terms of order and initializes the + order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): init\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK" + example: *id032 + reference: if any + summary: Consumer platform initializes the order + - api: on_init + details: + - description: Provider platform accepts the terms of orders and appends its own + terms and responds with the final draft + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): init\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_init\n Buyer Platform\ + \ (BAP)-->>Seller Platform (BPP): ACK\n end " + example: *id033 + reference: if any + summary: Provider platform accepts/appends the terms of orders + - api: confirm + details: + - description: Consumer platform confirms the booking and provides all information + required for confirmation as per the terms of order + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n rect rgb(191, 223, 255)\n Buyer Platform (BAP)->>Seller\ + \ Platform (BPP): confirm\n Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n\ + \ end\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK" + example: *id034 + reference: if any + summary: Consumer confirms the booking and provides details. + - api: on_confirm + details: + - description: Provider platform confirms the order and provides details of the + journey on confirmation + mermaid: "sequenceDiagram\n participant Buyer Platform (BAP)\n participant\ + \ Seller Platform (BPP)\n Buyer Platform (BAP)->>Seller Platform (BPP): confirm\n\ + \ Seller Platform (BPP)-->>Buyer Platform (BAP):ACK\n rect rgb(191, 223,\ + \ 255)\n Seller Platform (BPP)->>Buyer Platform (BAP):on_confirm\n Buyer\ + \ Platform (BAP)-->>Seller Platform (BPP): ACK\n end" + example: *id035 + reference: if any + summary: Provider platform confirms the order + - api: update + details: + - description: The consumer platform updates the ride with some certain details + he wants to be updated. + example: + summary: Update customer details for inter-city bus service + value: + context: + action: update + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 85216bd7-8ce4-4e27-b0f6-07287e5ede32 + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john_doe@example.com + name: John Doe + phone: +91-9897867564 + id: O1 + update_target: order.billing + reference: if any + summary: Consumer platform updates the ride details + - api: on_update + details: + - description: Provider platform provides the ride details with updated fields. + example: + summary: Return confirmed ticket order with payment confirmation + value: + context: + action: on_update + bap_id: api.example-bap.com + bap_uri: https://api.example-bap.com/beckn/ + bpp_id: api.transit-solutions.com + bpp_uri: https://api.transit-solutions.com/beckn/ + domain: ONDC:TRV11 + location: + city: + code: std:011 + country: + code: IND + message_id: 33145cb7-88f8-4f41-9784-b1a760c7a4eb + timestamp: '2021-03-23T10:00:40.065Z' + transaction_id: 6f339232-2bc3-44d2-915c-30d2b053ce1d + version: 2.0.0 + message: + order: + billing: + email: john_doe@example.com + name: John Doe + phone: +91-9897867564 + cancellation_terms: + - cancel_by: + duration: PT60M + cancellation_fee: + percentage: '0' + fulfillments: + - id: F1 + stops: + - authorization: + token: iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9AQAAAACn+1GIAAAApklEQVR4Xu2UMQ4EMQgD/QP+/0vK6zjsvayUMmavWxQpMAUBkwS12wcveAAkgNSCD3rR5Lkgoai3GUCMgWqbAEYR3HxAkZlzU/0MyBisYRsgI1ERFfcpBpA+ze6k56Cj7KTdXNigFWZvSOpsgqLfd18i2aAukXh9TXBNmdWt5gzA/oqzWkkN8HtA7G8CNOwYAiZt3wZixUfkA32OHNQq7Bxs9oI/gC/9fV8AVCkPjQAAAABJRU5ErkJggg== + type: QR + valid_to: '2021-03-23T23:59:59.999Z' + location: + descriptor: + code: KASHMERE_GATE + name: kashmere gate + gps: 28.666576, 77.233332 + type: START + - instructions: + name: Stop 1 + location: + descriptor: + code: INDIRA_GANDHI_TECHNICAL_UNIV + name: Indira Gandhi Technical Unviversity + gps: 28.624097, 77.204991 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 2 + location: + descriptor: + code: YAMUNA_BAZAR + name: Yamuna Bazar + gps: 28.625972,77.209917 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 3 + location: + descriptor: + code: DHAULA_KUAN + name: dhaula kuan + gps: 28.610972,77.201717 + type: INTERMEDIATE_STOP + - instructions: + name: Stop 4 + location: + descriptor: + code: GPO + name: gpo + gps: 28.623097,77.209917 + type: INTERMEDIATE_STOP + - location: + descriptor: + code: GREATER_KAILASH + name: Greater Kailash + gps: 28.548230, 77.238039 + type: END + tags: + - descriptor: + code: ROUTE_INFO + list: + - descriptor: + code: ROUTE_ID + value: '242' + - descriptor: + code: ROUTE_DIRECTION + value: UP + vehicle: + category: BUS + id: O1 + items: + - descriptor: + code: SJT + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Single Journey Ticket + fulfillment_ids: + - F1 + id: I1 + price: + currency: INR + value: '35' + quantity: + selected: + count: 2 + payments: + - collected_by: BAP + id: PA1 + params: + amount: '70' + bank_account_number: xxxxxxxxxxxxxx + bank_code: XXXXXXXX + currency: INR + transaction_id: 34cc9b0b-6887-4c63-8397-2f4fcf03e50d + virtual_payment_address: 9988199772@okicic + status: PAID + tags: + - descriptor: + code: SETTLEMENT_DETAILS + display: false + list: + - descriptor: + code: SETTLEMENT_TYPE + value: UPI + - descriptor: + code: BUYER_FINDER_FEES + display: false + list: + - descriptor: + code: BUYER_FINDER_FEES_PERCENTAGE + value: '1' + - descriptor: + code: SETTLEMENT_TERMS + display: false + list: + - descriptor: + code: SETTLEMENT_WINDOW + value: PT60M + - descriptor: + code: SETTLEMENT_BASIS + value: Delivery + - descriptor: + code: SETTLEMENT_TYPE + value: upi + - descriptor: + code: MANDATORY_ARBITRATION + value: 'true' + - descriptor: + code: COURT_JURISDICTION + value: New Delhi + - descriptor: + code: DELAY_INTEREST + value: '2.5' + - descriptor: + code: STATIC_TERMS + value: https://www.abc.com/settlement-terms/ + - descriptor: + code: SETTLEMENT_AMOUNT + value: '12505' + type: PRE-ORDER + provider: + descriptor: + images: + - size_type: xs + url: https://dtc.delhi.gov.in/sites/default/files/DTC/logo/dtc_logo_2.png + name: Delhi Transport Corporation + id: P1 + quote: + breakup: + - item: + id: I1 + price: + currency: INR + value: '70' + title: Base Fare + price: + currency: INR + value: '70' + status: ACTIVE + reference: if any + summary: Provider platform provides latest update on the order + summary: IntraCity - Code Based Flow diff --git a/config.yaml b/config.yaml index 59ba0d1..4feb290 100644 --- a/config.yaml +++ b/config.yaml @@ -1,7 +1,7 @@ server: type: BPP port: 5500 - sync_mode: true + sync_mode: false security: verify_sign: false lookup_uri: "http://localhost:3000/lookup" @@ -23,67 +23,67 @@ path: payload: template: data: - $ref: "./on_demand/search.yaml" + $ref: "./v1/search.yaml" search: schema: $ref: "./schema/search.json" callbacks: - $ref: "./on_demand/search.yaml" + $ref: "./v1/search.yaml" select: schema: $ref: "./schema/select.json" callbacks: - $ref: "./on_demand/select.yaml" + $ref: "./v1/select.yaml" init: schema: $ref: "./schema/init.json" callbacks: - $ref: "./on_demand/init.yaml" + $ref: "./v1/init.yaml" confirm: schema: $ref: "./schema/confirm.json" callbacks: - $ref: "./on_demand/confirm.yaml" + $ref: "./v1/confirm.yaml" status: schema: $ref: "./schema/status.json" callbacks: - $ref: "./on_demand/status.yaml" + $ref: "./v1/status.yaml" update: schema: $ref: "./schema/update.json" callbacks: - $ref: "./on_demand/update.yaml" + $ref: "./v1/update.yaml" support: schema: $ref: "./schema/support.json" callbacks: - $ref: "./on_demand/support.yaml" + $ref: "./v1/support.yaml" track: schema: $ref: "./schema/track.json" callbacks: - $ref: "./on_demand/track.yaml" + $ref: "./v1/track.yaml" rating: schema: $ref: "./schema/rating.json" callbacks: - $ref: "./on_demand/rating.yaml" + $ref: "./v1/rating.yaml" on_search: schema: $ref: "./schema/on_search.json" callbacks: - $ref: "./on_demand/on_search.yaml" + $ref: "./v1/on_search.yaml" on_select: schema: $ref: "./schema/on_select.json" callbacks: - $ref: "./on_demand/on_select.yaml" + $ref: "./v1/on_select.yaml" on_init: schema: $ref: "./schema/on_init.json" callbacks: - $ref: "./on_demand/on_init.yaml" + $ref: "./v1/on_init.yaml" on_confirm: schema: $ref: "./schema/on_confirm.json" diff --git a/package.json b/package.json index 144a045..4c3ea31 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start-dev": "nodemon app.js v2" }, "keywords": [], "author": "", diff --git a/server.yaml b/server.yaml new file mode 100644 index 0000000..8d3be66 --- /dev/null +++ b/server.yaml @@ -0,0 +1,78 @@ +server: + type: BAP/BPP + port: 5500 + sync_mode: true +security: + verify_sign: false + lookup_uri: http://localhost:3000/lookup + generate_sign: true + subscriber_id: mock-api-service + ukId: 584 + publickey: 5RF/CSTd5Cksh7xKNE/vr9IlwrV9LT1ZPR8RDeOpWjs= + privatekey: >- + dYo7zgyKYYoGQiVa45qfTQ94ic0bXPjN5KiUMVX0NBHlEX8JJN3kKSyHvEo0T++v0iXCtX0tPVk9HxEN46laOw== +log: + level: DEBUG + output_type: file + out_file: log_file.log +path: + search: + schema: + $ref: ./v2/ONDC:RET10/schema/search.yaml + callbacks: + $ref: ./v2/ONDC:RET10/search.yaml + select: + schema: + $ref: ./v2/ONDC:RET10/schema/select.yaml + callbacks: + $ref: ./v2/ONDC:RET10/select.yaml + init: + schema: + $ref: ./v2/ONDC:RET10/schema/init.yaml + callbacks: + $ref: ./v2/ONDC:RET10/init.yaml + confirm: + schema: + $ref: ./v2/ONDC:RET10/schema/confirm.yaml + callbacks: + $ref: ./v2/ONDC:RET10/confirm.yaml + update: + schema: + $ref: ./v2/ONDC:RET10/schema/update.yaml + callbacks: + $ref: ./v2/ONDC:RET10/update.yaml + status: + schema: + $ref: ./v2/ONDC:RET10/schema/status.yaml + callbacks: + $ref: ./v2/ONDC:RET10/status.yaml + on_search: + schema: + $ref: ./v2/ONDC:RET10/schema/on_search.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_search.yaml + on_select: + schema: + $ref: ./v2/ONDC:RET10/schema/on_select.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_select.yaml + on_init: + schema: + $ref: ./v2/ONDC:RET10/schema/on_init.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_init.yaml + on_confirm: + schema: + $ref: ./v2/ONDC:RET10/schema/on_confirm.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_confirm.yaml + on_status: + schema: + $ref: ./v2/ONDC:RET10/schema/on_status.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_status.yaml + on_update: + schema: + $ref: ./v2/ONDC:RET10/schema/on_update.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_update.yaml diff --git a/services/service.js b/services/service.js index 85da776..18c7f7e 100644 --- a/services/service.js +++ b/services/service.js @@ -1,19 +1,49 @@ -const { getPublicKey,dynamicReponse } = require("../utils/utils"); -const { signNack,invalidNack } = require("../utils/acknowledgement"); +const { getPublicKey, dynamicReponse } = require("../utils/utils"); +const { signNack, invalidNack } = require("../utils/acknowledgement"); const log = require("../utils/logger"); const config = require("../utils/config"); const { validateRequest, verifyHeader } = require("./validation"); +const fs = require('fs').promises; +const path = require('path'); +const filePath = path.resolve(__dirname, "../store_ids.json"); -//getting path object from config file + +async function readFileAsync(filePath) { + try { + const data = await fs.readFile(filePath, 'utf8'); + // console.log('Read file successfully:', data); + return data; + } catch (err) { + console.error('Failed to read file:', err); + // Handle the error or throw it based on your application's needs + return null; + } +} + +async function writeFileAsync(filePath, data) { + try { + await fs.writeFile(filePath, data, 'utf8'); + console.log('File written successfully'); + } catch (err) { + console.error('Failed to write file:', err); + // Handle the error or throw it based on your application's needs + } +} var paths; var props; var security; var logger; var server; -const matchText = 'form/' +const matchText = 'form/' + +let fulfillment_ids = []; const onRequest = async (req, res) => { + let data = await readFileAsync(filePath) + data = JSON.parse(data); + console.log("onRequest " + req.params['0'] + '\n' + res); + if (paths == undefined) { logger = log.init(); props = config.getConfig(); @@ -21,21 +51,80 @@ const onRequest = async (req, res) => { server = props.server; paths = props.path; } + + console.log(`version ${JSON.stringify(req.body.context.version)}`); + try { + if (req.body.context.version == "2.0.1") { + const file = `./v2/${req.body.context.domain}/v2.yaml`; + console.log("file xyz" + file); + await config.loadConfig(file); + logger = log.init(); + props = config.getConfig(); + security = props.security; + server = props.server; + paths = props.path; + } + else if (req.body.context.core_version == "0.9.3" || req.body.context.core_version == "0.9.4") { + const file = `./v1/${req.body.context.domain}/v1.yaml`; + await config.loadConfig(file); + logger = log.init(); + props = config.getConfig(); + security = props.security; + server = props.server; + paths = props.path; + } const isFormFound = req.params['0']?.match(matchText); let api = req.params['0'] - if(isFormFound){ + if (isFormFound) { api = req.params['0'].replace(/\//g, '_'); } + logger.info(`Received ${req.url} api request`); if (security.verify_sign) { - if (!await verifyHeader(req, security)){ + if (!await verifyHeader(req, security)) { // Handle the case when signature is not verified res.status(400).json(signNack); logger.error("Authorization header not verified"); return; // Make sure to return to exit the function - } - } + } + } + + // validations + if (api == "on_search") { + if (req.body.context.version == "2.0.1") { + for(let i = 0; i < req.body.message.catalog.fulfillments.length; i++) { + data.fulfillment_ids.push(req.body.message.catalog.fulfillments[i].id); + } + } + else if (req.body.context.core_version == "0.9.3" || req.body.context.core_version == "0.9.4") { + for(let i = 0; i < req.body.message.catalog.providers.length; i++){ + for(let j = 0; j < req.body.message.catalog.providers[i].fulfillments.length; j++){ + data.fulfillment_ids.push(req.body.message.catalog.providers[i].fulfillments[j].id); + } + } + } + } + + if (api == "select") { + let fulfillment_id = ""; + if (req.body.context.version == "2.0.1") { + console.log("select fulfillment_id" + JSON.stringify(req.body.message.order.items[0].id)); + fulfillment_id = JSON.stringify(req.body.message.order.items[0].id); + } + else if (req.body.context.core_version == "0.9.3" || req.body.context.core_version == "0.9.4") { + console.log("select fulfillment_id" + JSON.stringify(req.body.message.order.fulfillment.id)); + fulfillment_id = JSON.stringify(req.body.message.order.fulfillment.id); + } + + if (!JSON.stringify(data.fulfillment_ids).includes(fulfillment_id)) { + console.log("invalid fulfillment_id " + fulfillment_id); + console.log("invalid fulfillment_ids " + data.fulfillment_ids); + return res.json({ invalidNack }); + } + } + + let jsonData = JSON.stringify(data, null, 2); //getting the callback url from config file let callbackConfig; @@ -53,10 +142,33 @@ const onRequest = async (req, res) => { } logger.info(`Validating ${api} request`); + await validateRequest(context, callbackConfig, res, security, server, isFormFound); + if (api == "on_search") { + await writeFileAsync(filePath, jsonData) + .then(() => { + console.log("completed") + }) + .catch((error) => { + console.error("Error writing file:", error); + }); + } + else if(api == "on_update"){ + data.fulfillment_ids = []; + jsonData = JSON.stringify(data, null, 2); + await writeFileAsync(filePath, jsonData) + .then(() => { + console.log("completed") + }) + .catch((error) => { + console.error("Error writing file:", error); + }); + } + } catch (error) { logger.error("ERROR!!", error); console.trace(error); + return res.json({ invalidNack }); } }; diff --git a/services/triggerService.js b/services/triggerService.js index bdaae78..d4ca323 100644 --- a/services/triggerService.js +++ b/services/triggerService.js @@ -15,7 +15,7 @@ const trigger = (context, config, data) => { logger.info("Inside trigger service"); setTimeout(() => { axios - .post(`${uri + api}`, data) + .post(`http://localhost:5500/${api}`, data) .then((response) => { logger.info( `Triggered ${api} response at ${uri}${api}` diff --git a/services/validation.js b/services/validation.js index 0876966..e08a39b 100644 --- a/services/validation.js +++ b/services/validation.js @@ -25,6 +25,10 @@ const validateSchema = async (context) => { logger.info( `Inside schema validation service for ${context?.req_body?.context?.action} api` ); + + // logger.info(`req body ${JSON.stringify(context.req_body)}`); + // logger.info(`schema ${JSON.stringify(context.apiConfig.schema)}`); + try { const validate = ajv.compile(context.apiConfig.schema); const valid = validate(context.req_body); @@ -52,6 +56,7 @@ const validateRequest = async ( ) => { logger = log.init(); if (isFormFound || await validateSchema(context)) { + logger.info("Request validation : SUCCESS"); //triggering the subsequent request payloadConfig = callbackConfig?.payload; if (payloadConfig != null) { diff --git a/store_ids.json b/store_ids.json new file mode 100644 index 0000000..5f9926f --- /dev/null +++ b/store_ids.json @@ -0,0 +1,8 @@ +{ + "fulfillment_ids": [ + "2e6a09e1-7614-44a7-9953-7022a243f4fd", + "2e6a09e1-7614-44a7-9953-7022a243f4fd", + "2e6a09e1-7614-44a7-9953-7022a243f4fd", + "2e6a09e1-7614-44a7-9953-7022a243f4fd" + ] +} \ No newline at end of file diff --git a/utils/config.js b/utils/config.js index 408f8d2..919ce2d 100644 --- a/utils/config.js +++ b/utils/config.js @@ -7,7 +7,7 @@ const $RefParser = require("json-schema-ref-parser"); var config; async function loadConfig(filePath) { - // const filePath = "./config.yaml"; + console.log("Loading config from " + (filePath)); const yamlString = fs.readFileSync(filePath, "utf8"); const yamlObject = yaml.parse(yamlString); // config = yamlObject; diff --git a/v1/ONDC:TRV10/confirm.yaml b/v1/ONDC:TRV10/confirm.yaml new file mode 100644 index 0000000..ee11cd0 --- /dev/null +++ b/v1/ONDC:TRV10/confirm.yaml @@ -0,0 +1,8 @@ +default: + callback: on_confirm + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_confirm.yaml" + \ No newline at end of file diff --git a/v1/ONDC:TRV10/init.yaml b/v1/ONDC:TRV10/init.yaml new file mode 100644 index 0000000..8022ba7 --- /dev/null +++ b/v1/ONDC:TRV10/init.yaml @@ -0,0 +1,7 @@ +default: + callback: on_init + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_init.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/on_confirm.yaml b/v1/ONDC:TRV10/on_confirm.yaml new file mode 100644 index 0000000..e019395 --- /dev/null +++ b/v1/ONDC:TRV10/on_confirm.yaml @@ -0,0 +1,8 @@ +default: + callback: on_update + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_update.yaml" + \ No newline at end of file diff --git a/v1/ONDC:TRV10/on_init.yaml b/v1/ONDC:TRV10/on_init.yaml new file mode 100644 index 0000000..8457114 --- /dev/null +++ b/v1/ONDC:TRV10/on_init.yaml @@ -0,0 +1,7 @@ +default: + callback: confirm + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/confirm.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/on_search.yaml b/v1/ONDC:TRV10/on_search.yaml new file mode 100644 index 0000000..03bdbb8 --- /dev/null +++ b/v1/ONDC:TRV10/on_search.yaml @@ -0,0 +1,7 @@ +default: + callback: select + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/select.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/on_select.yaml b/v1/ONDC:TRV10/on_select.yaml new file mode 100644 index 0000000..a054472 --- /dev/null +++ b/v1/ONDC:TRV10/on_select.yaml @@ -0,0 +1,7 @@ +default: + callback: init + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/init.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/operations/req_body.yaml b/v1/ONDC:TRV10/operations/req_body.yaml new file mode 100644 index 0000000..1894e70 --- /dev/null +++ b/v1/ONDC:TRV10/operations/req_body.yaml @@ -0,0 +1,25 @@ +bap_id: + operation: + type: READ + input: + value: "req_body.context.bap_id" +bap_uri: + operation: + type: READ + input: + value: "req_body.context.bap_uri" +context_city: + operation: + type: READ + input: + value: "req_body.context.city" +transaction_id: + operation: + type: READ + input: + value: "req_body.context.transaction_id" +message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" \ No newline at end of file diff --git a/v1/ONDC:TRV10/payloads/confirm.yaml b/v1/ONDC:TRV10/payloads/confirm.yaml new file mode 100644 index 0000000..205b87c --- /dev/null +++ b/v1/ONDC:TRV10/payloads/confirm.yaml @@ -0,0 +1,61 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: confirm + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + customer: + contact: + phone: "+91-7776902471" + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "6th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "8th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + id: "a11c142e-1182-4b9d-8fda-3bbf5ae54851" + items: + - id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + payment: + params: + amount: "291" + collected_by: "BPP" + currency: "INR" + type: "ON-FULFILLMENT" + provider: + id: "ab357cdc-959f-4f43-b601-8b2e30e570a7" + quote: + price: + currency: "INR" + offered_value: "291" + value: "291" diff --git a/v1/ONDC:TRV10/payloads/init.yaml b/v1/ONDC:TRV10/payloads/init.yaml new file mode 100644 index 0000000..ed5b889 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/init.yaml @@ -0,0 +1,67 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: init + bap_uri: '{{bap_uri}}' +message: + order: + billing: + phone: "7776902471" + fulfillment: + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "6th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "8th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + tags: + groups/1/code: "estimations" + groups/1/display: true + groups/1/list/1/code: "max_estimated_distance" + groups/1/list/1/display: true + groups/1/list/1/name: "Max Estimated Distance" + groups/1/list/1/value: "20387.00" + groups/1/name: "Estimations" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + items: + - fulfillment_id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + payment: + params: + collected_by: "BPP" + currency: "INR" + type: "ON-FULFILLMENT" + provider: + id: "ab357cdc-959f-4f43-b601-8b2e30e570a7" + quote: + price: + currency: "INR" + offered_value: "291" + value: "291" diff --git a/v1/ONDC:TRV10/payloads/on_confirm.yaml b/v1/ONDC:TRV10/payloads/on_confirm.yaml new file mode 100644 index 0000000..765b421 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/on_confirm.yaml @@ -0,0 +1,95 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: on_confirm + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + agent: + name: "KARAN MISHRA" + rateable: true + customer: + contact: + phone: "+91-7776902471" + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "6th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + id: "1f97e548-abc5-4951-9df0-3ba1797f14cd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "8th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + state: + descriptor: + code: "TRIP_ASSIGNED" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + id: "a11c142e-1182-4b9d-8fda-3bbf5ae54851" + items: + - descriptor: + short_desc: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + fulfillment_id: "1f97e548-abc5-4951-9df0-3ba1797f14cd" + id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + price: + currency: "INR" + value: "291" + payment: + params: + amount: "291" + collected_by: "BPP" + currency: "INR" + type: "ON-FULFILLMENT" + provider: + id: "ab357cdc-959f-4f43-b601-8b2e30e570a7" + quote: + breakup: + - price: + currency: "INR" + value: "291" + title: "TOTAL_FARE" + - price: + currency: "INR" + value: "30" + title: "BASE_FARE" + - price: + currency: "INR" + value: "30" + title: "BASE_DISTANCE_FARE" + - price: + currency: "INR" + value: "10" + title: "DEAD_KILOMETER_FARE" + - price: + currency: "INR" + value: "251" + title: "EXTRA_DISTANCE_FARE" + price: + currency: "INR" + offered_value: "291" + value: "291" + state: "ACTIVE" diff --git a/v1/ONDC:TRV10/payloads/on_init.yaml b/v1/ONDC:TRV10/payloads/on_init.yaml new file mode 100644 index 0000000..f4c737d --- /dev/null +++ b/v1/ONDC:TRV10/payloads/on_init.yaml @@ -0,0 +1,85 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: on_init + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + agent: + name: "KARAN MISHRA" + rateable: true + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "Chikkathoguru" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + id: "1f97e548-abc5-4951-9df0-3ba1797f14cd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "Chamrajpet" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + id: "a11c142e-1182-4b9d-8fda-3bbf5ae54851" + items: + - descriptor: + short_desc: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + fulfillment_id: "1f97e548-abc5-4951-9df0-3ba1797f14cd" + id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + price: + currency: "INR" + value: "291" + payment: + params: + amount: "291" + collected_by: "BPP" + currency: "INR" + type: "ON-FULFILLMENT" + provider: + id: "ab357cdc-959f-4f43-b601-8b2e30e570a7" + quote: + breakup: + - price: + currency: "INR" + value: "291" + title: "TOTAL_FARE" + - price: + currency: "INR" + value: "30" + title: "BASE_FARE" + - price: + currency: "INR" + value: "10" + title: "DEAD_KILOMETER_FARE" + - price: + currency: "INR" + value: "251" + title: "EXTRA_DISTANCE_FARE" + price: + currency: "INR" + offered_value: "291" + value: "291" + state: "NEW" diff --git a/v1/ONDC:TRV10/payloads/on_search.yaml b/v1/ONDC:TRV10/payloads/on_search.yaml new file mode 100644 index 0000000..d3df0a9 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/on_search.yaml @@ -0,0 +1,96 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: on_search + bap_uri: '{{bap_uri}}' +message: + catalog: + descriptor: + name: "Juspay Transporter" + providers: + - descriptor: + name: "Juspay Transporter" + fulfillments: + - end: + location: + gps: "12.861791443428338, 77.63921201309961" + id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + start: + location: + gps: "12.960223560090196, 77.55648506438055" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + id: "beta.beckn.uat.juspay.net/dev/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f" + items: + - fulfillment_id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + price: + currency: "INR" + maximum_value: "321" + minimum_value: "291" + offered_value: "291" + value: "291" + tags: + groups/1/code: "general_info" + groups/1/display: false + groups/1/list/1/code: "distance_to_nearest_driver" + groups/1/list/1/display: false + groups/1/list/1/name: "Distance To Nearest Driver" + groups/1/list/1/value: "0" + groups/1/name: "General Information" + groups/2/code: "fare_breakup" + groups/2/display: false + groups/2/list/1/code: "BASE_DISTANCE_FARE" + groups/2/list/1/display: false + groups/2/list/1/name: "BASE_DISTANCE_FARE" + groups/2/list/1/value: "30" + groups/2/list/2/code: "DEAD_KILOMETER_FARE" + groups/2/list/2/display: false + groups/2/list/2/name: "DEAD_KILOMETER_FARE" + groups/2/list/2/value: "10" + groups/2/list/3/code: "DRIVER_MIN_EXTRA_FEE" + groups/2/list/3/display: false + groups/2/list/3/name: "DRIVER_MIN_EXTRA_FEE" + groups/2/list/3/value: "0" + groups/2/list/4/code: "DRIVER_MAX_EXTRA_FEE" + groups/2/list/4/display: false + groups/2/list/4/name: "DRIVER_MAX_EXTRA_FEE" + groups/2/list/4/value: "30" + groups/2/list/5/code: "EXTRA_PER_KM_FARE" + groups/2/list/5/display: false + groups/2/list/5/name: "EXTRA_PER_KM_FARE" + groups/2/list/5/value: "15" + groups/2/name: "Fare Breakup" + groups/3/code: "rate_card" + groups/3/display: false + groups/3/list/1/code: "night_shift_charge" + groups/3/list/1/display: false + groups/3/list/1/name: "Night Shift Charges" + groups/3/list/1/value: "0" + groups/3/list/2/code: "old_night_shift_charge" + groups/3/list/2/display: false + groups/3/list/2/name: "Old Night Shift Charges" + groups/3/list/2/value: "1.5" + groups/3/list/3/code: "night_shift_start" + groups/3/list/3/display: false + groups/3/list/3/name: "Night Shift Start Timings" + groups/3/list/3/value: "22:00:00" + groups/3/list/4/code: "waiting_charge_per_min" + groups/3/list/4/display: false + groups/3/list/4/name: "Waiting Charges Per Min" + groups/3/list/4/value: "2" + groups/3/list/5/code: "night_shift_end" + groups/3/list/5/display: false + groups/3/list/5/name: "Night Shift End Timings" + groups/3/list/5/value: "05:00:00" + groups/3/name: "Rate Card" + locations: + - lat: 12.96022319386875 + lon: 77.55648404359818 diff --git a/v1/ONDC:TRV10/payloads/on_select.yaml b/v1/ONDC:TRV10/payloads/on_select.yaml new file mode 100644 index 0000000..0172784 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/on_select.yaml @@ -0,0 +1,100 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: on_select + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + agent: + name: "KARAN MISHRA" + rateable: true + tags: + groups/1/code: "agent_info" + groups/1/display: false + groups/1/list/1/code: "duration_to_pickup_in_s" + groups/1/list/1/display: false + groups/1/list/1/name: "Agent Duration to Pickup in Seconds" + groups/1/list/1/value: "0" + groups/1/name: "Agent Info" + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + state: "Karnataka" + street: "18th Main" + ward: "Chikkathoguru" + gps: "12.861791443428338, 77.63921201309961" + id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + state: "Karnataka" + street: "18th Main" + ward: "Chamrajpet" + gps: "12.960223560090196, 77.55648506438055" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + items: + - fulfillment_id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + price: + currency: "INR" + value: "291" + tags: + groups/1/code: "general_info" + groups/1/display: false + groups/1/list/1/code: "distance_to_nearest_driver_in_m" + groups/1/list/1/display: false + groups/1/list/1/name: "Distance To Nearest Driver In Meters" + groups/1/list/1/value: "0" + groups/1/list/2/code: "bpp_quote_id" + groups/1/list/2/display: false + groups/1/list/2/name: "BPP Quote Id" + groups/1/list/2/value: "1f97e548-abc5-4951-9df0-3ba1797f14cd" + groups/1/name: "General Info" + payment: + params: + collected_by: "BPP" + currency: "INR" + type: "ON-FULFILLMENT" + provider: + id: "ab357cdc-959f-4f43-b601-8b2e30e570a7" + quote: + breakup: + - price: + currency: "INR" + value: "291" + title: "TOTAL_FARE" + - price: + currency: "INR" + value: "30" + title: "BASE_FARE" + - price: + currency: "INR" + value: "10" + title: "DEAD_KILOMETER_FARE" + - price: + currency: "INR" + value: "251" + title: "EXTRA_DISTANCE_FARE" + price: + currency: "INR" + value: "291" + ttl: "PT0H0M14S" diff --git a/v1/ONDC:TRV10/payloads/on_update.yaml b/v1/ONDC:TRV10/payloads/on_update.yaml new file mode 100644 index 0000000..d81f1dd --- /dev/null +++ b/v1/ONDC:TRV10/payloads/on_update.yaml @@ -0,0 +1,53 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: on_update + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + agent: + name: "KARAN MISHRA" + phone: "9898000000" + rateable: true + tags: + groups/1/code: "driver_details" + groups/1/display: "false" + groups/1/list/1/code: "registered_at" + groups/1/list/1/display: "false" + groups/1/list/1/name: "Registered At" + groups/1/list/1/value: "2023-11-14 13:56:33.930023 UTC" + groups/1/list/2/code: "rating" + groups/1/list/2/display: "false" + groups/1/list/2/name: "rating" + groups/1/list/2/value: null + groups/1/name: "Driver Details" + end: + location: + gps: "12.861791443428338, 77.63921201309961" + id: "b15a7b99-bee8-4e14-a3e6-c37c00c5a0e2" + start: + authorization: + token: "9019" + type: "OTP" + location: + gps: "12.960223560090196, 77.55648506438055" + state: + descriptor: + code: "RIDE_ASSIGNED" + name: "Ride Assigned" + type: "RIDE" + vehicle: + color: "GLOSSY BLUE RAL-5012" + model: "" + registration: "DL53GD0995" + variant: "AUTO_RICKSHAW" + id: "a11c142e-1182-4b9d-8fda-3bbf5ae54851" + state: "ACTIVE" + update_target: "order.fufillment.state.code, order.fulfillment.agent, order.fulfillment.vehicle, order.fulfillment.start.authorization" diff --git a/v1/ONDC:TRV10/payloads/search.yaml b/v1/ONDC:TRV10/payloads/search.yaml new file mode 100644 index 0000000..dcc1986 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/search.yaml @@ -0,0 +1,55 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: search + bap_uri: '{{bap_uri}}' +message: + intent: + fulfillment: + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "6th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "8th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + tags: + groups/1/code: "route_info" + groups/1/display: false + groups/1/list/1/code: "distance_info_in_m" + groups/1/list/1/display: false + groups/1/list/1/name: "Distance Information In Meters" + groups/1/list/1/value: "18742" + groups/1/list/2/code: "duration_info_in_s" + groups/1/list/2/display: false + groups/1/list/2/name: "Duration Information In Seconds" + groups/1/list/2/value: "3416" + groups/1/list/3/code: "route_points" + groups/1/list/3/display: false + groups/1/list/3/name: "Route Points" + groups/1/list/3/value: '[{"lat":12.96015,"lon":77.55654},{"lat":12.960230000000001,"lon":77.55666}]' + groups/1/name: "Route Information" + diff --git a/v1/ONDC:TRV10/payloads/select.yaml b/v1/ONDC:TRV10/payloads/select.yaml new file mode 100644 index 0000000..36c1b95 --- /dev/null +++ b/v1/ONDC:TRV10/payloads/select.yaml @@ -0,0 +1,47 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: '2023-11-28T07:57:11Z' + bap_id: beta.beckn.uat.juspay.net/dev/bap/beckn/9e26fb47-ffc1-47a5-beb8-4b80142c9236 + transaction_id: '{{txn_id}}' + message_id: '{{msg_id}}' + city: std:080 + core_version: 0.9.4 + action: select + bap_uri: '{{bap_uri}}' +message: + order: + fulfillment: + end: + location: + address: + area_code: "560047" + building: "Juspay Apartments" + city: "Bangalore" + country: "India" + door: "#444" + locality: "6th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.861791443428338, 77.63921201309961" + id: "2e6a09e1-7614-44a7-9953-7022a243f4fd" + start: + location: + address: + area_code: "560047" + building: "Juspay Buildings" + city: "Bangalore" + country: "India" + door: "#444" + locality: "8th Block Koramangala" + state: "Karnataka" + street: "18th Main" + gps: "12.960223560090196, 77.55648506438055" + type: "RIDE" + vehicle: + category: "AUTO_RICKSHAW" + items: + - id: "NAMMA_YATRI_PARTNER_AUTO_RICKSHAW" + price: + currency: "INR" + value: "291" diff --git a/v1/ONDC:TRV10/rating.yaml b/v1/ONDC:TRV10/rating.yaml new file mode 100644 index 0000000..9882dda --- /dev/null +++ b/v1/ONDC:TRV10/rating.yaml @@ -0,0 +1,7 @@ +default: + callback: on_rating + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_rating.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/cancel.json b/v1/ONDC:TRV10/schema/cancel.json new file mode 100644 index 0000000..053fd13 --- /dev/null +++ b/v1/ONDC:TRV10/schema/cancel.json @@ -0,0 +1,164 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + }, + "cancellation_reason_id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/confirm.json b/v1/ONDC:TRV10/schema/confirm.json new file mode 100644 index 0000000..bebefc5 --- /dev/null +++ b/v1/ONDC:TRV10/schema/confirm.json @@ -0,0 +1,1982 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/init.json b/v1/ONDC:TRV10/schema/init.json new file mode 100644 index 0000000..ca1b569 --- /dev/null +++ b/v1/ONDC:TRV10/schema/init.json @@ -0,0 +1,1978 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_cancel.json b/v1/ONDC:TRV10/schema/on_cancel.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_cancel.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_confirm.json b/v1/ONDC:TRV10/schema/on_confirm.json new file mode 100644 index 0000000..ff395d1 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_confirm.json @@ -0,0 +1,2014 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}" + + + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_init.json b/v1/ONDC:TRV10/schema/on_init.json new file mode 100644 index 0000000..955ee4d --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_init.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}" + + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_rating.json b/v1/ONDC:TRV10/schema/on_rating.json new file mode 100644 index 0000000..99bc7b6 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_rating.json @@ -0,0 +1,157 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "feedback_ack": { + "description": "If feedback has been recorded or not", + "type": "boolean" + }, + "rating_ack": { + "description": "If rating has been recorded or not", + "type": "boolean" + } + } + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_search.json b/v1/ONDC:TRV10/schema/on_search.json new file mode 100644 index 0000000..96e8ed0 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_search.json @@ -0,0 +1,3808 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "catalog": { + "description": "Describes a BPP catalog", + "type": "object", + "properties": { + "bpp/descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "bpp/categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "bpp/fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "bpp/payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "bpp/offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "bpp/providers": { + "type": "array", + "items": { + "description": "Describes a service provider. This can be a restaurant, a hospital, a Store etc", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "category_id": { + "type": "string", + "description": "Category Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "locations": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + } + }, + "offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "items": { + "type": "array", + "items": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + } + } + } + }, + "required": [ + "catalog" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_select.json b/v1/ONDC:TRV10/schema/on_select.json new file mode 100644 index 0000000..99c43ec --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_select.json @@ -0,0 +1,1998 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_status.json b/v1/ONDC:TRV10/schema/on_status.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_status.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_support.json b/v1/ONDC:TRV10/schema/on_support.json new file mode 100644 index 0000000..08a8161 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_support.json @@ -0,0 +1,161 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "format": "phone" + }, + "email": { + "type": "string", + "format": "email" + }, + "uri": { + "type": "string", + "format": "uri" + } + } + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_track.json b/v1/ONDC:TRV10/schema/on_track.json new file mode 100644 index 0000000..47a1ea6 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_track.json @@ -0,0 +1,169 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "tracking": { + "description": "Describes the tracking info of an object", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive" + ] + } + } + } + }, + "required": [ + "tracking" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/on_update.json b/v1/ONDC:TRV10/schema/on_update.json new file mode 100644 index 0000000..76a4698 --- /dev/null +++ b/v1/ONDC:TRV10/schema/on_update.json @@ -0,0 +1,2006 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md" + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/rating.json b/v1/ONDC:TRV10/schema/rating.json new file mode 100644 index 0000000..67037e4 --- /dev/null +++ b/v1/ONDC:TRV10/schema/rating.json @@ -0,0 +1,169 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "description": "Describes the rating of a person or an object.", + "type": "object", + "properties": { + "rating_category": { + "description": "Category of the object being rated", + "type": "string" + }, + "id": { + "description": "Id of the object being rated", + "type": "string" + }, + "value": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "feedback_form": { + "description": "Describes a feedback form that a BPP can send to get feedback from the BAP", + "type": "array", + "items": { + "description": "An element in the feedback form. It can be question or an answer to the question.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "parent_id": { + "type": "string" + }, + "question": { + "description": "Specifies the question to which the answer options will be contained in the child FeedbackFormElements", + "type": "string" + }, + "answer": { + "description": "Specifies an answer option to which the question will be in the FeedbackFormElement specified in parent_id", + "type": "string" + }, + "answer_type": { + "description": "Specifies how the answer option should be rendered.", + "type": "string", + "enum": [ + "radio", + "checkbox", + "text" + ] + } + } + } + }, + "feedback_id": { + "type": "string", + "description": "This value will be placed in the the $feedback_id url param in case of http/get and in the requestBody http/post requests" + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/search.json b/v1/ONDC:TRV10/schema/search.json new file mode 100644 index 0000000..ea1ab1d --- /dev/null +++ b/v1/ONDC:TRV10/schema/search.json @@ -0,0 +1,3949 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "intent": { + "description": "Intent of a user. Used for searching for services", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "provider": { + "description": "Describes a service provider. This can be a restaurant, a hospital, a Store etc", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "category_id": { + "type": "string", + "description": "Category Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "locations": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + } + }, + "offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "items": { + "type": "array", + "items": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "category": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "offer": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "item": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/select.json b/v1/ONDC:TRV10/schema/select.json new file mode 100644 index 0000000..bebefc5 --- /dev/null +++ b/v1/ONDC:TRV10/schema/select.json @@ -0,0 +1,1982 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/status.json b/v1/ONDC:TRV10/schema/status.json new file mode 100644 index 0000000..abce85c --- /dev/null +++ b/v1/ONDC:TRV10/schema/status.json @@ -0,0 +1,125 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/support.json b/v1/ONDC:TRV10/schema/support.json new file mode 100644 index 0000000..e676446 --- /dev/null +++ b/v1/ONDC:TRV10/schema/support.json @@ -0,0 +1,122 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "ref_id": { + "type": "string", + "description": "ID of the element for which support is needed" + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/track.json b/v1/ONDC:TRV10/schema/track.json new file mode 100644 index 0000000..13bfd5e --- /dev/null +++ b/v1/ONDC:TRV10/schema/track.json @@ -0,0 +1,129 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + }, + "callback_url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/schema/update.json b/v1/ONDC:TRV10/schema/update.json new file mode 100644 index 0000000..b6757cd --- /dev/null +++ b/v1/ONDC:TRV10/schema/update.json @@ -0,0 +1,1987 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "update_target": { + "description": "Comma separated values of order objects being updated. For example: ```\"update_target\":\"item,billing,fulfillment\"```", + "type": "string" + }, + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "update_target", + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/ONDC:TRV10/search.yaml b/v1/ONDC:TRV10/search.yaml new file mode 100644 index 0000000..b604b19 --- /dev/null +++ b/v1/ONDC:TRV10/search.yaml @@ -0,0 +1,7 @@ +default: + callback: on_search + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_search.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/select.yaml b/v1/ONDC:TRV10/select.yaml new file mode 100644 index 0000000..16c43cf --- /dev/null +++ b/v1/ONDC:TRV10/select.yaml @@ -0,0 +1,7 @@ +default: + callback: on_select + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_select.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/status.yaml b/v1/ONDC:TRV10/status.yaml new file mode 100644 index 0000000..5a3f226 --- /dev/null +++ b/v1/ONDC:TRV10/status.yaml @@ -0,0 +1,7 @@ +default: + callback: on_status + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_status.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/support.yaml b/v1/ONDC:TRV10/support.yaml new file mode 100644 index 0000000..d02c61e --- /dev/null +++ b/v1/ONDC:TRV10/support.yaml @@ -0,0 +1,7 @@ +default: + callback: on_support + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_support.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/template/confirm.yaml b/v1/ONDC:TRV10/template/confirm.yaml new file mode 100644 index 0000000..4e8f0ce --- /dev/null +++ b/v1/ONDC:TRV10/template/confirm.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/init.yaml b/v1/ONDC:TRV10/template/init.yaml new file mode 100644 index 0000000..4ac7556 --- /dev/null +++ b/v1/ONDC:TRV10/template/init.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_confirm.yaml b/v1/ONDC:TRV10/template/on_confirm.yaml new file mode 100644 index 0000000..da82894 --- /dev/null +++ b/v1/ONDC:TRV10/template/on_confirm.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_init.yaml b/v1/ONDC:TRV10/template/on_init.yaml new file mode 100644 index 0000000..f0f8ade --- /dev/null +++ b/v1/ONDC:TRV10/template/on_init.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_rating.yaml b/v1/ONDC:TRV10/template/on_rating.yaml new file mode 100644 index 0000000..1a5ba90 --- /dev/null +++ b/v1/ONDC:TRV10/template/on_rating.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_rating.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_search.yaml b/v1/ONDC:TRV10/template/on_search.yaml new file mode 100644 index 0000000..eda9ee2 --- /dev/null +++ b/v1/ONDC:TRV10/template/on_search.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_search.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_select.yaml b/v1/ONDC:TRV10/template/on_select.yaml new file mode 100644 index 0000000..c0f699a --- /dev/null +++ b/v1/ONDC:TRV10/template/on_select.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_status.yaml b/v1/ONDC:TRV10/template/on_status.yaml new file mode 100644 index 0000000..a8ca6a0 --- /dev/null +++ b/v1/ONDC:TRV10/template/on_status.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_status.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_support.yaml b/v1/ONDC:TRV10/template/on_support.yaml new file mode 100644 index 0000000..0c310d9 --- /dev/null +++ b/v1/ONDC:TRV10/template/on_support.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_support.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_track.yaml b/v1/ONDC:TRV10/template/on_track.yaml new file mode 100644 index 0000000..4320b5b --- /dev/null +++ b/v1/ONDC:TRV10/template/on_track.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_track.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/on_update.yaml b/v1/ONDC:TRV10/template/on_update.yaml new file mode 100644 index 0000000..202e05e --- /dev/null +++ b/v1/ONDC:TRV10/template/on_update.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_update.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/template/select.yaml b/v1/ONDC:TRV10/template/select.yaml new file mode 100644 index 0000000..cfd3115 --- /dev/null +++ b/v1/ONDC:TRV10/template/select.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/ONDC:TRV10/track.yaml b/v1/ONDC:TRV10/track.yaml new file mode 100644 index 0000000..1241efe --- /dev/null +++ b/v1/ONDC:TRV10/track.yaml @@ -0,0 +1,7 @@ +default: + callback: on_track + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_track.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/update.yaml b/v1/ONDC:TRV10/update.yaml new file mode 100644 index 0000000..c7db22c --- /dev/null +++ b/v1/ONDC:TRV10/update.yaml @@ -0,0 +1,7 @@ +default: + callback: on_update + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_update.yaml" \ No newline at end of file diff --git a/v1/ONDC:TRV10/v1.yaml b/v1/ONDC:TRV10/v1.yaml new file mode 100644 index 0000000..9620eec --- /dev/null +++ b/v1/ONDC:TRV10/v1.yaml @@ -0,0 +1,117 @@ +server: + type: BPP + port: 5500 + sync_mode: false +security: + verify_sign: false + lookup_uri: "http://localhost:3000/lookup" + generate_sign: true + subscriber_id: mock-api-service + ukId: 584 + publickey: 5RF/CSTd5Cksh7xKNE/vr9IlwrV9LT1ZPR8RDeOpWjs= + privatekey: dYo7zgyKYYoGQiVa45qfTQ94ic0bXPjN5KiUMVX0NBHlEX8JJN3kKSyHvEo0T++v0iXCtX0tPVk9HxEN46laOw== +log: + level: DEBUG + output_type: file + out_file: log_file.log +path: + sign: + schema: + type: object + callbacks: + default: + payload: + template: + data: + $ref: "./v1/ONDC:TRV10/search.yaml" + search: + schema: + $ref: "./v1/ONDC:TRV10/schema/search.json" + callbacks: + $ref: "./v1/ONDC:TRV10/search.yaml" + select: + schema: + $ref: "./v1/ONDC:TRV10/schema/select.json" + callbacks: + $ref: "./v1/ONDC:TRV10/select.yaml" + init: + schema: + $ref: "./v1/ONDC:TRV10/schema/init.json" + callbacks: + $ref: "./v1/ONDC:TRV10/init.yaml" + confirm: + schema: + $ref: "./v1/ONDC:TRV10/schema/confirm.json" + callbacks: + $ref: "./v1/ONDC:TRV10/confirm.yaml" + # status: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/status.json" + # callbacks: + # $ref: "./v1/ONDC:TRV10/status.yaml" + update: + schema: + $ref: "./v1/ONDC:TRV10/schema/update.json" + callbacks: + $ref: "./v1/ONDC:TRV10/update.yaml" + # support: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/support.json" + # callbacks: + # $ref: "./v1/ONDC:TRV10/support.yaml" + # track: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/track.json" + # callbacks: + # $ref: "./v1/ONDC:TRV10/track.yaml" + # rating: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/rating.json" + # callbacks: + # $ref: "./v1/ONDC:TRV10/rating.yaml" + on_search: + schema: + $ref: "./v1/ONDC:TRV10/schema/on_search.json" + callbacks: + $ref: "./v1/ONDC:TRV10/on_search.yaml" + on_select: + schema: + $ref: "./v1/ONDC:TRV10/schema/on_select.json" + callbacks: + $ref: "./v1/ONDC:TRV10/on_select.yaml" + on_init: + schema: + $ref: "./v1/ONDC:TRV10/schema/on_init.json" + callbacks: + $ref: "./v1/ONDC:TRV10/on_init.yaml" + on_confirm: + schema: + $ref: "./v1/ONDC:TRV10/schema/on_confirm.json" + callbacks: + $ref: "./v1/ONDC:TRV10/on_confirm.yaml" + # on_status: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/on_status.json" + # callbacks: + # $ref: + on_update: + schema: + $ref: "./v1/ONDC:TRV10/schema/on_update.json" + callbacks: + $ref: + # on_track: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/on_track.json" + # callbacks: + # $ref: + # on_support: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/on_support.json" + # callbacks: + # $ref: + # on_rating: + # schema: + # $ref: "./v1/ONDC:TRV10/schema/on_rating.json" + # callbacks: + # $ref: + \ No newline at end of file diff --git a/v1/nic2004:63032/confirm.yaml b/v1/nic2004:63032/confirm.yaml new file mode 100644 index 0000000..850ae72 --- /dev/null +++ b/v1/nic2004:63032/confirm.yaml @@ -0,0 +1,7 @@ +default: + callback: on_confirm + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_confirm.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/init.yaml b/v1/nic2004:63032/init.yaml new file mode 100644 index 0000000..8022ba7 --- /dev/null +++ b/v1/nic2004:63032/init.yaml @@ -0,0 +1,7 @@ +default: + callback: on_init + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_init.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/on_init.yaml b/v1/nic2004:63032/on_init.yaml new file mode 100644 index 0000000..8457114 --- /dev/null +++ b/v1/nic2004:63032/on_init.yaml @@ -0,0 +1,7 @@ +default: + callback: confirm + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/confirm.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/on_search.yaml b/v1/nic2004:63032/on_search.yaml new file mode 100644 index 0000000..03bdbb8 --- /dev/null +++ b/v1/nic2004:63032/on_search.yaml @@ -0,0 +1,7 @@ +default: + callback: select + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/select.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/on_select.yaml b/v1/nic2004:63032/on_select.yaml new file mode 100644 index 0000000..a054472 --- /dev/null +++ b/v1/nic2004:63032/on_select.yaml @@ -0,0 +1,7 @@ +default: + callback: init + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/init.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/operations/req_body.yaml b/v1/nic2004:63032/operations/req_body.yaml new file mode 100644 index 0000000..1894e70 --- /dev/null +++ b/v1/nic2004:63032/operations/req_body.yaml @@ -0,0 +1,25 @@ +bap_id: + operation: + type: READ + input: + value: "req_body.context.bap_id" +bap_uri: + operation: + type: READ + input: + value: "req_body.context.bap_uri" +context_city: + operation: + type: READ + input: + value: "req_body.context.city" +transaction_id: + operation: + type: READ + input: + value: "req_body.context.transaction_id" +message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" \ No newline at end of file diff --git a/v1/nic2004:63032/payloads/confirm.yaml b/v1/nic2004:63032/payloads/confirm.yaml new file mode 100644 index 0000000..04fe132 --- /dev/null +++ b/v1/nic2004:63032/payloads/confirm.yaml @@ -0,0 +1,144 @@ +context: + action: confirm + bap_id: https://example-bap.com + bap_uri: ++bap_uri++ + bpp_id: https://example-bpp.com + bpp_uri: ++bpp_uri++ + city: ++city_code++ + core_version: 1.0.0 + country: IND + domain: ONDC:TRV10 + message_id: ++msg_id++ + timestamp: ++timestamp++ + transaction_id: ++txn_id++ +message: + order: + fulfillment: + agent: + name: RAGHAVENDRA J + rateable: true + rating: '5' + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/code: localization + groups/1/descriptor/name: Localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + end: + location: + address: + area_code: '' + building: Rangadore Memorial Hospital + city: ++city_code++ + country: India + door: '' + locality: Basavanagudi + state: Karnataka + street: Chikkanna Garden + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + gps: 12.9711869, 77.5868122 + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + start: + location: + address: + area_code: '560061' + building: 6th Main Rd + city: ++city_code++ + country: India + door: 98A, Sarovarm 2nd cross + locality: Uttarahalli Hobli + state: Karnataka 560061 + street: Ramanjaneyanagar + ward: Uttarahalli Hobli, Ramanjaneyanagar + gps: 13.008935, 77.6444085 + vehicle: + category: AUTO_RICKSHAW + id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 + items: + - descriptor: + code: RIDE + name: Auto Ride + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + payment_id: '1' + tags: + groups/1/descriptor/code: fare_policy + groups/1/descriptor/name: Daytime Charges + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/code: fare_policy + groups/2/descriptor/name: Waiting Charges + groups/2/display: 'true' + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/code: info + groups/3/descriptor/name: General Information + groups/3/display: 'true' + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/value: 3 min + payment: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + params: + amount: '81' + currency: INR + transaction_status: NOT-PAID + type: ON-FULFILLMENT + provider: + descriptor: + name: Raghavendra J + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + quote: + breakup: + - price: + currency: INR + value: '30' + title: Base Fare + - price: + currency: INR + value: '56' + title: Per km fare + - price: + currency: INR + value: '2.5' + title: CGST @ 5% + - price: + currency: INR + value: '2.5' + title: SGST @ 5% + currency: INR + value: '81' diff --git a/v1/nic2004:63032/payloads/init.yaml b/v1/nic2004:63032/payloads/init.yaml new file mode 100644 index 0000000..41b00ca --- /dev/null +++ b/v1/nic2004:63032/payloads/init.yaml @@ -0,0 +1,82 @@ +context: + action: init + bap_id: https://example-bap.com + bap_uri: ++bap_uri++ + bpp_id: https://example-bpp.com + bpp_uri: ++bpp_uri++ + city: ++city_code++ + core_version: 1.0.0 + country: IND + domain: ONDC:TRV10 + message_id: ++msg_id++ + timestamp: ++timestamp++ + transaction_id: ++txn_id++ +message: + order: + fulfillment: + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/code: localization + groups/1/descriptor/name: Localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + agent: + name: RAGHAVENDRA J + rateable: true + rating: '5' + end: + location: + address: + area_code: '' + building: Rangadore Memorial Hospital + city: ++city_code++ + country: India + door: '' + locality: Basavanagudi + state: Karnataka + street: Chikkanna Garden + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + gps: 12.9711869, 77.5868122 + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + start: + location: + address: + area_code: '560061' + building: 6th Main Rd + city: ++city_code++ + country: India + door: 98A, Sarovarm 2nd cross + locality: Uttarahalli Hobli + state: Karnataka 560061 + street: Ramanjaneyanagar + ward: Uttarahalli Hobli, Ramanjaneyanagar + gps: 13.008935, 77.6444085 + vehicle: + category: AUTO_RICKSHAW + items: + - fulfillment_id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + payment_id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + payment: + collected_by: BPP + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + type: ON-FULFILLMENT + provider: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + quote: + breakup: + - price: + currency: INR + value: '30' + title: Base Fare + - price: + currency: INR + value: '56' + title: Per km fare + currency: INR + value: '76' diff --git a/v1/nic2004:63032/payloads/on_confirm.yaml b/v1/nic2004:63032/payloads/on_confirm.yaml new file mode 100644 index 0000000..b17e74e --- /dev/null +++ b/v1/nic2004:63032/payloads/on_confirm.yaml @@ -0,0 +1,153 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_confirm + bap_uri: ++bap_uri++ +message: + order: + id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 + provider: + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + descriptor: + name: Raghavendra J + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Waiting Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + quote: + value: '81' + currency: INR + breakup: + - title: Base Fare + price: + value: '30' + currency: INR + - title: Per km fare + price: + value: '56' + currency: INR + - title: CGST @ 5% + price: + value: '2.5' + currency: INR + - title: SGST @ 5% + price: + value: '2.5' + currency: INR + fulfillment: + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + state: + descriptor: + code: DRIVER_EN_ROUTE + name: Driver is on the way + start: + authorization: + type: OTP + token: '234234' + location: + gps: 13.008935, 77.6444085 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9711869, 77.5868122 + address: + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + agent: + name: RAGHAVENDRA J + phone: +91-98978675645 + rateable: true + rating: '5' + vehicle: + category: AUTO_RICKSHAW + registration: KA01JG1231 + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/name: Localization + groups/1/descriptor/code: localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + payment: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + type: ON-FULFILLMENT + params: + amount: '81' + currency: INR + transaction_status: NOT-PAID diff --git a/v1/nic2004:63032/payloads/on_init.yaml b/v1/nic2004:63032/payloads/on_init.yaml new file mode 100644 index 0000000..bfef1de --- /dev/null +++ b/v1/nic2004:63032/payloads/on_init.yaml @@ -0,0 +1,144 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_init + bap_uri: ++bap_uri++ +message: + order: + id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 + provider: + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + descriptor: + name: Raghavendra J + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Waiting Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + quote: + value: '81' + currency: INR + breakup: + - title: Base Fare + price: + value: '30' + currency: INR + - title: Per km fare + price: + value: '56' + currency: INR + - title: CGST @ 5% + price: + value: '2.5' + currency: INR + - title: SGST @ 5% + price: + value: '2.5' + currency: INR + fulfillment: + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + start: + location: + gps: 13.008935, 77.6444085 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9711869, 77.5868122 + address: + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + agent: + name: RAGHAVENDRA J + rateable: true + rating: '5' + vehicle: + category: AUTO_RICKSHAW + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/name: Localization + groups/1/descriptor/code: localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + payment: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + type: ON-FULFILLMENT + params: + amount: '81' + currency: INR + transaction_status: NOT-PAID diff --git a/v1/nic2004:63032/payloads/on_rating.yaml b/v1/nic2004:63032/payloads/on_rating.yaml new file mode 100644 index 0000000..ca59252 --- /dev/null +++ b/v1/nic2004:63032/payloads/on_rating.yaml @@ -0,0 +1,17 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://api.beckn.juspay.in/pilot/bap/cab/v1 + bpp_id: >- + https://api.beckn.juspay.in/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_rating + bap_uri: ++bap_uri++ + transaction_id: ++txn_id++ +message: + feedback_ack: true + rating_ack: true diff --git a/v1/nic2004:63032/payloads/on_search.yaml b/v1/nic2004:63032/payloads/on_search.yaml new file mode 100644 index 0000000..09f64e0 --- /dev/null +++ b/v1/nic2004:63032/payloads/on_search.yaml @@ -0,0 +1,133 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + transaction_id: ++txn_id++ + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_search + bap_uri: ++bap_uri++ +message: + catalog: + bpp/descriptor: + name: Namma Yatri Partner + bpp/providers: + - locations: + - id: '1' + gps: 12.9164682,77.6089985 + - id: '2' + gps: 12.91671,77.6092983 + - id: '3' + gps: 12.9165733,77.6152167 + - id: '4' + gps: 12.9068578,77.6044567 + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + price: + maximum_value: '156' + currency: INR + minimum_value: '176' + value: 156 - 176 INR + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Waiting Charges + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Night Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + fulfillments: + - id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + start: + location: + gps: 12.9099828, 77.6118226 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9351856, 77.62459969999999 + address: + ward: >- + Basavanagudi, Chikkanna Garden, Rangadore Memorial + Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + vehicle: + category: AUTO_RICKSHAW + tags: + groups/1/descriptor/code: route_info + groups/1/descriptor/name: Route Information + groups/1/display: 'true' + groups/1/list/1/descriptor/code: encoded_polyline + groups/1/list/1/descriptor/name: Path + groups/1/list/1/value: _p~iF~ps|U_ulLnnqC_mqNvxq`@ + groups/1/list/2/descriptor/code: waypoints + groups/1/list/2/descriptor/name: Waypoints + groups/1/list/2/value: >- + [{"gps":"12.9099828, 77.6118226"},{"gps":"12.9099828, + 77.6118226"},{"gps":"12.9099828, + 77.6118226"},{"gps":"12.9099828, 77.6118226"}] + payments: + - id: '1' + type: ON-FULFILLMENT + collected_by: BPP diff --git a/v1/nic2004:63032/payloads/on_select.yaml b/v1/nic2004:63032/payloads/on_select.yaml new file mode 100644 index 0000000..a45d935 --- /dev/null +++ b/v1/nic2004:63032/payloads/on_select.yaml @@ -0,0 +1,122 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + transaction_id: ++txn_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_select + bap_uri: ++bap_uri++ +message: + order: + provider: + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + descriptor: + name: Raghavendra J + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Waiting Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + quote: + value: '76' + currency: INR + breakup: + - title: Base Fare + price: + value: '30' + currency: INR + - title: Per km fare + price: + value: '56' + currency: INR + ttl: P200S + fulfillment: + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + state: + descriptor: + name: Found drivers + code: AGENTS_FOUND + start: + location: + gps: 13.008935, 77.6444085 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9711869, 77.5868122 + address: + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + agent: + name: RAGHAVENDRA J + rateable: true + rating: '5' + vehicle: + category: AUTO_RICKSHAW diff --git a/v1/nic2004:63032/payloads/on_status.yaml b/v1/nic2004:63032/payloads/on_status.yaml new file mode 100644 index 0000000..a72a03b --- /dev/null +++ b/v1/nic2004:63032/payloads/on_status.yaml @@ -0,0 +1,153 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_status + bap_uri: ++bap_uri++ +message: + order: + id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 + provider: + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + descriptor: + name: Raghavendra J + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Waiting Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + quote: + value: '81' + currency: INR + breakup: + - title: Base Fare + price: + value: '30' + currency: INR + - title: Per km fare + price: + value: '56' + currency: INR + - title: CGST @ 5% + price: + value: '2.5' + currency: INR + - title: SGST @ 5% + price: + value: '2.5' + currency: INR + fulfillment: + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + state: + descriptor: + code: DRIVER_AT_PICKUP + name: Driver Arrived at Pickup Location + start: + authorization: + type: OTP + token: '234234' + location: + gps: 13.008935, 77.6444085 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9711869, 77.5868122 + address: + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + agent: + name: RAGHAVENDRA J + phone: +91-98978675645 + rateable: true + rating: '5' + vehicle: + category: AUTO_RICKSHAW + registration: KA01JG1231 + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/name: Localization + groups/1/descriptor/code: localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + payment: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + type: ON-FULFILLMENT + params: + amount: '81' + currency: INR + transaction_status: NOT-PAID diff --git a/v1/nic2004:63032/payloads/on_support.yaml b/v1/nic2004:63032/payloads/on_support.yaml new file mode 100644 index 0000000..512a2b9 --- /dev/null +++ b/v1/nic2004:63032/payloads/on_support.yaml @@ -0,0 +1,17 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_support + bap_uri: ++bap_uri++ + transaction_id: ++txn_id++ +message: + phone: '+918068870525' + email: support@nammayatri.in + url: https://support.nammayatri.com/gethelp diff --git a/v1/nic2004:63032/payloads/on_track.yaml b/v1/nic2004:63032/payloads/on_track.yaml new file mode 100644 index 0000000..acfb2a0 --- /dev/null +++ b/v1/nic2004:63032/payloads/on_track.yaml @@ -0,0 +1,19 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_track + bap_uri: ++bap_uri++ + transaction_id: ++txn_id++ +message: + tracking: + content_type: application/json + url: >- + https://api.beckn.juspay.in/dobpp/ui/driver/location/abc9f0aa-bbfd-4e91-b378-41feee12f05f + status: active diff --git a/v1/nic2004:63032/payloads/on_update.yaml b/v1/nic2004:63032/payloads/on_update.yaml new file mode 100644 index 0000000..a12398d --- /dev/null +++ b/v1/nic2004:63032/payloads/on_update.yaml @@ -0,0 +1,154 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: on_confirm + bap_uri: ++bap_uri++ +message: + update_target: order.payment + order: + id: ABC1234 + provider: + id: e8542642-0f4a-454c-9a9f-f46110c367a3 + descriptor: + name: Raghavendra J + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + descriptor: + name: Auto Ride + code: RIDE + tags: + groups/1/descriptor/name: Daytime Charges + groups/1/descriptor/code: fare_policy + groups/1/display: 'true' + groups/1/list/1/descriptor/name: Min Fare upto 2 km + groups/1/list/1/value: ₹ 30 upto 2 km + groups/1/list/2/descriptor/name: Rate above Min. Fare + groups/1/list/2/descriptor/code: extra_fare + groups/1/list/2/value: ₹15 / km + groups/1/list/3/descriptor/name: Driver Pickup Charges + groups/1/list/3/descriptor/code: pickup_charges + groups/1/list/3/value: ₹ 10 + groups/1/list/4/descriptor/name: Nominal Fare + groups/1/list/4/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/4/descriptor/code: nominal_fare + groups/1/list/4/value: ₹ 10 + groups/1/list/5/descriptor/name: Nominal Fare + groups/1/list/5/descriptor/short_desc: >- + Driver may quote extra to cover for traffic, chance of return + trip, etc. + groups/1/list/5/descriptor/code: waiting_charges + groups/1/list/5/value: ₹ 0 / min + groups/2/descriptor/name: Waiting Charges + groups/2/descriptor/code: fare_policy + groups/2/display: 'true' + groups/2/list/1/descriptor/name: Night Charges + groups/2/list/1/descriptor/code: night_charges + groups/2/list/1/value: 1.5x of daytime charges applicable at night from 10 PM to 5 PM + groups/2/list/2/descriptor/name: Night Shift Start + groups/2/list/2/descriptor/code: night_shift_start_time + groups/2/list/2/value: '22:00:00' + groups/2/list/3/descriptor/name: Night Shift End + groups/2/list/3/descriptor/code: night_shift_end_time + groups/2/list/3/value: '05:00:00' + groups/3/descriptor/name: General Information + groups/3/descriptor/code: info + groups/3/display: 'true' + groups/3/list/1/descriptor/name: Distance to nearest driver + groups/3/list/1/descriptor/code: distance_to_nearest_driver + groups/3/list/1/value: 661 m + groups/3/list/2/descriptor/name: Wait time upto + groups/3/list/2/descriptor/code: waiting_time_estimated_threshold + groups/3/list/2/value: 3 min + fulfillment_id: fb5c84d4-1b59-4b9d-96b5-9d79107432c5 + payment_id: '1' + quote: + value: '81' + currency: INR + breakup: + - title: Base Fare + price: + value: '30' + currency: INR + - title: Per km fare + price: + value: '56' + currency: INR + - title: CGST @ 5% + price: + value: '2.5' + currency: INR + - title: SGST @ 5% + price: + value: '2.5' + currency: INR + fulfillment: + id: fulf_5cf064d5-4c0a-42d3-b73d-5f19a6f7468e + state: + descriptor: + code: PAYMENT_COLLECTED + name: Payment received + start: + authorization: + type: OTP + token: '234234' + location: + gps: 13.008935, 77.6444085 + address: + ward: Uttarahalli Hobli, Ramanjaneyanagar + country: India + building: 6th Main Rd + state: Karnataka 560061 + city: ++city_code++ + locality: Uttarahalli Hobli + door: 98A, Sarovarm 2nd cross + area_code: '560061' + street: Ramanjaneyanagar + end: + location: + gps: 12.9711869, 77.5868122 + address: + ward: Basavanagudi, Chikkanna Garden, Rangadore Memorial Hospital + country: India + building: Rangadore Memorial Hospital + state: Karnataka + city: ++city_code++ + locality: Basavanagudi + door: '' + area_code: '' + street: Chikkanna Garden + agent: + name: RAGHAVENDRA J + phone: +91-98978675645 + rateable: true + rating: '5' + vehicle: + category: AUTO_RICKSHAW + registration: KA01JG1231 + customer: + person: + name: John Doe + phone: +91-9897867564 + tags: + groups/1/descriptor/name: Localization + groups/1/descriptor/code: localization + groups/1/display: 'false' + groups/1/list/1/descriptor/code: lang + groups/1/list/1/descriptor/name: Language + groups/1/list/1/value: en + payment: + id: 7f7896dd-787e-4a0b-8675-e9e6fe93bb8f + type: ON-FULFILLMENT + params: + amount: '81' + currency: INR + transaction_status: PAID diff --git a/v1/nic2004:63032/payloads/rating.yaml b/v1/nic2004:63032/payloads/rating.yaml new file mode 100644 index 0000000..bbc63af --- /dev/null +++ b/v1/nic2004:63032/payloads/rating.yaml @@ -0,0 +1,17 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + transaction_id: ++txn_id++ + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: rating + bap_uri: ++bap_uri++ +message: + id: b0462745-f6c9-4100-bbe7-4fa3648b6b40 + rating_category: DRIVER + value: 4 diff --git a/v1/nic2004:63032/payloads/search.yaml b/v1/nic2004:63032/payloads/search.yaml new file mode 100644 index 0000000..0e011a3 --- /dev/null +++ b/v1/nic2004:63032/payloads/search.yaml @@ -0,0 +1,20 @@ +context: + country: IND + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-test-bap.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: search + bap_uri: ++bap_uri++ +message: + intent: + fulfillment: + start: + location: + gps: 12.923608703179461, 77.61462964117527 + end: + location: + gps: 12.9346302, 77.61533969999999 diff --git a/v1/nic2004:63032/payloads/select.yaml b/v1/nic2004:63032/payloads/select.yaml new file mode 100644 index 0000000..67c54d2 --- /dev/null +++ b/v1/nic2004:63032/payloads/select.yaml @@ -0,0 +1,26 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDCTRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + transaction_id: ++txn_id++ + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: select + bap_uri: ++bap_uri++ + max_callbacks: 3 + ttl: P120S +message: + order: + items: + - id: 5777a0bf-9a08-49aa-a97d-1e5561a9622e + fulfillment: + start: + location: + gps: 12.910458, 77.543089 + end: + location: + gps: 12.9535139, 77.5710434 diff --git a/v1/nic2004:63032/payloads/status.yaml b/v1/nic2004:63032/payloads/status.yaml new file mode 100644 index 0000000..8534520 --- /dev/null +++ b/v1/nic2004:63032/payloads/status.yaml @@ -0,0 +1,15 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + transaction_id: ++txn_id++ + message_id: ++msg_id++ + city: ++city_code++ + core_version: 1.0.0 + action: status + bap_uri: ++bap_uri++ +message: + order_id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 diff --git a/v1/nic2004:63032/payloads/support.yaml b/v1/nic2004:63032/payloads/support.yaml new file mode 100644 index 0000000..ec370f6 --- /dev/null +++ b/v1/nic2004:63032/payloads/support.yaml @@ -0,0 +1,15 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + transaction_id: ++txn_id++ + city: ++city_code++ + core_version: 1.0.0 + action: support + bap_uri: ++bap_uri++ +message: + ref_id: 7751bd26-3fdc-47ca-9b64-e998dc5abe68 diff --git a/v1/nic2004:63032/payloads/track.yaml b/v1/nic2004:63032/payloads/track.yaml new file mode 100644 index 0000000..d303977 --- /dev/null +++ b/v1/nic2004:63032/payloads/track.yaml @@ -0,0 +1,15 @@ +context: + country: IND + bpp_uri: ++bpp_uri++ + domain: ONDC:TRV10 + timestamp: ++timestamp++ + bap_id: https://example-bap.com + bpp_id: https://example-bpp.com + message_id: ++msg_id++ + transaction_id: ++txn_id++ + city: ++city_code++ + core_version: 1.0.0 + action: track + bap_uri: ++bap_uri++ +message: + order_id: 22e090fc-b8b1-4437-9126-ff7a71c7845c diff --git a/v1/nic2004:63032/rating.yaml b/v1/nic2004:63032/rating.yaml new file mode 100644 index 0000000..9882dda --- /dev/null +++ b/v1/nic2004:63032/rating.yaml @@ -0,0 +1,7 @@ +default: + callback: on_rating + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_rating.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/schema/cancel.json b/v1/nic2004:63032/schema/cancel.json new file mode 100644 index 0000000..053fd13 --- /dev/null +++ b/v1/nic2004:63032/schema/cancel.json @@ -0,0 +1,164 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + }, + "cancellation_reason_id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/confirm.json b/v1/nic2004:63032/schema/confirm.json new file mode 100644 index 0000000..bebefc5 --- /dev/null +++ b/v1/nic2004:63032/schema/confirm.json @@ -0,0 +1,1982 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/init.json b/v1/nic2004:63032/schema/init.json new file mode 100644 index 0000000..bebefc5 --- /dev/null +++ b/v1/nic2004:63032/schema/init.json @@ -0,0 +1,1982 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_cancel.json b/v1/nic2004:63032/schema/on_cancel.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_cancel.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_confirm.json b/v1/nic2004:63032/schema/on_confirm.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_confirm.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_init.json b/v1/nic2004:63032/schema/on_init.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_init.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_rating.json b/v1/nic2004:63032/schema/on_rating.json new file mode 100644 index 0000000..99bc7b6 --- /dev/null +++ b/v1/nic2004:63032/schema/on_rating.json @@ -0,0 +1,157 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "feedback_ack": { + "description": "If feedback has been recorded or not", + "type": "boolean" + }, + "rating_ack": { + "description": "If rating has been recorded or not", + "type": "boolean" + } + } + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_search.json b/v1/nic2004:63032/schema/on_search.json new file mode 100644 index 0000000..96e8ed0 --- /dev/null +++ b/v1/nic2004:63032/schema/on_search.json @@ -0,0 +1,3808 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "catalog": { + "description": "Describes a BPP catalog", + "type": "object", + "properties": { + "bpp/descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "bpp/categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "bpp/fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "bpp/payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "bpp/offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "bpp/providers": { + "type": "array", + "items": { + "description": "Describes a service provider. This can be a restaurant, a hospital, a Store etc", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "category_id": { + "type": "string", + "description": "Category Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "locations": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + } + }, + "offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "items": { + "type": "array", + "items": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + } + } + } + }, + "required": [ + "catalog" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_select.json b/v1/nic2004:63032/schema/on_select.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_select.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_status.json b/v1/nic2004:63032/schema/on_status.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_status.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_support.json b/v1/nic2004:63032/schema/on_support.json new file mode 100644 index 0000000..08a8161 --- /dev/null +++ b/v1/nic2004:63032/schema/on_support.json @@ -0,0 +1,161 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "format": "phone" + }, + "email": { + "type": "string", + "format": "email" + }, + "uri": { + "type": "string", + "format": "uri" + } + } + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_track.json b/v1/nic2004:63032/schema/on_track.json new file mode 100644 index 0000000..47a1ea6 --- /dev/null +++ b/v1/nic2004:63032/schema/on_track.json @@ -0,0 +1,169 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "tracking": { + "description": "Describes the tracking info of an object", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive" + ] + } + } + } + }, + "required": [ + "tracking" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/on_update.json b/v1/nic2004:63032/schema/on_update.json new file mode 100644 index 0000000..1370d7f --- /dev/null +++ b/v1/nic2004:63032/schema/on_update.json @@ -0,0 +1,2013 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + }, + "error": { + "description": "Describes an error object", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONTEXT-ERROR", + "CORE-ERROR", + "DOMAIN-ERROR", + "POLICY-ERROR", + "JSON-SCHEMA-ERROR" + ] + }, + "code": { + "type": "string", + "description": "Beckn specific error code. For full list of error codes, refer to error_codes.md in the root folder of this repo" + }, + "path": { + "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" + } + }, + "required": [ + "type", + "code" + ] + } + }, + "required": [ + "context" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/rating.json b/v1/nic2004:63032/schema/rating.json new file mode 100644 index 0000000..67037e4 --- /dev/null +++ b/v1/nic2004:63032/schema/rating.json @@ -0,0 +1,169 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "description": "Describes the rating of a person or an object.", + "type": "object", + "properties": { + "rating_category": { + "description": "Category of the object being rated", + "type": "string" + }, + "id": { + "description": "Id of the object being rated", + "type": "string" + }, + "value": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "feedback_form": { + "description": "Describes a feedback form that a BPP can send to get feedback from the BAP", + "type": "array", + "items": { + "description": "An element in the feedback form. It can be question or an answer to the question.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "parent_id": { + "type": "string" + }, + "question": { + "description": "Specifies the question to which the answer options will be contained in the child FeedbackFormElements", + "type": "string" + }, + "answer": { + "description": "Specifies an answer option to which the question will be in the FeedbackFormElement specified in parent_id", + "type": "string" + }, + "answer_type": { + "description": "Specifies how the answer option should be rendered.", + "type": "string", + "enum": [ + "radio", + "checkbox", + "text" + ] + } + } + } + }, + "feedback_id": { + "type": "string", + "description": "This value will be placed in the the $feedback_id url param in case of http/get and in the requestBody http/post requests" + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/search.json b/v1/nic2004:63032/schema/search.json new file mode 100644 index 0000000..ea1ab1d --- /dev/null +++ b/v1/nic2004:63032/schema/search.json @@ -0,0 +1,3949 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "intent": { + "description": "Intent of a user. Used for searching for services", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "provider": { + "description": "Describes a service provider. This can be a restaurant, a hospital, a Store etc", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "category_id": { + "type": "string", + "description": "Category Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "categories": { + "type": "array", + "items": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "fulfillments": { + "type": "array", + "items": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "payments": { + "type": "array", + "items": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "locations": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + } + }, + "offers": { + "type": "array", + "items": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "items": { + "type": "array", + "items": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "exp": { + "type": "string", + "description": "Time after which catalog has to be refreshed", + "format": "date-time" + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "category": { + "description": "Describes a category", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique id of the category" + }, + "parent_category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "offer": { + "description": "Describes an offer", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "location_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "category_ids": { + "type": "array", + "items": { + "type": "string", + "description": "Unique id of the category" + } + }, + "item_ids": { + "type": "array", + "items": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "item": { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/select.json b/v1/nic2004:63032/schema/select.json new file mode 100644 index 0000000..bebefc5 --- /dev/null +++ b/v1/nic2004:63032/schema/select.json @@ -0,0 +1,1982 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/status.json b/v1/nic2004:63032/schema/status.json new file mode 100644 index 0000000..abce85c --- /dev/null +++ b/v1/nic2004:63032/schema/status.json @@ -0,0 +1,125 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/support.json b/v1/nic2004:63032/schema/support.json new file mode 100644 index 0000000..e676446 --- /dev/null +++ b/v1/nic2004:63032/schema/support.json @@ -0,0 +1,122 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "ref_id": { + "type": "string", + "description": "ID of the element for which support is needed" + } + } + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/track.json b/v1/nic2004:63032/schema/track.json new file mode 100644 index 0000000..13bfd5e --- /dev/null +++ b/v1/nic2004:63032/schema/track.json @@ -0,0 +1,129 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "Hash of order object without id" + }, + "callback_url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "order_id" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/schema/update.json b/v1/nic2004:63032/schema/update.json new file mode 100644 index 0000000..b6757cd --- /dev/null +++ b/v1/nic2004:63032/schema/update.json @@ -0,0 +1,1987 @@ +{ + "type": "object", + "properties": { + "context": { + "description": "Describes a beckn message context", + "type": "object", + "properties": { + "domain": { + "description": "Describes the domain of an object", + "type": "string" + }, + "country": { + "type": "string", + "description": "Country code as per ISO 3166-1 and ISO 3166-2 format" + }, + "city": { + "type": "string", + "description": "City code" + }, + "action": { + "type": "string", + "description": "Defines the Beckn API call. Any actions other than the enumerated actions are not supported by Beckn Protocol", + "enum": [ + "search", + "select", + "init", + "confirm", + "update", + "status", + "track", + "cancel", + "rating", + "support", + "on_search", + "on_select", + "on_init", + "on_confirm", + "on_update", + "on_status", + "on_track", + "on_cancel", + "on_rating", + "on_support" + ] + }, + "core_version": { + "type": "string", + "description": "Version of Beckn core API specification being used" + }, + "bap_id": { + "type": "string", + "description": "Unique id of the BAP. By default it is the fully qualified domain name of the BAP" + }, + "bap_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BAP for accepting callbacks. Must have the same domain name as the bap_id" + }, + "bpp_id": { + "type": "string", + "description": "Unique id of the BPP. By default it is the fully qualified domain name of the BPP" + }, + "bpp_uri": { + "type": "string", + "format": "uri", + "description": "URI of the BPP. Must have the same domain name as the bap_id" + }, + "transaction_id": { + "type": "string", + "description": "This is a unique value which persists across all API calls from search through confirm" + }, + "message_id": { + "type": "string", + "description": "This is a unique value which persists during a request / callback cycle" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Time of request generation in RFC3339 format" + }, + "key": { + "type": "string", + "description": "The encryption public key of the sender" + }, + "max_callbacks": { + "description": "Number of callbacks expected. If this value is -1, then there is no limit. If it is 0, then no callbacks are expected.", + "type": "integer", + "minimum": -1 + }, + "ttl": { + "type": "string", + "description": "The duration in ISO8601 format after timestamp for which this message holds valid" + } + }, + "required": [ + "domain", + "action", + "country", + "city", + "core_version", + "transaction_id", + "message_id", + "bap_id", + "bap_uri", + "timestamp" + ] + }, + "message": { + "type": "object", + "properties": { + "update_target": { + "description": "Comma separated values of order objects being updated. For example: ```\"update_target\":\"item,billing,fulfillment\"```", + "type": "string" + }, + "order": { + "description": "Describes the details of an order", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Hash of order object without id" + }, + "state": { + "type": "string" + }, + "provider": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Id of the provider" + }, + "locations": { + "type": "array", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Describes an item. Allows for domain extension.", + "type": "object", + "properties": { + "id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "parent_item_id": { + "description": "This is the most unique identifier of a service item. An example of an Item ID could be the SKU of a product.", + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "category_id": { + "type": "string", + "description": "Unique id of the category" + }, + "fulfillment_id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "location_id": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "matched": { + "type": "boolean" + }, + "related": { + "type": "boolean" + }, + "recommended": { + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "properties": { + "quantity": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0 + }, + "measure": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + } + } + ], + "type": "object", + "required": [ + "id" + ] + } + }, + "add_ons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the add-on. This follows the syntax {item.id}/add-on/{add-on unique id} for item specific add-on OR " + } + }, + "required": [ + "id" + ] + } + }, + "offers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + }, + "documents": { + "type": "array", + "items": { + "description": "Describes a document which can be sent as a url", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "label": { + "type": "string" + } + } + } + }, + "billing": { + "description": "Describes a billing event", + "type": "object", + "properties": { + "name": { + "description": "Personal details of the customer needed for billing.", + "type": "string" + }, + "organization": { + "description": "Describes an organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cred": { + "type": "string" + } + } + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "tax_number": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "phone" + ] + }, + "fulfillment": { + "description": "Describes how a single product/service will be rendered/fulfilled to the end customer", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique reference ID to the fulfillment of an order" + }, + "type": { + "type": "string", + "description": "This describes the type of fulfillment" + }, + "provider_id": { + "type": "string", + "description": "Id of the provider" + }, + "rating": { + "description": "Rating value given to the object", + "type": "number", + "minimum": 0 + }, + "state": { + "description": "Describes a state", + "type": "object", + "properties": { + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "updated_by": { + "type": "string", + "description": "ID of entity which changed the state" + } + } + }, + "tracking": { + "type": "boolean", + "description": "Indicates whether the fulfillment allows tracking", + "default": false + }, + "customer": { + "type": "object", + "properties": { + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "agent": { + "description": "Describes an order executor", + "allOf": [ + { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + } + } + } + ] + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "vehicle": { + "description": "Describes the properties of a vehicle used in a mobility service", + "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" + } + } + }, + "start": { + "description": "Details on the start of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "end": { + "description": "Details on the end of fulfillment", + "type": "object", + "properties": { + "location": { + "description": "Describes the location of a runtime object.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "descriptor": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "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+)?)$" + }, + "address": { + "description": "Describes an address", + "type": "object", + "properties": { + "door": { + "type": "string", + "description": "Door / Shop number of the address" + }, + "name": { + "type": "string", + "description": "Name of address if applicable. Example, shop name" + }, + "building": { + "type": "string", + "description": "Name of the building or block" + }, + "street": { + "type": "string", + "description": "Street name or number" + }, + "locality": { + "type": "string", + "description": "Name of the locality, apartments" + }, + "ward": { + "type": "string", + "description": "Name or number of the ward if applicable" + }, + "city": { + "type": "string", + "description": "City name" + }, + "state": { + "type": "string", + "description": "State name" + }, + "country": { + "type": "string", + "description": "Country name" + }, + "area_code": { + "type": "string", + "description": "Area code. This can be Pincode, ZIP code or any equivalent" + } + } + }, + "station_code": { + "type": "string" + }, + "city": { + "description": "Describes a city", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the city" + }, + "code": { + "type": "string", + "description": "City code" + } + } + }, + "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" + } + } + }, + "circle": { + "description": "Describes a circular area on the map", + "type": "object", + "properties": { + "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+)?)$" + }, + "radius": { + "description": "An object representing a scalar quantity.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CONSTANT", + "VARIABLE" + ] + }, + "value": { + "type": "number" + }, + "estimated_value": { + "type": "number" + }, + "computed_value": { + "type": "number" + }, + "range": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } + }, + "unit": { + "type": "string" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "gps", + "radius" + ] + }, + "polygon": { + "type": "string" + }, + "3dspace": { + "type": "string" + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "instructions": { + "description": "Describes the description of a real-world object.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "short_desc": { + "type": "string" + }, + "long_desc": { + "type": "string" + }, + "images": { + "type": "array", + "items": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + } + }, + "audio": { + "type": "string", + "format": "uri" + }, + "3d_render": { + "type": "string", + "format": "uri" + } + } + }, + "contact": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "person": { + "description": "Describes a person.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Describes the name of a person in format: ./{given_name}/{honorific_prefix}/{first_name}/{middle_name}/{last_name}/{honorific_suffix}", + "pattern": "^\\./[^/]+/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*$" + }, + "image": { + "description": "Image of an object.

A url based image will look like

```uri:http://path/to/image```

An image can also be sent as a data string. For example :

```data:js87y34ilhriuho84r3i4```", + "type": "string" + }, + "dob": { + "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" + }, + "cred": { + "type": "string" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "authorization": { + "description": "Describes an authorization mechanism", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of authorization mechanism used" + }, + "token": { + "type": "string", + "description": "Token used for authorization" + }, + "valid_from": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format from which token is valid" + }, + "valid_to": { + "type": "string", + "format": "date-time", + "description": "Timestamp in RFC3339 format until which token is valid" + }, + "status": { + "type": "string", + "description": "Status of the token" + } + } + } + } + }, + "rateable": { + "description": "If the entity can be rated or not", + "type": "boolean" + }, + "tags": { + "type": "object", + "description": "A simple key-value store which is used to contain extended metadata. However, grouped tags can be created using the recommendations provided in docs/protocol-drafts/BECKN-The-Tags-Schema-Draft-01.md", + "additionalProperties": { + "type": "string" + } + } + } + }, + "quote": { + "description": "Describes a quote", + "type": "object", + "properties": { + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + }, + "breakup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "price": { + "description": "Describes the price of an item. Allows for domain extension.", + "type": "object", + "properties": { + "currency": { + "type": "string" + }, + "value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "estimated_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "computed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "listed_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "offered_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "minimum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "maximum_value": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + } + } + } + } + } + }, + "ttl": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + } + } + }, + "payment": { + "description": "Describes a payment", + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "A payment uri 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. And example url would be : https://www.example.com/pay?txid=$transaction_id&amount=$amount&vpa=upiid&payee=shopez&billno=1234", + "format": "uri" + }, + "tl_method": { + "type": "string", + "enum": [ + "http/get", + "http/post" + ] + }, + "params": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "description": "This value will be placed in the the $transaction_id url param in case of http/get and in the requestBody http/post requests" + }, + "transaction_status": { + "type": "string" + }, + "amount": { + "description": "Describes a decimal value", + "type": "string", + "pattern": "[+-]?([0-9]*[.])?[0-9]+" + }, + "currency": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + }, + "required": [ + "currency" + ] + }, + "type": { + "type": "string", + "enum": [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT" + ] + }, + "status": { + "type": "string", + "enum": [ + "PAID", + "NOT-PAID" + ] + }, + "time": { + "description": "Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations", + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "duration": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "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": { + "description": "Describes a schedule", + "type": "object", + "properties": { + "frequency": { + "description": "Describes duration as per ISO8601 format", + "type": "string" + }, + "holidays": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "times": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "update_target", + "order" + ] + } + }, + "required": [ + "context", + "message" + ] +} \ No newline at end of file diff --git a/v1/nic2004:63032/search.yaml b/v1/nic2004:63032/search.yaml new file mode 100644 index 0000000..b604b19 --- /dev/null +++ b/v1/nic2004:63032/search.yaml @@ -0,0 +1,7 @@ +default: + callback: on_search + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_search.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/select.yaml b/v1/nic2004:63032/select.yaml new file mode 100644 index 0000000..16c43cf --- /dev/null +++ b/v1/nic2004:63032/select.yaml @@ -0,0 +1,7 @@ +default: + callback: on_select + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_select.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/status.yaml b/v1/nic2004:63032/status.yaml new file mode 100644 index 0000000..5a3f226 --- /dev/null +++ b/v1/nic2004:63032/status.yaml @@ -0,0 +1,7 @@ +default: + callback: on_status + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_status.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/support.yaml b/v1/nic2004:63032/support.yaml new file mode 100644 index 0000000..d02c61e --- /dev/null +++ b/v1/nic2004:63032/support.yaml @@ -0,0 +1,7 @@ +default: + callback: on_support + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_support.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/template/confirm.yaml b/v1/nic2004:63032/template/confirm.yaml new file mode 100644 index 0000000..4e8f0ce --- /dev/null +++ b/v1/nic2004:63032/template/confirm.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/init.yaml b/v1/nic2004:63032/template/init.yaml new file mode 100644 index 0000000..4ac7556 --- /dev/null +++ b/v1/nic2004:63032/template/init.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_confirm.yaml b/v1/nic2004:63032/template/on_confirm.yaml new file mode 100644 index 0000000..da82894 --- /dev/null +++ b/v1/nic2004:63032/template/on_confirm.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_init.yaml b/v1/nic2004:63032/template/on_init.yaml new file mode 100644 index 0000000..f0f8ade --- /dev/null +++ b/v1/nic2004:63032/template/on_init.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_rating.yaml b/v1/nic2004:63032/template/on_rating.yaml new file mode 100644 index 0000000..1a5ba90 --- /dev/null +++ b/v1/nic2004:63032/template/on_rating.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_rating.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_search.yaml b/v1/nic2004:63032/template/on_search.yaml new file mode 100644 index 0000000..eda9ee2 --- /dev/null +++ b/v1/nic2004:63032/template/on_search.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_search.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_select.yaml b/v1/nic2004:63032/template/on_select.yaml new file mode 100644 index 0000000..c0f699a --- /dev/null +++ b/v1/nic2004:63032/template/on_select.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_status.yaml b/v1/nic2004:63032/template/on_status.yaml new file mode 100644 index 0000000..a8ca6a0 --- /dev/null +++ b/v1/nic2004:63032/template/on_status.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_status.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_support.yaml b/v1/nic2004:63032/template/on_support.yaml new file mode 100644 index 0000000..0c310d9 --- /dev/null +++ b/v1/nic2004:63032/template/on_support.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_support.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_track.yaml b/v1/nic2004:63032/template/on_track.yaml new file mode 100644 index 0000000..4320b5b --- /dev/null +++ b/v1/nic2004:63032/template/on_track.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_track.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/on_update.yaml b/v1/nic2004:63032/template/on_update.yaml new file mode 100644 index 0000000..202e05e --- /dev/null +++ b/v1/nic2004:63032/template/on_update.yaml @@ -0,0 +1,38 @@ +template: + data: + $ref: "../payloads/on_update.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + $ref: "../operations/req_body.yaml#/message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/template/select.yaml b/v1/nic2004:63032/template/select.yaml new file mode 100644 index 0000000..cfd3115 --- /dev/null +++ b/v1/nic2004:63032/template/select.yaml @@ -0,0 +1,41 @@ +template: + data: + $ref: "../payloads/select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + bpp_name: Test Name + provider_name: Nama yatri + number: 9483292144x + item_id: HR26DQ5551 + item_name: Auto Ricksha + price: 350INR + payment_type: ON-FULLFILMENT + collected_by: BPP + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + start_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.start.location.gps" + end_gps: + operation: + type: READ + input: + value: "req_body.message.intent.fulfillment.end.location.gps" + diff --git a/v1/nic2004:63032/track.yaml b/v1/nic2004:63032/track.yaml new file mode 100644 index 0000000..1241efe --- /dev/null +++ b/v1/nic2004:63032/track.yaml @@ -0,0 +1,7 @@ +default: + callback: on_track + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_track.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/update.yaml b/v1/nic2004:63032/update.yaml new file mode 100644 index 0000000..c7db22c --- /dev/null +++ b/v1/nic2004:63032/update.yaml @@ -0,0 +1,7 @@ +default: + callback: on_update + uri: + $ref: "./operations/req_body.yaml#/bap_uri" + delay: 300 + payload: + $ref: "./template/on_update.yaml" \ No newline at end of file diff --git a/v1/nic2004:63032/v1.yaml b/v1/nic2004:63032/v1.yaml new file mode 100644 index 0000000..4e7e33b --- /dev/null +++ b/v1/nic2004:63032/v1.yaml @@ -0,0 +1,117 @@ +server: + type: BPP + port: 5500 + sync_mode: true +security: + verify_sign: false + lookup_uri: "http://localhost:3000/lookup" + generate_sign: true + subscriber_id: mock-api-service + ukId: 584 + publickey: 5RF/CSTd5Cksh7xKNE/vr9IlwrV9LT1ZPR8RDeOpWjs= + privatekey: dYo7zgyKYYoGQiVa45qfTQ94ic0bXPjN5KiUMVX0NBHlEX8JJN3kKSyHvEo0T++v0iXCtX0tPVk9HxEN46laOw== +log: + level: DEBUG + output_type: file + out_file: log_file.log +path: + sign: + schema: + type: object + callbacks: + default: + payload: + template: + data: + $ref: "./v1/nic2004:63032/search.yaml" + search: + schema: + $ref: "./v1/nic2004:63032/schema/search.json" + callbacks: + $ref: "./v1/nic2004:63032/search.yaml" + select: + schema: + $ref: "./v1/nic2004:63032/schema/select.json" + callbacks: + $ref: "./v1/nic2004:63032/select.yaml" + init: + schema: + $ref: "./v1/nic2004:63032/schema/init.json" + callbacks: + $ref: "./v1/nic2004:63032/init.yaml" + confirm: + schema: + $ref: "./v1/nic2004:63032/schema/confirm.json" + callbacks: + $ref: "./v1/nic2004:63032/confirm.yaml" + status: + schema: + $ref: "./v1/nic2004:63032/schema/status.json" + callbacks: + $ref: "./v1/nic2004:63032/status.yaml" + update: + schema: + $ref: "./v1/nic2004:63032/schema/update.json" + callbacks: + $ref: "./v1/nic2004:63032/update.yaml" + support: + schema: + $ref: "./v1/nic2004:63032/schema/support.json" + callbacks: + $ref: "./v1/nic2004:63032/support.yaml" + track: + schema: + $ref: "./v1/nic2004:63032/schema/track.json" + callbacks: + $ref: "./v1/nic2004:63032/track.yaml" + rating: + schema: + $ref: "./v1/nic2004:63032/schema/rating.json" + callbacks: + $ref: "./v1/nic2004:63032/rating.yaml" + on_search: + schema: + $ref: "./v1/nic2004:63032/schema/on_search.json" + callbacks: + $ref: "./v1/nic2004:63032/on_search.yaml" + on_select: + schema: + $ref: "./v1/nic2004:63032/schema/on_select.json" + callbacks: + $ref: "./v1/nic2004:63032/on_select.yaml" + on_init: + schema: + $ref: "./v1/nic2004:63032/schema/on_init.json" + callbacks: + $ref: "./v1/nic2004:63032/on_init.yaml" + on_confirm: + schema: + $ref: "./v1/nic2004:63032/schema/on_confirm.json" + callbacks: + $ref: + on_status: + schema: + $ref: "./v1/nic2004:63032/schema/on_status.json" + callbacks: + $ref: + on_update: + schema: + $ref: "./v1/nic2004:63032/schema/on_update.json" + callbacks: + $ref: + on_track: + schema: + $ref: "./v1/nic2004:63032/schema/on_track.json" + callbacks: + $ref: + on_support: + schema: + $ref: "./v1/nic2004:63032/schema/on_support.json" + callbacks: + $ref: + on_rating: + schema: + $ref: "./v1/nic2004:63032/schema/on_rating.json" + callbacks: + $ref: + \ No newline at end of file diff --git a/v2/ONDC:RET10/confirm.yaml b/v2/ONDC:RET10/confirm.yaml new file mode 100644 index 0000000..afd612e --- /dev/null +++ b/v2/ONDC:RET10/confirm.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_confirm" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_confirm.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/init.yaml b/v2/ONDC:RET10/init.yaml new file mode 100644 index 0000000..e13174a --- /dev/null +++ b/v2/ONDC:RET10/init.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_init" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_init.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_confirm.yaml b/v2/ONDC:RET10/on_confirm.yaml new file mode 100644 index 0000000..2c26db3 --- /dev/null +++ b/v2/ONDC:RET10/on_confirm.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_confirm" + uri: + $ref: "" + delay: 300 + payload: + $ref: "" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_init.yaml b/v2/ONDC:RET10/on_init.yaml new file mode 100644 index 0000000..4af04b0 --- /dev/null +++ b/v2/ONDC:RET10/on_init.yaml @@ -0,0 +1,7 @@ +default: + callback: "confirm" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/confirm.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_search.yaml b/v2/ONDC:RET10/on_search.yaml new file mode 100644 index 0000000..e99cec0 --- /dev/null +++ b/v2/ONDC:RET10/on_search.yaml @@ -0,0 +1,7 @@ +default: + callback: "select" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/select.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_select.yaml b/v2/ONDC:RET10/on_select.yaml new file mode 100644 index 0000000..d31176d --- /dev/null +++ b/v2/ONDC:RET10/on_select.yaml @@ -0,0 +1,7 @@ +default: + callback: "init" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/init.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_status.yaml b/v2/ONDC:RET10/on_status.yaml new file mode 100644 index 0000000..490c841 --- /dev/null +++ b/v2/ONDC:RET10/on_status.yaml @@ -0,0 +1,7 @@ +default: + callback: "" + uri: + $ref: "" + delay: 300 + payload: + $ref: "" \ No newline at end of file diff --git a/v2/ONDC:RET10/on_update.yaml b/v2/ONDC:RET10/on_update.yaml new file mode 100644 index 0000000..490c841 --- /dev/null +++ b/v2/ONDC:RET10/on_update.yaml @@ -0,0 +1,7 @@ +default: + callback: "" + uri: + $ref: "" + delay: 300 + payload: + $ref: "" \ No newline at end of file diff --git a/v2/ONDC:RET10/operations/req_body.yaml b/v2/ONDC:RET10/operations/req_body.yaml new file mode 100644 index 0000000..42fba4e --- /dev/null +++ b/v2/ONDC:RET10/operations/req_body.yaml @@ -0,0 +1,40 @@ +bap_id: + operation: + type: READ + input: + value: "req_body.context.bap_id" +bap_uri: + operation: + type: READ + input: + value: "req_body.context.bap_uri" +context_city: + operation: + type: READ + input: + value: "req_body.context.city" +transaction_id: + operation: + type: READ + input: + value: "req_body.context.transaction_id" +message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" +context_country: + operation: + type: READ + input: + value: "req_body.context.country" +context_domain: + operation: + type: READ + input: + value: "req_body.context.domain" +context_transaction_id: + operation: + type: READ + input: + value: "req_body.context.transaction_id" diff --git a/v2/ONDC:RET10/payloads/confirm.yaml b/v2/ONDC:RET10/payloads/confirm.yaml new file mode 100644 index 0000000..f6abf1b --- /dev/null +++ b/v2/ONDC:RET10/payloads/confirm.yaml @@ -0,0 +1,166 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: confirm + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + id: O1 + status: ACTIVE + provider: + id: P1 + locations: + - id: L1 + items: + - id: I1 + fulfillment_ids: + - F1 + quantity: + selected: + count: 200 + add_ons: + - id: '78787723' + tags: + - descriptor: + code: BUYER_TERMS + list: + - descriptor: + code: ITEM_REQ + value: free text on Item Customization + - descriptor: + code: PACKAGING_REQ + value: free text on packaging Customization + billing: + name: ONDC buyer + address: B005 aaspire heights, Jurong East, SGP, 680230 + state: + name: Jurong East + city: + name: Jurong East + tax_id: XXXXXXXXXXXXXXX + email: nobody@nomail.com + phone: '9886098860' + fulfillments: + - id: F1 + type: Delivery + tracking: false + stops: + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + address: 'My House #, My buildin' + city: + name: Jurong East + country: + code: SGP + area_code: '680230' + state: + name: '' + contact: + phone: '9886098860' + email: nobody@nomail.com + customer: + person: + name: Ramu + tags: + - descriptor: + code: DELIVERY_TERMS + list: + - descriptor: + code: INCOTERMS + value: CIF + - descriptor: + code: DELIVERY_DUTY + value: DDP + quote: + price: + currency: INR + value: '53600' + breakup: + - '@ondc/org/item_id': I1 + '@ondc/org/item_quantity': + count: 200 + title: Dhara Mustard Oil + '@ondc/org/title_type': item + price: + currency: INR + value: '50000' + item: + price: + currency: INR + value: '250' + - '@ondc/org/item_id': F1 + title: Delivery charges + '@ondc/org/title_type': delivery + price: + currency: INR + value: '4000' + - '@ondc/org/item_id': F1 + title: Packing charges + '@ondc/org/title_type': packing + price: + currency: INR + value: '500' + - '@ondc/org/item_id': I1 + title: Tax + '@ondc/org/title_type': tax + price: + currency: INR + value: '0' + - '@ondc/org/item_id': I1 + title: Discount + '@ondc/org/title_type': discount + price: + currency: INR + value: '-1000' + - '@ondc/org/item_id': F1 + title: Convenience Fee + '@ondc/org/title_type': misc + price: + currency: INR + value: '100' + ttl: P1D + payments: + - params: + currency: INR + transaction_id: '3937' + amount: '53600' + status: NOT-PAID + type: ON-ORDER + collected_by: BPP + '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '0' + '@ondc/org/settlement_details': + - settlement_counterparty: buyer-app + settlement_phase: sale-amount + settlement_type: upi + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + beneficiary_name: xxxxx + bank_name: xxxx + branch_name: xxxx + tags: + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx + created_at: '2023-02-03T09:30:00.000Z' + updated_at: '2023-02-03T09:30:00.000Z' diff --git a/v2/ONDC:RET10/payloads/init.yaml b/v2/ONDC:RET10/payloads/init.yaml new file mode 100644 index 0000000..740eb55 --- /dev/null +++ b/v2/ONDC:RET10/payloads/init.yaml @@ -0,0 +1,96 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: init + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + provider: + id: P1 + locations: + - id: L1 + ttl: P1D + items: + - id: I1 + fulfillment_ids: + - F1 + quantity: + selected: + count: 200 + tags: + - descriptor: + code: BUYER_TERMS + list: + - descriptor: + code: ITEM_REQ + value: free text on Item Customization + - descriptor: + code: PACKAGING_REQ + value: free text on packaging Customization + billing: + name: ONDC buyer + address: B005 aaspire heights, Jurong East, SGP, 680230 + state: + name: Jurong East + city: + name: Jurong East + tax_id: XXXXXXXXXXXXXXX + email: nobody@nomail.com + phone: '9886098860' + fulfillments: + - id: F1 + type: Delivery + stops: + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + address: 'My House #, My buildin' + city: + name: Jurong East + country: + code: SGP + area_code: '680230' + state: + name: '' + contact: + phone: '9886098860' + customer: + person: + creds: + - id: ESG-12345678 + type: License + url: http://abcd.dnb.com/verify?id=ESG-12345678 + tags: + - descriptor: + code: DELIVERY_TERMS + list: + - descriptor: + code: INCOTERMS + value: CIF + - descriptor: + code: DELIVERY_DUTY + value: DDP + payments: + - type: ON-FULFILLMENT + tags: + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx diff --git a/v2/ONDC:RET10/payloads/on_confirm.yaml b/v2/ONDC:RET10/payloads/on_confirm.yaml new file mode 100644 index 0000000..61a28ce --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_confirm.yaml @@ -0,0 +1,184 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_confirm + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + id: O1 + status: ACTIVE + provider: + id: P1 + locations: + - id: L1 + rateable: true + items: + - id: I1 + fulfillment_ids: + - F1 + quantity: + selected: + count: 200 + add_ons: + - id: '78787723' + tags: + - descriptor: + code: BUYER_TERMS + list: + - descriptor: + code: ITEM_REQ + value: free text on Item Customization + - descriptor: + code: PACKAGING_REQ + value: free text on packaging Customization + billing: + name: ONDC buyer + address: B005 aaspire heights, Jurong East, SGP, 680230 + state: + name: Jurong East + city: + name: Jurong East + tax_id: XXXXXXXXXXXXXXX + email: nobody@nomail.com + phone: '9886098860' + fulfillments: + - id: F1 + '@ondc/org/provider_name': Loadshare + state: + descriptor: + code: Pending + type: Delivery + tracking: false + stops: + - type: start + location: + id: L1 + descriptor: + name: ABC Store + gps: 12.956399,77.636803 + time: + range: + start: '2023-02-03T10:00:00.000Z' + end: '2023-02-03T10:30:00.000Z' + instructions: + name: Status for pickup + short_desc: Pickup Confirmation Code + contact: + phone: '9886098860' + email: nobody@nomail.com + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + address: 'My House #, My buildin' + city: + name: Jurong East + country: + code: SGP + area_code: '680230' + state: + name: '' + contact: + phone: '9886098860' + rateable: true + tags: + - descriptor: + code: DELIVERY_TERMS + list: + - descriptor: + code: INCOTERMS + value: CIF + - descriptor: + code: DELIVERY_DUTY + value: DDP + quote: + price: + currency: INR + value: '53600' + breakup: + - '@ondc/org/item_id': I1 + '@ondc/org/item_quantity': + count: 200 + title: Dhara Mustard Oil + '@ondc/org/title_type': item + price: + currency: INR + value: '50000' + item: + price: + currency: INR + value: '250' + - '@ondc/org/item_id': F1 + title: Delivery charges + '@ondc/org/title_type': delivery + price: + currency: INR + value: '4000' + - '@ondc/org/item_id': F1 + title: Packing charges + '@ondc/org/title_type': packing + price: + currency: INR + value: '500' + - '@ondc/org/item_id': I1 + title: Tax + '@ondc/org/title_type': tax + price: + currency: INR + value: '0' + - '@ondc/org/item_id': I1 + title: Discount + '@ondc/org/title_type': discount + price: + currency: INR + value: '-1000' + - '@ondc/org/item_id': F1 + title: Convenience Fee + '@ondc/org/title_type': misc + price: + currency: INR + value: '100' + ttl: P1D + payments: + - params: + currency: INR + transaction_id: '3937' + amount: '53600' + status: NOT-PAID + type: ON-ORDER + collected_by: BPP + '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '0' + '@ondc/org/settlement_details': + - settlement_counterparty: seller-app + settlement_phase: sale-amount + beneficiary_name: xxxxx + settlement_type: upi + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + bank_name: xxxx + branch_name: xxxx + tags: + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx + created_at: '2023-02-03T09:30:00.000Z' + updated_at: '2023-02-03T09:31:30.000Z' diff --git a/v2/ONDC:RET10/payloads/on_init.yaml b/v2/ONDC:RET10/payloads/on_init.yaml new file mode 100644 index 0000000..d06aabc --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_init.yaml @@ -0,0 +1,149 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_init + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + provider: + id: P1 + items: + - id: I1 + fulfillment_ids: + - F1 + quantity: + selected: + count: 200 + add_ons: + - id: '78787723' + tags: + - descriptor: + code: BUYER_TERMS + list: + - descriptor: + code: ITEM_REQ + value: free text on Item Customization + - descriptor: + code: PACKAGING_REQ + value: free text on packaging Customization + billing: + name: ONDC buyer + address: B005 aaspire heights, Jurong East, SGP, 680230 + state: + name: Jurong East + city: + name: Jurong East + tax_id: XXXXXXXXXXXXXXX + email: nobody@nomail.com + phone: '9886098860' + fulfillments: + - id: F1 + type: Delivery + tracking: false + stops: + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + address: 'My House #, My buildin' + city: + name: Jurong East + country: + code: SGP + area_code: '680230' + state: + name: '' + contact: + phone: '9886098860' + tags: + - descriptor: + code: DELIVERY_TERMS + list: + - descriptor: + code: INCOTERMS + value: CIF + - descriptor: + code: DELIVERY_DUTY + value: DDP + quote: + price: + currency: INR + value: '53600' + breakup: + - '@ondc/org/item_id': I1 + '@ondc/org/item_quantity': + count: 200 + title: Dhara Mustard Oil + '@ondc/org/title_type': item + price: + currency: INR + value: '50000' + item: + price: + currency: INR + value: '250' + - '@ondc/org/item_id': F1 + title: Delivery charges + '@ondc/org/title_type': delivery + price: + currency: INR + value: '4000' + - '@ondc/org/item_id': F1 + title: Packing charges + '@ondc/org/title_type': packing + price: + currency: INR + value: '500' + - '@ondc/org/item_id': I1 + title: Tax + '@ondc/org/title_type': tax + price: + currency: INR + value: '0' + - '@ondc/org/item_id': I1 + title: Discount + '@ondc/org/title_type': discount + price: + currency: INR + value: '-1000' + - '@ondc/org/item_id': F1 + title: Convenience Fee + '@ondc/org/title_type': misc + price: + currency: INR + value: '100' + ttl: P1D + payments: + - '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '0' + '@ondc/org/settlement_details': + - settlement_counterparty: buyer-app + settlement_phase: sale-amount + settlement_type: upi + beneficiary_name: xxxxx + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + bank_name: xxxx + branch_name: xxxx + tags: + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx diff --git a/v2/ONDC:RET10/payloads/on_search.yaml b/v2/ONDC:RET10/payloads/on_search.yaml new file mode 100644 index 0000000..81b5606 --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_search.yaml @@ -0,0 +1,309 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_search + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + catalog: + fulfillments: + - id: '1' + type: Delivery + - id: '2' + type: Self-Pickup + payments: + - id: '1' + type: ON-ORDER + - id: '2' + type: ON-FULFILLMENT + - id: '3' + type: POST-FULFILLMENT + descriptor: + name: ABC store + short_desc: Online eCommerce Store + long_desc: Online eCommerce Store + images: + - url: http://abc.com/images/1-shop-img + providers: + - id: P1 + descriptor: + name: ABC store + code: P001 + short_desc: ABC store + long_desc: ABC store + additional_desc: + url: chat link + content_type: text/html + images: + - url: http://abc.com/images/1-shop-img + rating: '4.4' + ttl: '86400' + locations: + - id: L1 + gps: 12.967555,77.749666 + address: Jayanagar 4th Block + city: + code: std:080 + name: Bengaluru + state: + code: KA + country: + code: IND + area_code: '560076' + creds: + - id: ESG-12345678 + type: License + desc: Export License No. ESG-12345678 + url: http://abcd.cdn.com/images/license-img + tags: + - descriptor: + code: serviceability + list: + - descriptor: + code: location + value: L1 + - descriptor: + code: category + value: RET10-1042 + - descriptor: + code: type + value: '12' + - descriptor: + code: val + value: SGP + - descriptor: + code: unit + value: country + - descriptor: + code: seller_terms + list: + - descriptor: + code: gst_credit_invoice + value: 'Y' + - descriptor: + code: seller_id + list: + - descriptor: + code: seller_id_code + value: gst + - descriptor: + code: seller_id_no + value: xxxxxxxxxxxxxxx + items: + - id: I1 + parent_item_id: PI1 + descriptor: + name: Dhara Mustard Oil + code: UPC / EAN code + short_desc: Dhara refined mustard oil + long_desc: Dhara refined mustard oil + images: + - url: http://abc.com/images/207.png + media: + - mimetype: video/mp4 + url: http://video_url.com + creator: + descriptor: + name: Mother Dairy + contact: + phone: '18001801018' + email: consumer.services@motherdairy.com + price: + currency: INR + value: '300.00' + offered_value: '250.00' + maximum_value: '350.00' + quantity: + unitized: + measure: + unit: millilitre + value: '500' + available: + measure: + unit: millilitre + value: '500' + count: 2000 + maximum: + measure: + unit: millilitre + value: '500' + count: 4000 + category_ids: + - RET10-1042 + fulfillment_ids: + - '1' + location_ids: + - L1 + payment_ids: + - '2' + add_ons: + - id: '78787723' + descriptor: + name: Dhara Sunflower Oil + short_desc: Dhara Sunflower Oil + long_desc: Dhara Sunflower Oil + images: + - url: http://abc.com/images/208.png + price: + currency: INR + value: '170.0' + offered_value: '100.0' + maximum_value: '170.0' + cancellation_terms: + - fulfillment_state: + descriptor: + code: Pending + - fulfillment_state: + descriptor: + code: Packed + - fulfillment_state: + descriptor: + code: Order-delivered + time: + label: validity + range: + start: '2022-12-24T00:00:00.000Z' + end: '2022-12-31T00:00:00.000Z' + matched: true + recommended: true + tags: + - descriptor: + code: origin + list: + - descriptor: + code: country + value: IND + - descriptor: + code: image + list: + - descriptor: + code: type + value: back_image + - descriptor: + code: url + value: http://sellerNP.com/images/i1_back_image.png + - descriptor: + code: veg_nonveg + list: + - descriptor: + code: veg + value: 'yes' + - descriptor: + code: variant + list: + - descriptor: + code: variant_group_id + value: V1 + - descriptor: + code: variant_attr + value: quantity.unitized.measure + - descriptor: + code: variant_seq + list: + - descriptor: + code: variant_attr + value: quantity.unitized.measure + - descriptor: + code: seq + value: '1' + - descriptor: + code: g2 + list: + - descriptor: + code: time_to_ship + value: P1D + - descriptor: + code: tax_rate + value: '12' + - descriptor: + code: g3 + list: + - descriptor: + code: brand + value: Dhara + - descriptor: + code: pack_size + value: '5' + - descriptor: + code: num_price_slabs + value: '3' + - descriptor: + code: price_slab + list: + - descriptor: + code: min_pack_size + value: '1' + - descriptor: + code: max_pack_size + value: '4' + - descriptor: + code: unit_sale_price + value: '250' + - descriptor: + code: price_slab + list: + - descriptor: + code: min_pack_size + value: '5' + - descriptor: + code: max_pack_size + value: '9' + - descriptor: + code: unit_sale_price + value: '200' + - descriptor: + code: price_slab + list: + - descriptor: + code: min_pack_size + value: '10' + - descriptor: + code: max_pack_size + value: '' + - descriptor: + code: unit_sale_price + value: '175' + - descriptor: + code: FSSAI_LICENSE_NO + list: + - descriptor: + code: BRAND_OWNER + value: '12345678901234' + - descriptor: + code: OTHER + value: '12345678901234' + - descriptor: + code: IMPORTER + value: '12345678901234' + offers: + - id: offer-1 + descriptor: + name: Dhara Olive Oil + code: FREEBIE + short_desc: Dhara Olive Oil + long_desc: Dhara Olive Oil + images: + - url: http://abc.com/images/207.png + location_ids: [] + category_ids: [] + item_ids: [] + time: + label: validity + range: + start: '2023-01-08T00:00:00.000Z' + end: '2023-01-15T00:00:00.000Z' + fulfillments: + - contact: + phone: '9886098860' + email: abc@xyz.com diff --git a/v2/ONDC:RET10/payloads/on_select.yaml b/v2/ONDC:RET10/payloads/on_select.yaml new file mode 100644 index 0000000..53ee249 --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_select.yaml @@ -0,0 +1,87 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_select + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + provider: + id: P1 + items: + - fulfillment_ids: + - F1 + id: I1 + fulfillments: + - id: F1 + '@ondc/org/provider_name': Loadshare + tracking: false + '@ondc/org/category': Express Delivery + '@ondc/org/TAT': P7D + state: + descriptor: + code: Serviceable + quote: + price: + currency: INR + value: '53600' + breakup: + - '@ondc/org/item_id': I1 + '@ondc/org/item_quantity': + count: 200 + title: Dhara Mustard Oil + '@ondc/org/title_type': item + price: + currency: INR + value: '50000' + item: + quantity: + available: + count: 200 + maximum: + count: 200 + price: + currency: INR + value: '250' + - '@ondc/org/item_id': F1 + title: Delivery charges + '@ondc/org/title_type': delivery + price: + currency: INR + value: '4000' + - '@ondc/org/item_id': F1 + title: Packing charges + '@ondc/org/title_type': packing + price: + currency: INR + value: '500' + - '@ondc/org/item_id': I1 + title: Tax + '@ondc/org/title_type': tax + price: + currency: INR + value: '0' + - '@ondc/org/item_id': I1 + title: Discount + '@ondc/org/title_type': discount + price: + currency: INR + value: '-1000' + - '@ondc/org/item_id': F1 + title: Convenience Fee + '@ondc/org/title_type': misc + price: + currency: INR + value: '100' + ttl: P1D diff --git a/v2/ONDC:RET10/payloads/on_status.yaml b/v2/ONDC:RET10/payloads/on_status.yaml new file mode 100644 index 0000000..e18ec32 --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_status.yaml @@ -0,0 +1,171 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_status + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + id: O1 + status: ACTIVE + provider: + id: P1 + locations: + - id: L1 + items: + - id: I1 + fulfillment_ids: + - F1 + quantity: + selected: + count: 200 + billing: + name: ONDC buyer + address: B005 aaspire heights, Jurong East, SGP, 680230 + state: + name: Jurong East + city: + name: Jurong East + email: nobody@nomail.com + phone: '9886098860' + fulfillments: + - id: F1 + '@ondc/org/provider_name': Loadshare + type: Delivery + tracking: false + state: + descriptor: + code: Pending + stops: + - type: start + location: + id: L1 + descriptor: + name: ABC Store + images: + - url: http://gf-integration/images/5.png + gps: 12.956399,77.636803 + time: + range: + start: '2023-02-03T10:00:00.000Z' + end: '2023-02-03T10:30:00.000Z' + timestamp: '2023-02-03T10:25:00.000Z' + instructions: + name: Proof of pickup + short_desc: Proof of pickup details + long_desc: Proof of pickup details + images: + - url: http://image1_url.png + contact: + phone: '9886098860' + email: nobody@nomail.com + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + address: 'My House #, My buildin' + city: + name: Jurong East + country: + code: SGP + area_code: '680230' + state: + name: '' + time: + range: + start: '2023-02-03T11:00:00.000Z' + end: '2023-02-03T11:30:00.000Z' + timestamp: '2023-02-03T11:35:00.000Z' + instructions: + name: Proof of delivery + short_desc: Proof of delivery details + long_desc: Proof of delivery details + images: + - url: http://image1_url.png + contact: + phone: '9886098860' + quote: + price: + currency: INR + value: '53600' + breakup: + - '@ondc/org/item_id': I1 + '@ondc/org/item_quantity': + count: 200 + title: Dhara Mustard Oil + '@ondc/org/title_type': item + price: + currency: INR + value: '50000' + item: + price: + currency: INR + value: '250' + - '@ondc/org/item_id': F1 + title: Delivery charges + '@ondc/org/title_type': delivery + price: + currency: INR + value: '4000' + - '@ondc/org/item_id': F1 + title: Packing charges + '@ondc/org/title_type': packing + price: + currency: INR + value: '500' + - '@ondc/org/item_id': I1 + title: Tax + '@ondc/org/title_type': tax + price: + currency: INR + value: '0' + - '@ondc/org/item_id': I1 + title: Discount + '@ondc/org/title_type': discount + price: + currency: INR + value: '-1000' + - '@ondc/org/item_id': F1 + title: Convenience Fee + '@ondc/org/title_type': misc + price: + currency: INR + value: '100' + ttl: P1D + payments: + - url: http://ondc.transaction.com/payment + tl_method: http/get + params: + currency: INR + transaction_id: '3937' + amount: '53600' + status: PAID + type: ON-ORDER + collected_by: BAP + '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '3' + '@ondc/org/settlement_details': + - settlement_counterparty: seller-app + settlement_phase: sale-amount + beneficiary_name: xxxxx + settlement_reference: XXXX + settlement_status: PAID + settlement_timestamp: '2023-02-04T10:00:00.000Z' + settlement_type: upi + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + bank_name: xxxx + branch_name: xxxx + created_at: '2023-02-03T09:30:00.000Z' + updated_at: '2023-02-03T10:00:00.201Z' diff --git a/v2/ONDC:RET10/payloads/on_update.yaml b/v2/ONDC:RET10/payloads/on_update.yaml new file mode 100644 index 0000000..862ea87 --- /dev/null +++ b/v2/ONDC:RET10/payloads/on_update.yaml @@ -0,0 +1,50 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: on_update + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + id: O1 + status: ACTIVE + provider: + id: P1 + items: + - id: I1 + quantity: + selected: + count: 200 + payments: + - url: http://ondc.transaction.com/payment + tl_method: http/get + params: + currency: INR + transaction_id: '3937' + amount: '53600' + status: PAID + type: ON-ORDER + collected_by: BPP + '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '0' + '@ondc/org/settlement_details': + - settlement_counterparty: buyer-app + settlement_phase: sale-amount + settlement_type: upi + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + beneficiary_name: xxxxx + bank_name: xxxx + branch_name: xxxx diff --git a/v2/ONDC:RET10/payloads/search.yaml b/v2/ONDC:RET10/payloads/search.yaml new file mode 100644 index 0000000..c0d3322 --- /dev/null +++ b/v2/ONDC:RET10/payloads/search.yaml @@ -0,0 +1,56 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: search + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:00.000Z' + ttl: PT30S +message: + intent: + item: + descriptor: + name: oil + fulfillment: + type: Delivery + stops: + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + area_code: '680230' + - type: end + location: + gps: 1.3813081446741677, 103.74788789072721 + area_code: '680207' + - type: end + location: + gps: 1.3826059101531494, 103.743617819222 + area_code: '680354' + payment: + type: ON-FULFILLMENT + tags: + - descriptor: + code: bap_terms + list: + - descriptor: + code: finder_fee_type + value: percent + - descriptor: + code: finder_fee_amount + value: '0' + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx diff --git a/v2/ONDC:RET10/payloads/select.yaml b/v2/ONDC:RET10/payloads/select.yaml new file mode 100644 index 0000000..4b3cda5 --- /dev/null +++ b/v2/ONDC:RET10/payloads/select.yaml @@ -0,0 +1,75 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: select + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order: + provider: + id: P1 + locations: + - id: L1 + ttl: P1D + items: + - id: I1 + location_ids: + - L1 + quantity: + selected: + count: 200 + tags: + - descriptor: + code: BUYER_TERMS + list: + - descriptor: + code: ITEM_REQ + value: free text on Item Customization + - descriptor: + code: PACKAGING_REQ + value: free text on packaging Customization + fulfillments: + - stops: + - type: end + location: + gps: 1.3806217468119772, 103.74636438437074 + area_code: '680230' + customer: + person: + creds: + - id: ESG-12345678 + type: License + url: http://abcd.dnb.com/verify?id=ESG-12345678 + tags: + - descriptor: + code: DELIVERY_TERMS + list: + - descriptor: + code: INCOTERMS + value: CIF + - descriptor: + code: DELIVERY_DUTY + value: DDP + payments: + - type: ON-FULFILLMENT + tags: + - descriptor: + code: buyer_id + list: + - descriptor: + code: buyer_id_code + value: gst + - descriptor: + code: buyer_id_no + value: xxxxxxxxxxxxxxx diff --git a/v2/ONDC:RET10/payloads/status.yaml b/v2/ONDC:RET10/payloads/status.yaml new file mode 100644 index 0000000..3660ce1 --- /dev/null +++ b/v2/ONDC:RET10/payloads/status.yaml @@ -0,0 +1,19 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: status + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + order_id: O1 diff --git a/v2/ONDC:RET10/payloads/update.yaml b/v2/ONDC:RET10/payloads/update.yaml new file mode 100644 index 0000000..b0059ef --- /dev/null +++ b/v2/ONDC:RET10/payloads/update.yaml @@ -0,0 +1,51 @@ +context: + domain: '{{domain}}' + location: + city: + code: std:080 + country: + code: IND + action: update + version: 2.0.1 + bap_id: buyerapp.com + bap_uri: '{{bap_uri}}' + bpp_id: sellerapp.com + bpp_uri: '{{bpp_uri}}' + transaction_id: '{{transaction_id}}' + message_id: '{{msg_id}}' + timestamp: '2023-01-08T22:00:30.000Z' + ttl: PT30S +message: + update_target: item + order: + id: O1 + status: ACTIVE + provider: + id: P1 + items: + - id: I1 + quantity: + selected: + count: 200 + payments: + - url: http://ondc.transaction.com/payment + tl_method: http/get + params: + currency: INR + transaction_id: '3937' + amount: '53600' + status: PAID + type: ON-ORDER + collected_by: BPP + '@ondc/org/buyer_app_finder_fee_type': percent + '@ondc/org/buyer_app_finder_fee_amount': '0' + '@ondc/org/settlement_details': + - settlement_counterparty: buyer-app + settlement_phase: sale-amount + settlement_type: upi + upi_address: gft@oksbi + settlement_bank_account_no: XXXXXXXXXX + settlement_ifsc_code: XXXXXXXXX + beneficiary_name: xxxxx + bank_name: xxxx + branch_name: xxxx diff --git a/v2/ONDC:RET10/schema/confirm.yaml b/v2/ONDC:RET10/schema/confirm.yaml new file mode 100644 index 0000000..075bdd0 --- /dev/null +++ b/v2/ONDC:RET10/schema/confirm.yaml @@ -0,0 +1,1634 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - confirm + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order +required: + - context + - message diff --git a/v2/ONDC:RET10/schema/init.yaml b/v2/ONDC:RET10/schema/init.yaml new file mode 100644 index 0000000..ad0efb5 --- /dev/null +++ b/v2/ONDC:RET10/schema/init.yaml @@ -0,0 +1,1634 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - init + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order +required: + - context + - message diff --git a/v2/ONDC:RET10/schema/on_confirm.yaml b/v2/ONDC:RET10/schema/on_confirm.yaml new file mode 100644 index 0000000..ebc71eb --- /dev/null +++ b/v2/ONDC:RET10/schema/on_confirm.yaml @@ -0,0 +1,1658 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_confirm + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/on_init.yaml b/v2/ONDC:RET10/schema/on_init.yaml new file mode 100644 index 0000000..2c248a9 --- /dev/null +++ b/v2/ONDC:RET10/schema/on_init.yaml @@ -0,0 +1,1658 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_init + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/on_search.yaml b/v2/ONDC:RET10/schema/on_search.yaml new file mode 100644 index 0000000..dfd4752 --- /dev/null +++ b/v2/ONDC:RET10/schema/on_search.yaml @@ -0,0 +1,1484 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_12 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_16 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_29 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_6 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_9 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_11 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_10 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_22 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_search + required: + - action + message: + type: object + properties: + 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.
+ type: object + additionalProperties: false + properties: + descriptor: *ref_4 + 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_18 + description: >- + Describes how a an order will be rendered/fulfilled to the + end-customer + type: object + additionalProperties: false + properties: + id: &ref_25 + 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_5 + 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_28 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product or a + service + type: object + additionalProperties: false + properties: + person: &ref_7 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_6 + age: + description: Age of the person + allOf: + - &ref_13 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes a credential of an entity - Person + or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: Describes a language known to the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: &ref_14 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the + Tags and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the + tag group. If display is set to false, + then the group will not be displayed. If + it is set to true, it should be displayed. + However, group-level display properties + can be overriden by individual tag-level + display property. As this schema is purely + for catalog display purposes, it is not + recommended to send this value during + search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used + to store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be + added as a property to any schema to + describe extended attributes. For BAPs, + tags can be sent during search to + optimize and filter search results. BPPs + can use tags to index their catalog to + allow better search functionality. Tags + are sent by the BPP as part of the + catalog response in the `on_search` + callback. Tags are also meant for + display purposes. Upon receiving a tag, + BAPs are meant to render them as + name-value pairs. This is particularly + useful when rendering tabular + information about a product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + contact: &ref_8 + description: Describes the contact information of an entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 specification + agent: + description: >- + The agent that is currently handling the fulfillment of the + order + allOf: + - description: >- + Describes the direct performer, driver or executor that + fulfills an order. It is usually a person. But in some + rare cases, it could be a non-living entity like a + drone, or a bot. Some examples of agents are Doctor in + the healthcare sector, a driver in the mobility sector, + or a delivery person in the logistics sector. This + object can be set at any stage of the order lifecycle. + This can be set at the discovery stage when the BPP + wants to provide details on the agent fulfilling the + order, like in healthcare, where the doctor's name + appears during search. This object can also used to + search for a particular person that the customer wants + fulfilling an order. Sometimes, this object gets + instantiated after the order is confirmed, like in the + case of on-demand taxis, where the driver is assigned + after the user confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_7 + contact: *ref_8 + organization: &ref_23 + description: >- + An organization. Usually a recognized business + entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_9 + state: + description: >- + The state where the organization's address is + registered + allOf: + - *ref_10 + city: + description: >- + The city where the the organization's address is + registered + allOf: + - *ref_11 + contact: *ref_8 + rating: *ref_5 + contact: *ref_8 + vehicle: + description: >- + Describes a vehicle is a device that is designed or used to + transport people or cargo over land, water, air, or through + space.
This has properties like category, capacity, make, + model, size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the fulfillment + of an order. + type: array + items: + description: >- + A logical point in space and time during the fulfillment + of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_12 + 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_15 + description: >- + Describes time in its various forms. It can be a + single point in time; duration; or a structured + timetable of operations
This has properties + like label, time stamp,duration,range, days, + schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: *ref_13 + 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: + description: >- + Describes schedule as a repeating time period + used to describe a regularly recurring event. + At a minimum a schedule will specify frequency + which describes the interval between + occurrences of the event. Additional + information can be provided to specify the + schedule more precisely. This includes + identifying the timestamps(s) of when the + event will take place. Schedules may also have + holidays to exclude a specific day from the + schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_13 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + instructions: + description: Instructions that need to be followed at the stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_8 + person: + description: The details of the person present at the stop + allOf: + - *ref_7 + authorization: + description: >- + Describes an authorization mechanism used to start or + end the fulfillment of an order. For example, in the + mobility sector, the driver may require a one-time + password to initiate the ride. In the healthcare + sector, a patient may need to provide a password to + open a video conference link during a + teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The allowed + values for this field can be published as part of + the network policy. + 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 + 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_14 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + description: >- + Payment terms offered by the BPP for all transactions. This can be + overriden at the provider level. + type: array + items: &ref_19 + description: >- + Describes the terms of settlement between the BAP and the BPP + for a single transaction. When instantiated, this object + contains
  1. the amount that has to be settled,
  2. The + payment destination destination details
  3. When the + settlement should happen, and
  4. A transaction reference + ID
. During a transaction, the BPP reserves the right + to decide the terms of payment. However, the BAP can send its + terms to the BPP first. If the BPP does not agree to those + terms, it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms sent by + the BPP in order to preserve the provider's autonomy, or abort + the transaction. In case of such disagreements, the BAP and the + BPP can perform offline negotiations on the payment terms. Once + an agreement is reached, the BAP and BPP can resume + transactions. + type: object + additionalProperties: false + properties: + id: &ref_26 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_15 + tags: + type: array + items: *ref_14 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + offers: + description: >- + Offers at the BPP-level. This is common across all providers + onboarded by the BPP. + type: array + items: &ref_20 + description: >- + An offer associated with a catalog. This is typically used to + promote a particular product and enable more purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_16 + category_ids: + type: array + items: &ref_17 + description: ID of the category + type: string + item_ids: + type: array + items: &ref_21 + description: ID of the item. + type: string + time: *ref_15 + tags: + type: array + items: *ref_14 + providers: + type: array + items: + description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: *ref_15 + categories: + type: array + items: + description: A label under which a collection of items can be grouped. + type: object + additionalProperties: false + properties: + id: *ref_17 + parent_category_id: *ref_17 + descriptor: *ref_4 + time: *ref_15 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: *ref_14 + fulfillments: + type: array + items: *ref_18 + payments: + type: array + items: *ref_19 + locations: + type: array + items: *ref_12 + offers: + type: array + items: *ref_20 + items: + type: array + items: + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a product + like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_21 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_21 + parent_item_quantity: + description: >- + The number of units of the parent item this item is a + multiple of + allOf: + - &ref_24 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_22 + 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_22 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_22 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_22 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_22 + 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_22 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_23 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_27 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_24 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_17 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_25 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_16 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_26 + add_ons: + type: array + items: + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_27 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this term + is applicable. + allOf: + - *ref_28 + 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_15 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_27 + xinput: &ref_30 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is typically + a Form Input. Sometimes, selection of catalog + elements is not enough for the BPP to confirm an + order. For example, to confirm a flight ticket, + the airline requires details of the passengers + along with information on baggage, identity, in + addition to the class of ticket. Similarly, a + logistics company may require details on the + nature of shipment in order to confirm the + shipping. A recruiting firm may require + additional details on the applicant in order to + confirm a job application. For all such + purposes, the BPP can choose to send this object + attached to any object in the catalog that is + required to be sent while placing the order. + This object can typically be sent at an item + level or at the order level. The item level + XInput will override the Order level XInput as + it indicates a special requirement of + information for that particular item. Hence the + BAP must render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_29 + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this term + is applicable. + allOf: + - *ref_10 + 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_15 + refund_amount: *ref_27 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this term + is applicable. + allOf: + - *ref_10 + 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_15 + external_ref: *ref_29 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this term + IETF''s applicable. + allOf: + - *ref_10 + 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_15 + return_location: + description: >- + The location where the item or order must / will + be returned to + allOf: + - *ref_12 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_30 + 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_15 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_14 + 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: string + tags: + type: array + items: *ref_14 + 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 + required: + - catalog + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/on_select.yaml b/v2/ONDC:RET10/schema/on_select.yaml new file mode 100644 index 0000000..ad54fca --- /dev/null +++ b/v2/ONDC:RET10/schema/on_select.yaml @@ -0,0 +1,1656 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_select + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/on_status.yaml b/v2/ONDC:RET10/schema/on_status.yaml new file mode 100644 index 0000000..e67b82e --- /dev/null +++ b/v2/ONDC:RET10/schema/on_status.yaml @@ -0,0 +1,1658 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_status + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/on_update.yaml b/v2/ONDC:RET10/schema/on_update.yaml new file mode 100644 index 0000000..d577f9d --- /dev/null +++ b/v2/ONDC:RET10/schema/on_update.yaml @@ -0,0 +1,1658 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - on_update + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order + error: + description: >- + Describes an error object that is returned by a BAP, BPP or BG as a + response or callback to an action by another network participant. This + object is sent when any request received by a network participant is + unacceptable. This object can be sent either during Ack or with the + callback. + type: object + additionalProperties: false + properties: + code: + type: string + 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. +required: + - context diff --git a/v2/ONDC:RET10/schema/search.yaml b/v2/ONDC:RET10/schema/search.yaml new file mode 100644 index 0000000..8738712 --- /dev/null +++ b/v2/ONDC:RET10/schema/search.yaml @@ -0,0 +1,1508 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - properties: + action: + enum: + - search + message: + type: object + properties: + intent: + description: >- + The intent to buy or avail a product or a service. The BAP can declare + the intent of the consumer containing
This has + properties like + descriptor,provider,fulfillment,payment,category,offer,item,tags
This + is typically used by the BAP to send the purpose of the user's search + to the BPP. This will be used by the BPP to find products or services + it offers that may match the user's intent.
For example, in + Mobility, the mobility consumer declares a mobility intent. In this + case, the mobility consumer declares information that describes + various aspects of their journey like,
For example, in health domain, a + consumer declares the intent for a lab booking the describes various + aspects of their booking like, + type: object + additionalProperties: false + properties: + descriptor: + description: >- + A raw description of the search intent. Free text search strings, + raw audio, etc can be sent in this object. + allOf: + - *ref_4 + provider: + description: >- + The provider from which the customer wants to place to the order + from + allOf: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: &ref_30 + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_28 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_29 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_31 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_32 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + fulfillment: + description: Details on how the customer wants their order fulfilled + allOf: + - *ref_28 + payment: + description: Details on how the customer wants to pay for the order + allOf: + - *ref_29 + category: + description: Details on the item category + allOf: + - *ref_30 + offer: + description: details on the offer the customer wants to avail + allOf: + - *ref_31 + item: + description: Details of the item that the consumer wants to order + allOf: + - *ref_32 + tags: + type: array + items: *ref_10 +required: + - context + - message diff --git a/v2/ONDC:RET10/schema/select.yaml b/v2/ONDC:RET10/schema/select.yaml new file mode 100644 index 0000000..003eb08 --- /dev/null +++ b/v2/ONDC:RET10/schema/select.yaml @@ -0,0 +1,1634 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - select + required: + - action + message: + type: object + properties: + order: + description: >- + Describes a legal purchase order. It contains the complete details of + the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a single + point in time; duration; or a structured timetable of + operations
This has properties like label, time + stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used to + describe a regularly recurring event. At a minimum a + schedule will specify frequency which describes the + interval between occurrences of the event. Additional + information can be provided to specify the schedule + more precisely. This includes identifying the + timestamps(s) of when the event will take place. + Schedules may also have holidays to exclude a specific + day from the schedule.
This has properties like + frequency, holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the Tags + and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the tag + group. If display is set to false, then the + group will not be displayed. If it is set to + true, it should be displayed. However, + group-level display properties can be + overriden by individual tag-level display + property. As this schema is purely for catalog + display purposes, it is not recommended to + send this value during search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used to + store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be added + as a property to any schema to describe + extended attributes. For BAPs, tags can be + sent during search to optimize and filter + search results. BPPs can use tags to index + their catalog to allow better search + functionality. Tags are sent by the BPP as + part of the catalog response in the + `on_search` callback. Tags are also meant + for display purposes. Upon receiving a tag, + BAPs are meant to render them as name-value + pairs. This is particularly useful when + rendering tabular information about a + product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled to + the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: Indicates whether the fulfillment allows tracking + default: false + customer: + description: The person that will ultimately receive the order + allOf: + - description: >- + Describes a customer buying/availing a product + or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the fulfillment + of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is usually a + person. But in some rare cases, it could be a + non-living entity like a drone, or a bot. Some + examples of agents are Doctor in the healthcare + sector, a driver in the mobility sector, or a + delivery person in the logistics sector. This + object can be set at any stage of the order + lifecycle. This can be set at the discovery + stage when the BPP wants to provide details on + the agent fulfilling the order, like in + healthcare, where the doctor's name appears + during search. This object can also used to + search for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand taxis, + where the driver is assigned after the user + confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed or + used to transport people or cargo over land, water, + air, or through space.
This has properties like + category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at the + stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: The details of the person present at the stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used to + start or end the fulfillment of an order. For + example, in the mobility sector, the driver + may require a one-time password to initiate + the ride. In the healthcare sector, a patient + may need to provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. The + allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP and + the BPP for a single transaction. When instantiated, + this object contains
  1. the amount that has to be + settled,
  2. The payment destination destination + details
  3. When the settlement should happen, + and
  4. A transaction reference ID
. During + a transaction, the BPP reserves the right to decide the + terms of payment. However, the BAP can send its terms to + the BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the BAP. + If overridden, the BAP must either agree to the terms + sent by the BPP in order to preserve the provider's + autonomy, or abort the transaction. In case of such + disagreements, the BAP and the BPP can perform offline + negotiations on the payment terms. Once an agreement is + reached, the BAP and BPP can resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is typically + used to promote a particular product and enable more + purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it can + represent a fare product like one way journey. In the + logistics sector, it can represent the delivery service + offering. In the retail domain it can represent a + product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item is + a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity allocated + for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity allowed + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected for + purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: The price of this item, if it has intrinsic value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can be + ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This does + not exist independently in a catalog and is always + associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or an + order. This can be referenced at an item or order + level. Item-level cancellation terms can override + the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, selection + of catalog elements is not enough for the BPP + to confirm an order. For example, to confirm a + flight ticket, the airline requires details of + the passengers along with information on + baggage, identity, in addition to the class of + ticket. Similarly, a logistics company may + require details on the nature of shipment in + order to confirm the shipping. A recruiting + firm may require additional details on the + applicant in order to confirm a job + application. For all such purposes, the BPP + can choose to send this object attached to any + object in the catalog that is required to be + sent while placing the order. This object can + typically be sent at an item level or at the + order level. The item level XInput will + override the Order level XInput as it + indicates a special requirement of information + for that particular item. Hence the BAP must + render a separate form for the Item and + another form at the Order level before + confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to confirm + the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item is + replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: Terms that are applicable when this item is returned + type: array + items: &ref_35 + description: Describes the return policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must / + will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the taxation + authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products or + services from the BPP.
This has properties like price, + breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - order +required: + - context + - message diff --git a/v2/ONDC:RET10/schema/status.yaml b/v2/ONDC:RET10/schema/status.yaml new file mode 100644 index 0000000..98627c5 --- /dev/null +++ b/v2/ONDC:RET10/schema/status.yaml @@ -0,0 +1,332 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - description: The physical location of something + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: + description: Physical description of something. + type: object + additionalProperties: false + 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: + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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: + - description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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: + - 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - status + required: + - action + message: + type: object + properties: + order_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. + required: + - order_id +required: + - context + - message diff --git a/v2/ONDC:RET10/schema/update.yaml b/v2/ONDC:RET10/schema/update.yaml new file mode 100644 index 0000000..137acaa --- /dev/null +++ b/v2/ONDC:RET10/schema/update.yaml @@ -0,0 +1,1680 @@ +type: object +properties: + context: + allOf: + - description: >- + Every API call in beckn protocol has a context. It provides a + high-level overview to the receiver about the nature of the intended + transaction. Typically, it is the BAP that sets the transaction + context based on the consumer's location and action on their UI. But + sometimes, during unsolicited callbacks, the BPP also sets the + transaction context but it is usually the same as the context of a + previous full-cycle, request-callback interaction between the BAP and + the BPP. The context object contains four types of fields. +
  1. Demographic information about the transaction using fields + like `domain`, `country`, and `region`.
  2. Addressing details + like the sending and receiving platform's ID and API + URL.
  3. Interoperability information like the protocol version + that implemented by the sender and,
  4. Transaction details like + the method being called at the receiver's endpoint, the transaction_id + that represents an end-to-end user session at the BAP, a message ID to + pair requests with callbacks, a timestamp to capture sending times, a + ttl to specifiy the validity of the request, and a key to encrypt + information if necessary.
This object must be passed in + every interaction between a BAP and a BPP. In HTTP/S implementations, + it is not necessary to send the context during the synchronous + response. However, in asynchronous protocols, the context must be sent + during all interactions, + type: object + additionalProperties: false + properties: + domain: + description: Domain code that is relevant to this transaction context + allOf: + - type: string + 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. + location: + description: The location where the transaction is intended to be fulfilled. + allOf: + - &ref_16 + description: The physical location of something + type: object + additionalProperties: false + properties: + id: &ref_17 + type: string + descriptor: &ref_4 + description: Physical description of something. + type: object + additionalProperties: false + 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_26 + description: This object contains a url to a media file. + type: object + additionalProperties: false + properties: + mimetype: + description: >- + indicates the nature and format of the document, + file, or assortment of bytes. MIME types are + defined and standardized in IETF's RFC 6838 + 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 + images: + type: array + items: &ref_9 + description: Describes an image + type: object + additionalProperties: false + properties: + url: + description: >- + URL to the image. This can be a data url or an + remote url + 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 + 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_0 + 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+)?)$ + address: + description: The address of this location. + allOf: + - &ref_13 + description: Describes a postal address. + type: string + city: + description: The city this location is, or is located within + allOf: + - &ref_15 + description: Describes a city + type: object + additionalProperties: false + properties: + name: + description: Name of the city + type: string + code: + description: City code + type: string + 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_14 + description: >- + A bounded geopolitical region of governance inside a + country. + type: object + additionalProperties: false + properties: + name: + type: string + description: Name of the state + code: + type: string + description: >- + State code as per country or international + standards + country: + description: The country this location is, or is located within + allOf: + - description: Describes a country + type: object + additionalProperties: false + 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 + area_code: + type: string + circle: + description: >- + Describes a circular region of a specified radius centered + at a specified GPS coordinate. + type: object + additionalProperties: false + properties: + gps: *ref_0 + radius: &ref_19 + description: Describes a scalar + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - CONSTANT + - VARIABLE + value: &ref_1 + description: Describes a numerical value in decimal form + type: string + pattern: '[+-]?([0-9]*[.])?[0-9]+' + estimated_value: *ref_1 + computed_value: *ref_1 + range: + type: object + properties: + min: *ref_1 + max: *ref_1 + unit: + type: string + 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_5 + 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 + 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: + - &ref_2 + 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: + - &ref_3 + 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_2 + bpp_uri: + description: Subscriber URL of the BPP for accepting calls from BAPs. + allOf: + - *ref_3 + 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 + - type: object + properties: + action: + enum: + - update + required: + - action + message: + type: object + properties: + update_target: + description: >- + Comma separated values of order objects being updated. For example: + ```"update_target":"item,billing,fulfillment"``` + type: string + order: + description: Updated order object + allOf: + - description: >- + Describes a legal purchase order. It contains the complete details + of the legal contract created between the buyer and the seller. + type: object + additionalProperties: false + properties: + id: + type: string + 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: + - description: Describes the catalog of a business. + type: object + properties: + id: + type: string + description: Id of the provider + descriptor: *ref_4 + category_id: + type: string + description: Category Id of the provider at the BPP-level catalog + rating: *ref_5 + time: &ref_8 + description: >- + Describes time in its various forms. It can be a + single point in time; duration; or a structured + timetable of operations
This has properties like + label, time stamp,duration,range, days, schedule + type: object + additionalProperties: false + properties: + label: + type: string + timestamp: + type: string + format: date-time + duration: &ref_6 + description: Describes duration as per ISO8601 format + type: string + 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: + description: >- + Describes schedule as a repeating time period used + to describe a regularly recurring event. At a + minimum a schedule will specify frequency which + describes the interval between occurrences of the + event. Additional information can be provided to + specify the schedule more precisely. This includes + identifying the timestamps(s) of when the event + will take place. Schedules may also have holidays + to exclude a specific day from the + schedule.
This has properties like frequency, + holidays, times + type: object + additionalProperties: false + properties: + frequency: *ref_6 + holidays: + type: array + items: + type: string + format: date-time + times: + type: array + items: + type: string + format: date-time + categories: + type: array + items: + description: >- + A label under which a collection of items can be + grouped. + type: object + additionalProperties: false + properties: + id: &ref_7 + description: ID of the category + type: string + parent_category_id: *ref_7 + descriptor: *ref_4 + time: *ref_8 + ttl: + description: Time to live for an instance of this schema + tags: + type: array + items: &ref_10 + description: >- + A collection of tag objects with group level + attributes. For detailed documentation on the + Tags and Tag Groups schema go to + http://github.com/beckn/protocol-specifications/discussions/316 + type: object + additionalProperties: false + properties: + display: + description: >- + Indicates the display properties of the + tag group. If display is set to false, + then the group will not be displayed. If + it is set to true, it should be displayed. + However, group-level display properties + can be overriden by individual tag-level + display property. As this schema is purely + for catalog display purposes, it is not + recommended to send this value during + search. + type: boolean + default: true + descriptor: + description: >- + Description of the TagGroup, can be used + to store detailed information. + allOf: + - *ref_4 + 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: + description: >- + Describes a tag. This is used to contain + extended metadata. This object can be + added as a property to any schema to + describe extended attributes. For BAPs, + tags can be sent during search to + optimize and filter search results. BPPs + can use tags to index their catalog to + allow better search functionality. Tags + are sent by the BPP as part of the + catalog response in the `on_search` + callback. Tags are also meant for + display purposes. Upon receiving a tag, + BAPs are meant to render them as + name-value pairs. This is particularly + useful when rendering tabular + information about a product or service. + type: object + additionalProperties: false + properties: + descriptor: + description: >- + Description of the Tag, can be used to + store detailed information. + allOf: + - *ref_4 + 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 + fulfillments: + type: array + items: &ref_31 + description: >- + Describes how a an order will be rendered/fulfilled + to the end-customer + type: object + additionalProperties: false + properties: + id: &ref_22 + 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_5 + 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_25 + description: Describes the state of fulfillment + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + updated_at: + type: string + format: date-time + updated_by: + type: string + description: ID of entity which changed the state + tracking: + type: boolean + description: >- + Indicates whether the fulfillment allows + tracking + default: false + customer: + description: >- + The person that will ultimately receive the + order + allOf: + - description: >- + Describes a customer buying/availing a + product or a service + type: object + additionalProperties: false + properties: + person: &ref_11 + description: Describes a person as any individual + type: object + additionalProperties: false + 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_9 + age: + description: Age of the person + allOf: + - *ref_6 + 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: + description: >- + Describes a credential of an entity - + Person or Organization + type: object + additionalProperties: false + properties: + id: + type: string + type: + type: string + default: VerifiableCredential + url: + description: URL of the credential + type: string + format: uri + languages: + type: array + items: + description: >- + Describes a language known to the + person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + skills: + type: array + items: + description: Describes a skill of the person. + type: object + additionalProperties: false + properties: + code: + type: string + name: + type: string + tags: + type: array + items: *ref_10 + contact: &ref_12 + description: >- + Describes the contact information of an + entity + type: object + additionalProperties: false + properties: + phone: + type: string + email: + type: string + jcard: + type: object + description: >- + A Jcard object as per + draft-ietf-jcardcal-jcard-03 + specification + agent: + description: >- + The agent that is currently handling the + fulfillment of the order + allOf: + - description: >- + Describes the direct performer, driver or + executor that fulfills an order. It is + usually a person. But in some rare cases, it + could be a non-living entity like a drone, + or a bot. Some examples of agents are Doctor + in the healthcare sector, a driver in the + mobility sector, or a delivery person in the + logistics sector. This object can be set at + any stage of the order lifecycle. This can + be set at the discovery stage when the BPP + wants to provide details on the agent + fulfilling the order, like in healthcare, + where the doctor's name appears during + search. This object can also used to search + for a particular person that the customer + wants fulfilling an order. Sometimes, this + object gets instantiated after the order is + confirmed, like in the case of on-demand + taxis, where the driver is assigned after + the user confirms the ride. + type: object + additionalProperties: false + properties: + person: *ref_11 + contact: *ref_12 + organization: &ref_20 + description: >- + An organization. Usually a recognized + business entity. + type: object + additionalProperties: false + properties: + descriptor: *ref_4 + address: + description: The postal address of the organization + allOf: + - *ref_13 + state: + description: >- + The state where the organization's + address is registered + allOf: + - *ref_14 + city: + description: >- + The city where the the organization's + address is registered + allOf: + - *ref_15 + contact: *ref_12 + rating: *ref_5 + contact: *ref_12 + vehicle: + description: >- + Describes a vehicle is a device that is designed + or used to transport people or cargo over land, + water, air, or through space.
This has + properties like category, capacity, make, model, + size,variant,color,energy_type,registration + type: object + additionalProperties: false + properties: + category: + type: string + 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 + stops: + description: >- + The list of logical stops encountered during the + fulfillment of an order. + type: array + items: + description: >- + A logical point in space and time during the + fulfillment of an order. + type: object + additionalProperties: false + properties: + id: + type: string + parent_stop_id: + type: string + location: + description: Location of the stop + allOf: + - *ref_16 + 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_8 + instructions: + description: >- + Instructions that need to be followed at + the stop + allOf: + - *ref_4 + contact: + description: Contact details of the stop + allOf: + - *ref_12 + person: + description: >- + The details of the person present at the + stop + allOf: + - *ref_11 + authorization: + description: >- + Describes an authorization mechanism used + to start or end the fulfillment of an + order. For example, in the mobility + sector, the driver may require a one-time + password to initiate the ride. In the + healthcare sector, a patient may need to + provide a password to open a video + conference link during a teleconsultation. + type: object + additionalProperties: false + properties: + type: + description: >- + Type of authorization mechanism used. + The allowed values for this field can be + published as part of the network policy. + 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 + 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_10 + '@ondc/org/provider_name': + type: string + '@ondc/org/category': + type: string + '@ondc/org/TAT': + type: string + payments: + type: array + items: &ref_36 + description: >- + Describes the terms of settlement between the BAP + and the BPP for a single transaction. When + instantiated, this object contains
  1. the + amount that has to be settled,
  2. The payment + destination destination details
  3. When the + settlement should happen, and
  4. A transaction + reference ID
. During a transaction, the + BPP reserves the right to decide the terms of + payment. However, the BAP can send its terms to the + BPP first. If the BPP does not agree to those terms, + it must overwrite the terms and return them to the + BAP. If overridden, the BAP must either agree to the + terms sent by the BPP in order to preserve the + provider's autonomy, or abort the transaction. In + case of such disagreements, the BAP and the BPP can + perform offline negotiations on the payment terms. + Once an agreement is reached, the BAP and BPP can + resume transactions. + type: object + additionalProperties: false + properties: + id: &ref_23 + 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 + tl_method: + type: string + 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 + - ON-ORDER + status: + type: string + enum: + - PAID + - NOT-PAID + time: *ref_8 + tags: + type: array + items: *ref_10 + '@ondc/org/buyer_app_finder_fee_type': + type: string + '@ondc/org/buyer_app_finder_fee_amount': + type: string + '@ondc/org/settlement_details': + type: array + items: + description: Describes a settlement. + type: object + additionalProperties: false + properties: + settlement_counterparty: + type: string + settlement_phase: + type: string + settlement_type: + type: string + upi_address: + type: string + settlement_bank_account_no: + type: string + settlement_ifsc_code: + type: string + beneficiary_name: + type: string + bank_name: + type: string + branch_name: + type: string + settlement_reference: + type: string + settlement_status: + type: string + settlement_timestamp: + type: string + locations: + type: array + items: *ref_16 + offers: + type: array + items: &ref_30 + description: >- + An offer associated with a catalog. This is + typically used to promote a particular product and + enable more purchases. + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + location_ids: + type: array + items: *ref_17 + category_ids: + type: array + items: *ref_7 + item_ids: + type: array + items: &ref_18 + description: ID of the item. + type: string + time: *ref_8 + tags: + type: array + items: *ref_10 + items: + type: array + items: &ref_28 + description: >- + Describes a product or a service offered to the end + consumer by the provider. In the mobility sector, it + can represent a fare product like one way journey. + In the logistics sector, it can represent the + delivery service offering. In the retail domain it + can represent a product like a grocery item. + type: object + additionalProperties: false + properties: + id: *ref_18 + parent_item_id: + description: ID of the item, this item is a variant of + allOf: + - *ref_18 + parent_item_quantity: + description: >- + The number of units of the parent item this item + is a multiple of + allOf: + - &ref_21 + description: Describes the count or amount of an item + type: object + additionalProperties: false + properties: + allocated: + description: >- + This represents the exact quantity + allocated for purchase of the item. + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + maximum: + description: >- + This represents the maximum quantity + allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 1 + measure: *ref_19 + minimum: + description: >- + This represents the minimum quantity + allowed for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + selected: + description: >- + This represents the quantity selected + for purchase of the item + type: object + properties: + count: + type: integer + minimum: 0 + measure: *ref_19 + 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_19 + descriptor: + description: Physical description of the item + allOf: + - *ref_4 + creator: + description: The creator of this item + allOf: + - *ref_20 + price: + description: >- + The price of this item, if it has intrinsic + value + allOf: + - &ref_24 + description: Describes the price of a product or service + type: object + additionalProperties: false + properties: + currency: + type: string + value: *ref_1 + estimated_value: *ref_1 + computed_value: *ref_1 + listed_value: *ref_1 + offered_value: *ref_1 + minimum_value: *ref_1 + maximum_value: *ref_1 + quantity: + description: The selling quantity of the item + allOf: + - *ref_21 + category_ids: + description: Categories this item can be listed under + type: array + items: + allOf: + - *ref_7 + fulfillment_ids: + description: Modes through which this item can be fulfilled + type: array + items: + allOf: + - *ref_22 + location_ids: + description: Provider Locations this item is available in + type: array + items: + allOf: + - *ref_17 + payment_ids: + description: >- + Payment modalities through which this item can + be ordered + type: array + items: + allOf: + - *ref_23 + add_ons: + type: array + items: &ref_29 + description: >- + Describes an additional item offered as a + value-addition to a product or service. This + does not exist independently in a catalog and + is always associated with an item. + type: object + additionalProperties: false + properties: + id: + description: Provider-defined ID of the add-on + type: string + descriptor: *ref_4 + price: *ref_24 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: &ref_32 + description: >- + Describes the cancellation terms of an item or + an order. This can be referenced at an item or + order level. Item-level cancellation terms can + override the terms at the order level. + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_25 + 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_8 + cancellation_fee: + description: A fee applied on a particular entity + type: object + additionalProperties: false + properties: + percentage: + description: Percentage of a value + allOf: + - *ref_1 + amount: + description: A fixed value + allOf: + - *ref_24 + xinput: &ref_27 + description: >- + Contains any additional or extended inputs + required to confirm an order. This is + typically a Form Input. Sometimes, + selection of catalog elements is not + enough for the BPP to confirm an order. + For example, to confirm a flight ticket, + the airline requires details of the + passengers along with information on + baggage, identity, in addition to the + class of ticket. Similarly, a logistics + company may require details on the nature + of shipment in order to confirm the + shipping. A recruiting firm may require + additional details on the applicant in + order to confirm a job application. For + all such purposes, the BPP can choose to + send this object attached to any object in + the catalog that is required to be sent + while placing the order. This object can + typically be sent at an item level or at + the order level. The item level XInput + will override the Order level XInput as it + indicates a special requirement of + information for that particular item. + Hence the BAP must render a separate form + for the Item and another form at the Order + level before confirmation. + type: object + additionalProperties: false + properties: + form: + description: Describes a form + type: object + additionalProperties: false + properties: + url: + description: >- + The URL from where the form can be + fetched. The content fetched from the + url must be processed as per the + mime_type specified in this object. Once + fetched, the rendering platform can + choosed to render the form as-is as an + embeddable element; or process it + further to blend with the theme of the + application. In case the interface is + non-visual, the the render can process + the form data and reproduce it as per + the standard specified in the form. + 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 + required: + description: >- + Indicates whether the form data is + mandatorily required by the BPP to + confirm the order. + type: boolean + external_ref: *ref_26 + refund_terms: + description: Refund terms of this item + type: array + items: &ref_33 + description: Refund term of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + refund_amount: *ref_24 + replacement_terms: + description: >- + Terms that are applicable be met when this item + is replaced + type: array + items: &ref_34 + description: The replacement policy of an item or an order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term is applicable. + allOf: + - *ref_14 + 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_8 + external_ref: *ref_26 + return_terms: + description: >- + Terms that are applicable when this item is + returned + type: array + items: &ref_35 + description: >- + Describes the return policy of an item or an + order + type: object + additionalProperties: false + properties: + fulfillment_state: + description: >- + The state of fulfillment during which this + term IETF''s applicable. + allOf: + - *ref_14 + 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_8 + return_location: + description: >- + The location where the item or order must + / will be returned to + allOf: + - *ref_16 + fulfillment_managed_by: + description: The entity that will perform the return + type: string + enum: + - CONSUMER + - PROVIDER + xinput: + description: >- + Additional input required from the customer to + purchase / avail this item + allOf: + - *ref_27 + 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_8 + rateable: + description: Whether this item can be rated + type: boolean + rating: + description: The rating of the item + allOf: + - *ref_5 + 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_10 + 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: string + tags: + type: array + items: *ref_10 + items: + description: The items purchased / availed in this order + type: array + items: *ref_28 + add_ons: + description: The add-ons purchased / availed in this order + type: array + items: *ref_29 + offers: + description: The offers applied in this order + type: array + items: *ref_30 + billing: + description: The billing details of this order + allOf: + - description: >- + Describes the billing details of an entity.
This has + properties like + name,organization,address,email,phone,time,tax_number, + created_at,updated_at + type: object + additionalProperties: false + properties: + name: + description: Name of the billable entity + type: string + organization: + description: Details of the organization being billed. + allOf: + - *ref_20 + address: + description: The address of the billable entity + allOf: + - *ref_13 + state: + description: >- + The state where the billable entity resides. This is + important for state-level tax calculation + allOf: + - *ref_14 + city: + description: The city where the billable entity resides. + allOf: + - *ref_15 + 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_8 + tax_id: + description: >- + ID of the billable entity as recognized by the + taxation authority + type: string + fulfillments: + description: The fulfillments involved in completing this order + type: array + items: *ref_31 + cancellation: + description: The cancellation details of this order + allOf: + - description: Describes a cancellation event + type: object + additionalProperties: false + 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: + - description: Describes a selectable option + type: object + additionalProperties: false + properties: + id: + type: string + descriptor: *ref_4 + additional_description: + description: >- + Any additional information regarding the nature of + cancellation + allOf: + - *ref_4 + cancellation_terms: + description: Cancellation terms of this item + type: array + items: *ref_32 + refund_terms: + description: Refund terms of this item + type: array + items: *ref_33 + replacement_terms: + description: Replacement terms of this item + type: array + items: *ref_34 + return_terms: + description: Return terms of this item + type: array + items: *ref_35 + quote: + description: The mutually agreed upon quotation for this order. + allOf: + - description: >- + Describes a quote. It is the estimated price of products + or services from the BPP.
This has properties like + price, breakup, ttl + type: object + additionalProperties: false + properties: + id: + description: ID of the quote. + type: string + format: uuid + price: + description: The total quoted price + allOf: + - *ref_24 + breakup: + description: the breakup of the total quoted price + type: array + items: + type: object + properties: + item: *ref_28 + title: + type: string + price: *ref_24 + ttl: *ref_6 + payments: + description: The terms of settlement for this order + type: array + items: *ref_36 + 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_27 + tags: + type: array + items: *ref_10 + required: + - update_target + - order +required: + - context + - message diff --git a/v2/ONDC:RET10/search.yaml b/v2/ONDC:RET10/search.yaml new file mode 100644 index 0000000..e6e33b8 --- /dev/null +++ b/v2/ONDC:RET10/search.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_search" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_search.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/select.yaml b/v2/ONDC:RET10/select.yaml new file mode 100644 index 0000000..02b1d0c --- /dev/null +++ b/v2/ONDC:RET10/select.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_select" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_select.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/status.yaml b/v2/ONDC:RET10/status.yaml new file mode 100644 index 0000000..9762ebe --- /dev/null +++ b/v2/ONDC:RET10/status.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_status" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_status.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/template/confirm.yaml b/v2/ONDC:RET10/template/confirm.yaml new file mode 100644 index 0000000..4f71a58 --- /dev/null +++ b/v2/ONDC:RET10/template/confirm.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/init.yaml b/v2/ONDC:RET10/template/init.yaml new file mode 100644 index 0000000..9d9e934 --- /dev/null +++ b/v2/ONDC:RET10/template/init.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_confirm.yaml b/v2/ONDC:RET10/template/on_confirm.yaml new file mode 100644 index 0000000..28eef53 --- /dev/null +++ b/v2/ONDC:RET10/template/on_confirm.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_confirm.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_init.yaml b/v2/ONDC:RET10/template/on_init.yaml new file mode 100644 index 0000000..0d7075a --- /dev/null +++ b/v2/ONDC:RET10/template/on_init.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_init.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_search.yaml b/v2/ONDC:RET10/template/on_search.yaml new file mode 100644 index 0000000..9e1bfca --- /dev/null +++ b/v2/ONDC:RET10/template/on_search.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_search.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_select.yaml b/v2/ONDC:RET10/template/on_select.yaml new file mode 100644 index 0000000..99ebd0e --- /dev/null +++ b/v2/ONDC:RET10/template/on_select.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_status.yaml b/v2/ONDC:RET10/template/on_status.yaml new file mode 100644 index 0000000..4b967b6 --- /dev/null +++ b/v2/ONDC:RET10/template/on_status.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_status.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/on_update.yaml b/v2/ONDC:RET10/template/on_update.yaml new file mode 100644 index 0000000..6353ae9 --- /dev/null +++ b/v2/ONDC:RET10/template/on_update.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/on_update.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/search.yaml b/v2/ONDC:RET10/template/search.yaml new file mode 100644 index 0000000..ee6b4ee --- /dev/null +++ b/v2/ONDC:RET10/template/search.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/search.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/select.yaml b/v2/ONDC:RET10/template/select.yaml new file mode 100644 index 0000000..9a47ca8 --- /dev/null +++ b/v2/ONDC:RET10/template/select.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/select.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/status.yaml b/v2/ONDC:RET10/template/status.yaml new file mode 100644 index 0000000..64c18f4 --- /dev/null +++ b/v2/ONDC:RET10/template/status.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/status.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/template/update.yaml b/v2/ONDC:RET10/template/update.yaml new file mode 100644 index 0000000..4bb6523 --- /dev/null +++ b/v2/ONDC:RET10/template/update.yaml @@ -0,0 +1,34 @@ +template: + data: + $ref: "../payloads/update.yaml" + dict: + bpp_uri: http://localhost:5500/ + bpp_id: localhost:5500 + city_code: + $ref: "../operations/req_body.yaml#/context_city" + bap_id: + $ref: "../operations/req_body.yaml#/bap_id" + bap_uri: + $ref: "../operations/req_body.yaml#/bap_uri" + txn_id: + $ref: "../operations/req_body.yaml#/transaction_id" + msg_id: + operation: + type: GENERATE_UUID + input: + value: "req_body.context.message_id" + timestamp: + operation: + type: GENERATE_TIMESTAMP + country: + $ref: "../operations/req_body.yaml#/context_country" + domain: + $ref: "../operations/req_body.yaml#/context_domain" + transaction_id: + $ref: "../operations/req_body.yaml#/context_transaction_id" + message_id: + operation: + type: READ + input: + value: "req_body.context.message_id" + \ No newline at end of file diff --git a/v2/ONDC:RET10/update.yaml b/v2/ONDC:RET10/update.yaml new file mode 100644 index 0000000..41e7d68 --- /dev/null +++ b/v2/ONDC:RET10/update.yaml @@ -0,0 +1,7 @@ +default: + callback: "on_update" + uri: + $ref: "" + delay: 300 + payload: + $ref: "./template/on_update.yaml" \ No newline at end of file diff --git a/v2/ONDC:RET10/v2.yaml b/v2/ONDC:RET10/v2.yaml new file mode 100644 index 0000000..050140e --- /dev/null +++ b/v2/ONDC:RET10/v2.yaml @@ -0,0 +1,79 @@ +server: + type: BAP/BPP + port: 5500 + sync_mode: true +security: + verify_sign: false + lookup_uri: http://localhost:3000/lookup + generate_sign: true + subscriber_id: mock-api-service + ukId: 584 + publickey: 5RF/CSTd5Cksh7xKNE/vr9IlwrV9LT1ZPR8RDeOpWjs= + privatekey: >- + dYo7zgyKYYoGQiVa45qfTQ94ic0bXPjN5KiUMVX0NBHlEX8JJN3kKSyHvEo0T++v0iXCtX0tPVk9HxEN46laOw== +log: + level: DEBUG + output_type: file + out_file: log_file.log +path: + search: + schema: + $ref: ./v2/ONDC:RET10/schema/search.yaml + callbacks: + $ref: ./v2/ONDC:RET10/search.yaml + select: + + schema: + $ref: ./v2/ONDC:RET10/schema/select.yaml + callbacks: + $ref: ./v2/ONDC:RET10/select.yaml + init: + schema: + $ref: ./v2/ONDC:RET10/schema/init.yaml + callbacks: + $ref: ./v2/ONDC:RET10/init.yaml + confirm: + schema: + $ref: ./v2/ONDC:RET10/schema/confirm.yaml + callbacks: + $ref: ./v2/ONDC:RET10/confirm.yaml + update: + schema: + $ref: ./v2/ONDC:RET10/schema/update.yaml + callbacks: + $ref: ./v2/ONDC:RET10/update.yaml + status: + schema: + $ref: ./v2/ONDC:RET10/schema/status.yaml + callbacks: + $ref: ./v2/ONDC:RET10/status.yaml + on_search: + schema: + $ref: ./v2/ONDC:RET10/schema/on_search.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_search.yaml + on_select: + schema: + $ref: ./v2/ONDC:RET10/schema/on_select.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_select.yaml + on_init: + schema: + $ref: ./v2/ONDC:RET10/schema/on_init.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_init.yaml + on_confirm: + schema: + $ref: ./v2/ONDC:RET10/schema/on_confirm.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_confirm.yaml + on_status: + schema: + $ref: ./v2/ONDC:RET10/schema/on_status.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_status.yaml + on_update: + schema: + $ref: ./v2/ONDC:RET10/schema/on_update.yaml + callbacks: + $ref: ./v2/ONDC:RET10/on_update.yaml diff --git a/yaml-templates/exampleConfig.yaml b/yaml-templates/exampleConfig.yaml index e6ce36c..b42f962 100644 --- a/yaml-templates/exampleConfig.yaml +++ b/yaml-templates/exampleConfig.yaml @@ -1,7 +1,7 @@ server: type: {{type}} port: 5500 - sync_mode: true + sync_mode: false security: verify_sign: false lookup_uri: "http://localhost:3000/lookup"