openapi: 3.0.0
info:
title: Decentralized Skilling and Education Protocol Specification
description: Adaptation of beckn protocol for the domain of skilling and education
version: 0.7.0
security:
- SubscriberAuth: []
- GatewaySubscriberAuthNew: []
paths:
/search:
post:
tags:
- Beckn Provider Platform (BPP)
- Beckn Gateway (BG)
description: This allows a BAP to discover for catalogs offering
a) Jobs and Internships
b) Trainings and Courses
c) Mentors and Coaches and, d) Scholarships and Grants
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- search
message:
type: object
properties:
intent:
$ref: "#/components/schemas/Intent"
required:
- context
- message
examples:
Search for 'web design' jobs by category code in the region of Delhi:
value:
context:
domain: jobs
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
ttl: P10S
message:
intent:
category:
descriptor:
name: Web design jobs
code: nic2008:62012
Search for jobs by skills like carpentry and painting:
value:
context:
domain: jobs
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/uhi/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
message:
intent:
fulfillment:
customer:
person:
skills:
- name: Painting
- name: Carpentry
tags:
- descriptor:
name: Competence
list:
- descriptor:
name: Experience
value: 12Y
Search for jobs along with expected salary:
value:
context:
domain: jobs
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/uhi/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
message:
intent:
fulfillment:
customer:
person:
skills:
- name: Java Programming
tags:
- descriptor:
name: Competence
list:
- descriptor:
name: Experience
value: 12Y
tags:
- descriptor:
name: Expectations
list:
- descriptor:
name: expected_payment
value: 250000INR/Month
Search for jobs offered by a specific provider:
value:
context:
domain: jobs
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/uhi/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
message:
intent:
provider:
descriptor:
name: Infosys
Search for online courses matching a specific topic:
value:
context:
domain: trainings-and-courses
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/v0/
bpp_id: https://mymentor.com/
bpp_uri: https://api.mymentor.com/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
ttl: P10S
message:
intent:
item:
descriptor:
name: AI basics
tags:
- descriptor:
name: course_labels
list:
- descriptor:
name: label_1
value: AI
- descriptor:
name: label_2
value: ML
- descriptor:
name: label_3
value: beginners
- descriptor:
name: label_4
value: Artifical Intelligence
- descriptor:
name: label_5
value: machine learning
- descriptor:
name: label_6
value: neural networks
fulfillment:
type: FULL-TIME
Search for BTech courses offered by an engineering instituition like IIT Delhi:
value:
context:
domain: trainings-and-courses
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/v0/
bpp_id: https://mymentor.com/
bpp_uri: https://api.mymentor.com/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
ttl: P10S
message:
intent:
provider:
descriptor:
name: IIT Delhi
tags:
- descriptor:
name: course_labels
list:
- descriptor:
name: label_1
value: AI
- descriptor:
name: label_2
value: ML
- descriptor:
name: label_3
value: beginners
- descriptor:
name: label_4
value: Artifical Intelligence
- descriptor:
name: label_5
value: machine learning
- descriptor:
name: label_6
value: neural networks
category:
descriptor:
name: B.Tech
code: BTECH
fulfillment:
type: FULL-TIME
Searching for a mentor by name:
value:
context:
domain: mentorship-and-coaching
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/v0/
bpp_id: https://mymentor.com/
bpp_uri: https://api.mymentor.com/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
ttl: P10S
message:
intent:
fulfillment:
agent:
name: Dr Rajiv Manocha
Search for scholarships:
value:
context:
domain: mentorship
location:
city:
code: std:011
country:
code: IND
action: search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/v0/
bpp_id: https://mymentor.com/
bpp_uri: https://api.mymentor.com/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
ttl: P10S
message:
intent:
category:
id: "4"
descriptor:
name: Engineering and Technology
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/select:
post:
tags:
- Beckn Provider Platform (BPP)
description: API for Selecting items from the catalog.
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- select
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/init:
post:
tags:
- Beckn Provider Platform (BPP)
description: Initialize an order by providing billing and/or shipping details
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- init
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/confirm:
post:
tags:
- Beckn Provider Platform (BPP)
description: Initialize an order by providing billing and/or shipping details
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- confirm
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/status:
post:
tags:
- Beckn Provider Platform (BPP)
description: Fetch the latest order object
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- status
required:
- action
message:
type: object
properties:
order_id:
$ref: "#/components/schemas/Order/properties/id"
required:
- order_id
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/track:
post:
tags:
- Beckn Provider Platform (BPP)
description: Track an active order
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- track
required:
- action
message:
type: object
properties:
order_id:
$ref: "#/components/schemas/Order/properties/id"
callback_url:
type: string
format: uri
required:
- order_id
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/cancel:
post:
tags:
- Beckn Provider Platform (BPP)
description: Cancel an order
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- cancel
required:
- action
message:
type: object
properties:
order_id:
$ref: "#/components/schemas/Order/properties/id"
cancellation_reason_id:
$ref: "#/components/schemas/Option/properties/id"
descriptor:
$ref: "#/components/schemas/Descriptor"
required:
- order_id
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/update:
post:
tags:
- Beckn Provider Platform (BPP)
description: Remove object
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- 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:
$ref: "#/components/schemas/Order"
required:
- update_target
- order
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/rating:
post:
tags:
- Beckn Provider Platform (BPP)
description: Provide feedback on a service
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- rating
required:
- action
message:
type: object
properties:
ratings:
type: array
items:
$ref: "#/components/schemas/Rating"
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/support:
post:
tags:
- Beckn Provider Platform (BPP)
description: Contact support
requestBody:
description: Contact support
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- support
required:
- action
message:
type: object
properties:
support:
$ref: "#/components/schemas/Support"
required:
- context
- message
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_search:
post:
tags:
- Beckn App Platform (BAP)
- Beckn Gateway (BG)
description: Send catalog
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_search
required:
- action
message:
type: object
properties:
catalog:
$ref: "#/components/schemas/Catalog"
required:
- catalog
error:
$ref: "#/components/schemas/Error"
required:
- context
examples:
Publish a catalog of software jobs by a software agency:
value:
context:
domain: jobs:nic2008:62XXX
location:
city:
code: "*"
country:
code: IND
action: on_search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/uhi/v0/
bpp_id: https://naukri.com/
bpp_uri: https://api.naukri.com/uhi/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
message:
catalog:
descriptor:
name: Naukri Recruitment Platform
providers:
- descriptor:
name: Infosys
categories:
- id: "1"
name: Frontend Jobs
- id: "2"
name: Backend Jobs
items:
- descriptor:
name: Senior Software Developer
code: SSFD
fulfillment_ids:
- "1"
category_ids:
- "1"
matched: true
- descriptor:
name: Software Consultant - On site
code: SWCO
fulfillment_ids:
- "1"
category_ids:
- "1"
matched: "false"
- descriptor:
name: Software Consultant - Remote
code: SWCR
fulfillment_ids:
- "2"
category_ids:
- "2"
matched: "false"
fulfillments:
- id: "1"
descriptor:
name: Full-time
stops:
- location:
city:
code: BLR
- id: "2"
descriptor:
name: On-site
stops:
- location:
city:
code: BLR
type: start
time:
timestamp: "2022-08-10"
- location:
city: BLR
type: end
time:
timestamp: "2022-08-10"
- id: "3"
descriptor:
name: Remote
stops:
- time:
timestamp: "2022-08-10"
type: start
- time:
timestamp: "2022-08-10"
type: end
Publish a catalog of online courses:
value:
context:
domain: trainings-and-courses
location:
city:
code: std:011
country:
code: IND
action: on_search
version: 1.1.0
bap_id: https://exampleapp.io/
bap_uri: https://api.exampleapp.io/uhi/v0/
message_id: 5ac3dd78-829e-4c7d-9139-a15adbb582cc
timestamp: "2021-03-23T10:00:40.065Z"
message:
catalog:
descriptor:
name: XAcademy
providers:
- descriptor:
name: XAcademy
categories:
- id: "1"
name: Software
- id: "2"
name: Management
items:
- id: "1"
descriptor:
name: Basics of AI
price:
value: "6000"
fulfillment_ids:
- "1"
category_ids:
- "1"
- id: "2"
descriptor:
name: AI for Data Analysis
price:
value: "7000"
fulfillment_ids:
- "1"
category_ids:
- "1"
fulfillments:
- id: "1"
type: ONLINE
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- context
/on_select:
post:
tags:
- Beckn App Platform (BAP)
description: Send draft order object with quoted price for selected items
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_init:
post:
tags:
- Beckn App Platform (BAP)
description: Send order object with payment details updated
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_init
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_confirm:
post:
tags:
- Beckn App Platform (BAP)
description: Send active order object
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_confirm
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_track:
post:
tags:
- Beckn App Platform (BAP)
description: Send tracking details of an active order
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_track
required:
- action
message:
type: object
properties:
tracking:
$ref: "#/components/schemas/Tracking"
required:
- tracking
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_cancel:
post:
tags:
- Beckn App Platform (BAP)
description: Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_cancel
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_update:
post:
tags:
- Beckn App Platform (BAP)
description: Returns updated service with updated runtime object
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_update
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_status:
post:
tags:
- Beckn App Platform (BAP)
description: Fetch the status of a Service
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_status
required:
- action
message:
type: object
properties:
order:
$ref: "#/components/schemas/Order"
required:
- order
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_rating:
post:
tags:
- Beckn App Platform (BAP)
description: Provide feedback on a service
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_rating
required:
- action
message:
type: object
properties:
feedback_form:
description: A feedback form to allow the user to provide additional information on the rating provided
allOf:
- $ref: "#/components/schemas/XInput"
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/on_support:
post:
tags:
- Beckn App Platform (BAP)
description: Contact Support
requestBody:
content:
application/json:
schema:
type: object
properties:
context:
allOf:
- $ref: "#/components/schemas/Context"
- properties:
action:
enum:
- on_support
required:
- action
message:
type: object
properties:
support:
$ref: "#/components/schemas/Support"
error:
$ref: "#/components/schemas/Error"
required:
- context
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/get_cancellation_reasons:
post:
tags:
- BPP Meta APIs
description: Get cancellation reasons from the BPP
requestBody:
description: Context header is sent as the request
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/cancellation_reasons:
post:
tags:
- BAP Meta APIs
description: Get cancellation reasons from the BPP
requestBody:
description: List of cancellation reasons
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
message:
type: object
properties:
cancellation_reasons:
type: array
items:
$ref: "#/components/schemas/Option"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/get_return_reasons:
post:
tags:
- BPP Meta APIs
description: Get return reasons from the BPP
requestBody:
description: Context header is sent as the request
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/return_reasons:
post:
tags:
- BAP Meta APIs
description: Get return reasons from the BPP
requestBody:
description: List of return reasons
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
return_reasons:
type: array
items:
$ref: "#/components/schemas/Option"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/get_rating_categories:
post:
tags:
- BPP Meta APIs
description: Get a list of categories that can be rated by the BAP
requestBody:
description: Context header is sent as the request
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
/rating_categories:
post:
tags:
- BAP Meta APIs
description: Get a list of categories that can be rated by the BAP
requestBody:
description: Array of categories which can be rated
content:
application/json:
schema:
type: object
properties:
context:
$ref: "#/components/schemas/Context"
rating_categories:
type: array
items:
$ref: "#/components/schemas/Rating/properties/rating_category"
responses:
"200":
description: Acknowledgement of message received
content:
application/json:
schema:
type: object
properties:
message:
type: object
properties:
ack:
$ref: "#/components/schemas/Ack"
required:
- ack
error:
$ref: "#/components/schemas/Error"
required:
- message
components:
securitySchemes:
SubscriberAuth:
type: apiKey
in: header
name: Authorization
description: 'Signature of message body using BAP or BPP subscriber''s signing public key.
Format:Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"'
GatewaySubscriberAuth:
type: apiKey
in: header
name: Proxy-Authorization
description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:Proxy-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"
Note:This header will be deprecated soon and will no longer be supported in future releases. New implementors are requested to use the X-Gateway-Authorization header. Existing implementations are requested to migrate their header to the new header. The deprecation date will be set after discussion as per the standard specification governance process.
' GatewaySubscriberAuthNew: type: apiKey in: header name: X-Gateway-Authorization description: 'Signature of message body + BAP/BPP''s Authorization header using BG''s signing public key. Format:X-Gateway-Authorization : Signature keyId="{subscriber_id}|{unique_key_id}|{algorithm}",algorithm="ed25519",created="1606970629",expires="1607030629",headers="(created) (expires) digest",signature="Base64(signing string)"'
schemas:
Ack:
description: This describes an acknowledgement of receipt of a message. Upon receiving a message, the receiver must first authenticate the sender by verifying its digital signature. Upon successful verification of the signature, the receiver must validate the schema of the message. After performing both the operations, the receiver should send an Ack object in response.
type: object
properties:
status:
type: string
description: "Describe the status of the ACK response. If the message passes the acknowledgement criteria, then the receiver shouls set this value equal to ACK else it should be set to NACK"
enum:
- ACK
- NACK
tags:
description: A list of tags containing any additional information sent along with the Acknowledgement.
type: array
items:
$ref: "#/components/schemas/TagGroup"
AddOn:
description: This is typically an optional product or service that can be offered in addition to a product or a service of type Item. Objects of type AddOn should not exist without an associated Item. If a BAP receives an Item with an add-on, it must show it to the user as a selectable object. If any AddOn object is found without an associated Item object, then the validator must throw an error 'NO-PARENT=ITEM' with message 'No parent found'
type: object
properties:
id:
type: string
description: ID of the add-on as present in the source catalog
optional:
type: boolean
default: false
description: This value indicates if the add-on is optional or required to be selected by the user along with an Item. If this value is set to true, then the BAP must ensure that the add-on is mandatorily selected by the user while creating the Order object with the Item.
descriptor:
$ref: "#/components/schemas/Descriptor"
price:
$ref: "#/components/schemas/Price"
Address:
description: Describes a postal address.
type: string
Agent:
description: "Describes a person who fulfills this order."
properties:
person:
$ref: "#/components/schemas/Person"
contact:
$ref: "#/components/schemas/Contact"
organization:
$ref: "#/components/schemas/Organization"
rating:
$ref: "#/components/schemas/Rating/properties/value"
Authorization:
description: "Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation."
type: object
properties:
type:
description: Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy.
type: string
token:
description: "Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering."
type: string
valid_from:
description: Timestamp in RFC3339 format from which token is valid
type: string
format: date-time
valid_to:
description: Timestamp in RFC3339 format until which token is valid
type: string
format: date-time
status:
description: Status of the token
type: string
Billing:
description: Describes the billing details of an order. This must be provided by BAP user before confirmation of the order.
type: object
properties:
name:
description: Name of the person under who's name the bill will be generated.
type: string
organization:
description: Name of the organization under who's name the bill will be generated.
allOf:
- $ref: "#/components/schemas/Organization"
address:
allOf:
- $ref: "#/components/schemas/Address"
state:
description: The state where the billable entity resides. This is important for state-level tax calculation
allOf:
- $ref: "#/components/schemas/State"
city:
description: The city where the billable entity resides.
allOf:
- $ref: "#/components/schemas/City"
email:
description: Email address of the person / organization being billed. The BPP must send the bill to this email address. The format of the bill may be defined in the network policy.
type: string
format: email
phone:
description: Phone number of the person / organization being billed. The BPP must send the bill to this phone number as per the format specified in the network policy. In case the bill is a downloadable file, it is recommended the bill should be sent to the phone number as a downloadable link.
type: string
time:
$ref: "#/components/schemas/Time"
tax_id:
description: This is the identity of a Tax-paying person or an organization. This number can be provided to the BPP to avail tax benefits, if applicable. The format of this string should be specified in the network policy
type: string
created_at:
description: Date and time at which this bill was generated by the BPP.
type: string
format: date-time
Cancellation:
description: Describes a cancellation event
type: object
properties:
time:
description: Date-time when the order was cancelled by the seeker
type: string
format: date-time
cancelled_by:
type: string
enum:
- SEEKER
- PROVIDER
reason:
description: The reason for cancellation
allOf:
- $ref: "#/components/schemas/Option"
additional_description:
description: Any additional information regarding the nature of cancellation
allOf:
- $ref: "#/components/schemas/Descriptor"
CancellationTerm:
description: Describes the cancellation terms of an order, i.e, scholarship application, course etc. This can be referenced at an item or order level. Item-level cancellation terms can override the terms at the order level.
type: object
properties:
fulfillment_state:
description: The state of fulfillment during which this term is applicable.
allOf:
- $ref: "#/components/schemas/FulfillmentState"
reason_required:
description: Indicates whether a reason is required to cancel the order
type: boolean
cancel_by:
description: Information related to the time of cancellation.
allOf:
- $ref: "#/components/schemas/Time"
cancellation_fee:
$ref: "#/components/schemas/Fee"
xinput:
$ref: "#/components/schemas/XInput"
external_ref:
$ref: "#/components/schemas/MediaFile"
Catalog:
description: "Describes a skilling and education catalog"
type: object
properties:
descriptor:
$ref: "#/components/schemas/Descriptor"
fulfillments:
description: Fulfillment modes offered at the BPP level. This is used when a BPP itself offers fulfillments on behalf of the providers it has onboarded.
type: array
items:
$ref: "#/components/schemas/Fulfillment"
payments:
description: Payment terms offered by the BPP for all transactions. This can be overriden at the provider level.
type: array
items:
$ref: "#/components/schemas/Payment"
offers:
description: Offers at the BPP-level. This is common across all providers onboarded by the BPP.
type: array
items:
$ref: "#/components/schemas/Offer"
providers:
type: array
items:
$ref: "#/components/schemas/Provider"
exp:
description: Timestamp after which catalog will expire
type: string
format: date-time
ttl:
description: Duration in seconds after which this catalog will expire
type: string
Category:
description: Describes a category
type: object
properties:
id:
type: string
description: Unique id of the category
parent_category_id:
$ref: "#/components/schemas/Category/properties/id"
descriptor:
$ref: "#/components/schemas/Descriptor"
time:
$ref: "#/components/schemas/Time"
ttl:
description: Time to live for an instance of this schema
tags:
type: array
items:
$ref: "#/components/schemas/TagGroup"
Circle:
description: Describes a circular area on the map
type: object
properties:
gps:
$ref: "#/components/schemas/Gps"
radius:
$ref: "#/components/schemas/Scalar"
City:
description: Describes a city
type: object
properties:
name:
type: string
description: Name of the city
code:
type: string
description: City code
Contact:
description: Describes the contact information of an entity
type: object
properties:
phone:
type: string
email:
type: string
jcard:
type: object
description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification
Context:
description: Describes a beckn message context
type: object
properties:
domain:
allOf:
- $ref: "#/components/schemas/Domain/properties/code"
location:
description: The location where the transaction is intended to be fulfilled.
allOf:
- $ref: "#/components/schemas/Location"
action:
type: string
description: Defines the Beckn API call type.
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
format: uuid
description: This is a unique value which persists across all API calls from search through confirm
message_id:
type: string
format: uuid
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
ttl:
type: string
description: The duration in ISO8601 format after timestamp for which this message holds valid
Country:
description: Describes a country.
type: object
properties:
name:
type: string
description: Name of the country
code:
type: string
description: Country code as per ISO 3166-1 and ISO 3166-2 format
Credential:
description: Describes a credential of an entity - Person or Organization
type: object
properties:
id:
type: string
type:
type: string
default: VerifiableCredential
url:
description: URL of the credential
type: string
format: uri
Customer:
description: Describes a customer buying/availing a product or a service
type: object
properties:
person:
$ref: "#/components/schemas/Person"
contact:
$ref: "#/components/schemas/Contact"
Domain:
description: "Described the industry sector or sub-sector. The network policy should contain codes for all the industry sectors supported by the network. Domains can be created in varying levels of granularity. The granularity of a domain can be decided by the participants of the network. Too broad domains will result in irrelevant search broadcast calls to BPPs that don't have services supporting the domain. Too narrow domains will result in a large number of registry entries for each BPP. It is recommended that network facilitators actively collaborate with various working groups and network participants to carefully choose domain codes keeping in mind relevance, performance, and opportunity cost. It is recommended that networks choose broad domains like mobility, logistics, healthcare etc, and progressively granularize them as and when the number of network participants for each domain grows large."
type: object
properties:
name:
description: Name of the domain
type: string
code:
description: "Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network."
additional_info:
description: A url that contains addtional information about that domain.
allOf:
- $ref: "#/components/schemas/MediaFile"
DecimalValue:
description: Describes a decimal value
type: string
pattern: "[+-]?([0-9]*[.])?[0-9]+"
Descriptor:
description: Physical description of something.
type: object
properties:
name:
type: string
code:
type: string
short_desc:
type: string
long_desc:
type: string
additional_desc:
type: object
properties:
url:
type: string
content_type:
type: string
enum:
- text/plain
- text/html
- application/json
media:
type: array
items:
$ref: "#/components/schemas/MediaFile"
images:
type: array
items:
$ref: "#/components/schemas/Image"
Duration:
description: Describes duration as per ISO8601 format
type: string
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 docs/protocol-drafts/BECKN-RFC-005-ERROR-CODES-DRAFT-01.md 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
Fee:
description: A fee applied on a particular entity
type: object
properties:
percentage:
description: Percentage of a value
allOf:
- $ref: "#/components/schemas/DecimalValue"
amount:
description: A fixed value
allOf:
- $ref: "#/components/schemas/Price"
Form:
description: Describes a form
type: object
properties:
url:
description: "The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form."
type: string
format: uri
data:
description: The form submission data
type: object
additionalProperties:
type: string
mime_type:
description: This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838.
type: string
enum:
- text/html
- application/xml
submission_id:
type: string
format: uuid
Fulfillment:
description: Describes how a an order will be rendered/fulfilled to the end-customer
type: object
properties:
id:
description: Unique reference ID to the fulfillment of an order
type: string
type:
description: "A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment."
type: string
rateable:
description: Whether the fulfillment can be rated or not
type: boolean
rating:
description: The rating value of the fulfullment service.
allOf:
- $ref: "#/components/schemas/Rating/properties/value"
state:
description: The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call.
allOf:
- $ref: "#/components/schemas/FulfillmentState"
tracking:
type: boolean
description: Indicates whether the fulfillment allows tracking
default: false
customer:
description: The person that will ultimately receive the order
allOf:
- $ref: "#/components/schemas/Customer"
agent:
description: The agent that is currently handling the fulfillment of the order
allOf:
- $ref: "#/components/schemas/Agent"
contact:
$ref: "#/components/schemas/Contact"
vehicle:
$ref: "#/components/schemas/Vehicle"
stops:
description: The list of logical stops encountered during the fulfillment of an order.
type: array
items:
$ref: "#/components/schemas/Stop"
path:
description: The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network.
type: string
tags:
type: array
items:
$ref: "#/components/schemas/TagGroup"
FulfillmentState:
description: Describes the state of fulfillment
type: object
properties:
descriptor:
$ref: "#/components/schemas/Descriptor"
updated_at:
type: string
format: date-time
updated_by:
type: string
description: ID of entity which changed the state
Gps:
description: Describes a GPS coordinate
type: string
pattern: '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$'
Image:
description: Describes an image
type: object
properties:
url:
description: URL to the image. This can be a data url or an remote url
type: string
format: uri
size_type:
description: The size of the image. The network policy can define the default dimensions of each type
type: string
enum:
- xs
- sm
- md
- lg
- xl
- custom
width:
description: Width of the image in pixels
type: string
height:
description: Height of the image in pixels
type: string
Intent:
description: "The intent to get a Learning and Career Development Resources. The BAP can declare the intent of the consumer containing